-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update scoring names to be distinct for FLUKA #224
base: master
Are you sure you want to change the base?
Update scoring names to be distinct for FLUKA #224
Conversation
There is a problem with one test. After scores name is updated sometimes it get out of range (is too long max 10 characters) Should i update tests so that names with added suffixes (ex _21) will be short enough? |
@@ -30,6 +30,7 @@ class Quantity: | |||
"""Class representing Quantity""" | |||
|
|||
name: str | |||
name_processed = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of adding name_processed
I'd add here a field with output_unit
and proper type (integer ?)
then instead of playing with name
I'd suggest to modify this logic:
converter/converter/fluka/cards/scoring_card.py
Lines 83 to 103 in 4c1a1ed
def _parse_mesh_detector(detector: MeshDetector, quantity: Quantity, quantity_to_score: str, | |
output_unit_in_fluka_convention: str) -> list[Card]: | |
"""Creates USRBIN card for mesh detector""" | |
first_card = Card(codewd='USRBIN') | |
first_card.what = [ | |
'10.0', quantity_to_score, output_unit_in_fluka_convention, detector.x_max, detector.y_max, detector.z_max | |
] | |
first_card.sdum = short_name(quantity.name) | |
second_card = Card(codewd='USRBIN') | |
second_card.what = [ | |
detector.x_min, | |
detector.y_min, | |
detector.z_min, | |
detector.x_bins, | |
detector.y_bins, | |
detector.z_bins, | |
] | |
second_card.sdum = '&' | |
return [first_card, second_card] |
here the SDUM is written
instead of truncating name to first 10 characters I'd rather use something like:
- first 4 characters of the name +
_
+ some_hash_of_name_and_output_unit_saved_on_5_characters
print(expected_scores_4) | ||
print(scorings_card) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(expected_scores_4) | |
print(scorings_card) |
No description provided.