Skip to content

Commit

Permalink
For tests 072 coinc, we need the output of test072_coinc_sorter_1.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaudier committed Aug 21, 2024
1 parent ec4f93c commit 4bf906c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opengate/contrib/carm/siemensciosalpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def add_carm_source(self, kvp):
source.position.type = "disc"
source.position.radius = 0 * mm

source.direction_relative_to_volume = True
source.direction_relative_to_attached_volume = True
source.direction.type = "histogram"
source.direction.histogram_theta_weight = [0, 1]
source.direction.histogram_theta_angle = [85 * deg, 95 * deg]
Expand Down
2 changes: 1 addition & 1 deletion opengate/tests/src/test068_rotation_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test068(tab, nb_run, nb_part, nb_source):
source3.direction.type = "iso"
source3.direction.theta = [0 * deg, 10 * deg]
source3.direction.phi = [0 * deg, 360 * deg]
source3.direction_relative_to_volume = True
source3.direction_relative_to_attached_volume = True
source3.energy.type = "mono"
source3.energy.mono = 1 * MeV
source3.activity = n * Bq / sim.number_of_threads
Expand Down
9 changes: 9 additions & 0 deletions opengate/tests/src/test072_coinc_sorter_2keepAll.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
coincidences_sorter,
copy_tree_for_dump,
)
import os
import subprocess
import uproot

if __name__ == "__main__":
Expand All @@ -15,6 +17,13 @@
__file__, output_folder="test072_coinc_sorter"
)

# The test needs the output of test072_coinc_sorter_1.py
# If the output of test072_coinc_sorter_1.py does not exist, create it
if not os.path.isfile(paths.output / "test72_output_1.root"):
print("---------- Begin of test072_coinc_sorter_1.py ----------")
subprocess.call(["python", paths.current / "test072_coinc_sorter_1.py"])
print("----------- End of test072_coinc_sorter_1.py -----------")

# open root file
root_filename = paths.output / "test72_output_1.root"
print(f"Opening {root_filename} ...")
Expand Down
8 changes: 8 additions & 0 deletions opengate/tests/src/test072_coinc_sorter_2removeMultiples.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
copy_tree_for_dump,
)
import uproot
import subprocess
import os

if __name__ == "__main__":
Expand All @@ -16,6 +17,13 @@
__file__, output_folder="test072_coinc_sorter"
)

# The test needs the output of test072_coinc_sorter_1.py
# If the output of test072_coinc_sorter_1.py does not exist, create it
if not os.path.isfile(paths.output / "test72_output_1.root"):
print("---------- Begin of test072_coinc_sorter_1.py ----------")
subprocess.call(["python", paths.current / "test072_coinc_sorter_1.py"])
print("----------- End of test072_coinc_sorter_1.py -----------")

# open root file
root_filename = paths.output / "test72_output_1.root"
print(f"Opening {root_filename} ...")
Expand Down

0 comments on commit 4bf906c

Please sign in to comment.