Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dudiiiiiiii committed Jan 11, 2025
1 parent 35526ce commit 30a43d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion tests/fluka/expected_fluka_output/fl_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
ASSIGNMA WATER world
ASSIGNMA BLCKHOLE boundary
* generated scoring cards
USRBIN 10.0 ALL-PART -21.0 0.05 5.0 6.0Fluence_21
USRBIN 10.0 ALL-PART -21.0 0.05 5.0 6.0Flue_16255
USRBIN -0.05 -5.0 -6.0 1.0 100.0 120.0&
AUXSCORE USRBIN -100100.0 1.0 1.0 1.0
* random number generator settings
Expand Down
34 changes: 16 additions & 18 deletions tests/fluka/test_scoring_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def expected_card() -> str:
def expected_scores() -> str:
"""Returns expected Fluka scoring card sets"""
lines = """
USRBIN 10.0 ALL-PART -21.0 0.05 5.0 6.0Fluence_21
USRBIN 10.0 ALL-PART -21.0 0.05 5.0 6.0Flue_16255
USRBIN -0.05 -5.0 -6.0 1.0 100.0 120.0&
AUXSCORE USRBIN -100100.0 1.0 1.0 1.0
"""
Expand All @@ -71,10 +71,10 @@ def expected_scores() -> str:
def expected_scores_2() -> str:
"""Returns expected Fluka scoring card sets"""
lines = """
USRBIN 10.0 ALL-PART -21.0 0.05 5.0 6.0Fluence_21
USRBIN 10.0 ALL-PART -21.0 0.05 5.0 6.0Flue_16255
USRBIN -0.05 -5.0 -6.0 1.0 100.0 120.0&
AUXSCORE USRBIN -100100.0 1.0 1.0 1.0
USRBIN 10.0 DOSE -22.0 12.5 25.0 37.5MyDose_22
USRBIN 10.0 DOSE -22.0 12.5 25.0 37.5MyDo_33280
USRBIN 7.5 15.0 22.5 10.0 100.0 150.0&
AUXSCORE USRBIN NEUTRON 2.0 2.0 1.0
"""
Expand All @@ -86,7 +86,7 @@ def expected_scores_2() -> str:
def expected_scores_cylinder() -> str:
"""Returns expected Fluka scoring card sets"""
lines = """
USRBIN 11.0 DOSE -21.0 3.0 0.0 21.0Dose1_21
USRBIN 11.0 DOSE -21.0 3.0 0.0 21.0Dose_30008
USRBIN 0.0 0.0 3.0 1.0 1.0 100.0&
"""

Expand All @@ -97,36 +97,36 @@ def expected_scores_cylinder() -> str:
def expected_scores_4() -> str:
"""Returns expected Fluka scoring card sets"""
lines = """
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_Total_21
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_To_48870
USRBIN -2.5 -2.5 3.0 1.0 1.0 100.0&
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_Proton_21
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_Pr_63880
USRBIN -2.5 -2.5 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN PROTON 2.0 2.0 1.0
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_He3_21
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_He_77998
USRBIN -2.5 -2.5 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN 3-HELIUM 3.0 3.0 1.0
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_C_Cus_21
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_C__70056
USRBIN -2.5 -2.5 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN-1200600.0 4.0 4.0 1.0
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_He_Cus_21
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_He_69410
USRBIN -2.5 -2.5 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN -400200.0 5.0 5.0 1.0
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_B_Cus_21
USRBIN 10.0 DOSE -21.0 2.5 2.5 21.0D_B__88407
USRBIN -2.5 -2.5 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN -900400.0 6.0 6.0 1.0
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_Total_22
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_To_97669
USRBIN 0.0 0.0 3.0 1.0 1.0 100.0&
USRBIN 11.0 PROTON -22.0 2.5 0.0 21.0F_Proton_22
USRBIN 11.0 PROTON -22.0 2.5 0.0 21.0F_Pr_87248
USRBIN 0.0 0.0 3.0 1.0 1.0 100.0&
USRBIN 11.0 3-HELIUM -22.0 2.5 0.0 21.0F_He3_22
USRBIN 11.0 3-HELIUM -22.0 2.5 0.0 21.0F_He_66868
USRBIN 0.0 0.0 3.0 1.0 1.0 100.0&
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_C_Cus_22
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_C__72199
USRBIN 0.0 0.0 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN-1200600.0 10.0 10.0 1.0
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_He_Cus_22
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_He_84923
USRBIN 0.0 0.0 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN -400200.0 11.0 11.0 1.0
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_B_Cus_22
USRBIN 11.0 ALL-PART -22.0 2.5 0.0 21.0F_B__95162
USRBIN 0.0 0.0 3.0 1.0 1.0 100.0&
AUXSCORE USRBIN -900400.0 12.0 12.0 1.0
"""
Expand Down Expand Up @@ -160,7 +160,5 @@ def test_scoring_dose_and_fluence_with_two_detectors(detectors_json_4: dict, sco
expected_scores_4: str) -> None:
scorings = parse_scorings(detectors_json_4, scorings_json_4)
scorings_card = ScoringsCard(scorings)
print(expected_scores_4)
print(scorings_card)

assert str(scorings_card) == expected_scores_4

0 comments on commit 30a43d3

Please sign in to comment.