Skip to content

Commit

Permalink
fix module_id order
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Nov 4, 2024
1 parent ae3a048 commit a167a55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cpp/petsird_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ constexpr uint32_t NUMBER_OF_ENERGY_BINS = 3;
constexpr uint32_t NUMBER_OF_TOF_BINS = 300;
constexpr float RADIUS = 400.F;
constexpr std::array<float, 3> CRYSTAL_LENGTH{ 20.F, 4.F, 4.F };
constexpr std::array<float, 3> NUM_CRYSTALS_PER_MODULE{ 2, 4, 5 };
constexpr std::array<float, 3> NUM_CRYSTALS_PER_MODULE{ 2, 4, 7 };
constexpr uint32_t NUM_MODULES_ALONG_RING{ 20 };
constexpr uint32_t NUM_MODULES_ALONG_AXIS{ 2 };
constexpr float MODULE_AXIS_SPACING{ (NUM_CRYSTALS_PER_MODULE[2] + 4) * CRYSTAL_LENGTH[2] };
Expand Down Expand Up @@ -72,7 +72,7 @@ get_detector_module()
{ 0.0, 1.0, 0.0, (rep1 - N1 / 2) * CRYSTAL_LENGTH[1] },
{ 0.0, 0.0, 1.0, (rep2 - N2 / 2) * CRYSTAL_LENGTH[2] } } };
rep_volume.transforms.push_back(transform);
rep_volume.ids.push_back(rep0 + N0 * (rep1 + N1 * rep2));
rep_volume.ids.push_back(rep2 + N2 * (rep1 + N1 * rep0));
}
}

Expand Down
4 changes: 2 additions & 2 deletions python/petsird_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
RADIUS = 400
CRYSTAL_LENGTH = (20, 4, 4)
# num crystals in a module
NUM_CRYSTALS_PER_MODULE = (2, 4,5)
NUM_CRYSTALS_PER_MODULE = (2, 4, 7)
NUM_MODULES_ALONG_RING = 20
NUM_MODULES_ALONG_AXIS = 2
MODULE_AXIS_SPACING = (NUM_CRYSTALS_PER_MODULE[2] + 4) * CRYSTAL_LENGTH[2]
Expand Down Expand Up @@ -69,7 +69,7 @@ def get_detector_module() -> petsird.DetectorModule:
)
)
rep_volume.transforms.append(transform)
rep_volume.ids.append(rep0 + N0 * (rep1 + N1 * rep2))
rep_volume.ids.append(rep2 + N2 * (rep1 + N1 * rep0))

return petsird.DetectorModule(
detecting_elements=[rep_volume], detecting_element_ids=[0]
Expand Down

0 comments on commit a167a55

Please sign in to comment.