Skip to content

Opengate newsletter 4

David Sarrut edited this page Dec 20, 2023 · 7 revisions

News

Consolidation efforts are ongoing. By "consolidation", we mean restructuring the code internally, i.e. with no visible changes for the user but also"externally", with some changes in the user interface.

"Internal" restructuration is important to keep the code as robust as possible while keeping future extensions as easy as possible. We build upon 2 years of feedback and multiple experiences, this is long work but we are currently quite happy with the current state. The 100+ automated tests are the backbone of a serene development.

"External" restructuration is more annoying because it means the simulations already created by the users will no longer be valid and some changes in the code are required. Most of the time, those changes are small, such as modifying an attribute name, but still, we know it remains an API change and should be limited. This is why the current Gate10 version is still named "beta". This "beta" will be removed once those user changes are (almost) forbidden. And good news! we expect the first non-beta release to be officially published in May 2024 together with the next Opengate Scientific meeting that will be held in Paris, at the end of May (exact date still to be determined).

Some recent changes:

  • Volume refactoring. The way the volumes (and boolean solids) are defined are now much more straightforward and modular. See test test016. Kudos to Nils!
  • A new source "TreatmentPlanPhsSource" has been added. It behaves like the proton plan source but uses a phase-space instead of a beam model. See test061. Kudos to the the Vienna/Medaustron team!
  • When launching a simulation, the time needed by import opengate was found to be larger than expected (around 4 seconds). After hours of investigation, it appears it is due to the conjoint use of ITK and torch. A patch has been submitted to ITK, the next version should improve this. Kudos to Thomas!
  • We are working on a complete radiotherapy treatment plan example from a DICOM RT PLAN, with all leaf motions. Still in progress, stay tuned. Kudos to Maxime!
  • We are working on STL volumes (triangulated meshes) import. Still in progress, stay tuned. Kudos to Hermann!

Focus on Optical Physics

(Kudos to all the UCDavis team: Guneet, Carlotta and Emilie)

Like previous versions, Gate 10 now can run optical simulations. You can find an example in test013

To include optical processes in the simulation, the user can explicitly enable them with the following code:

sim.physics_manager.special_physics_constructors.G4OpticalPhysics = True

It is important to note that merely including the G4OpticalPhysics physics list does not automatically activate the Cherenkov process. To generate Cherenkov photons, it’s necessary to set an appropriate electron physics cut in the relevant volume. Currently, setting the electron physics cut to 0.1 mm has been found effective:

crystal = sim.add_volume("Box", "crystal")
crystal.size = [3 * mm, 3 * mm, 20 * mm]
crystal.translation = [0 * cm, 0 * cm, 0 * cm]
crystal.material = "BGO"
crystal.set_production_cut("electron", 0.1 * mm)

To enable Optical physics, material property tables must be stored separately from the material database. This separation allows for easier modification of properties without altering the material database itself. In Gate 10, a default file named OpticalProperties.xml is used, located in the opengate/data folder. Users can specify a custom file by using:

# Users can specify their own path optical properties file by
sim.physics_manager.optical_properties_file = PATH_TO_FILE
# By default, Gate uses the file opengate/data/OpticalProperties.xml

As optical photons (scintillation and Cherenkov photons) largely determine the performance of conventional PET and SPECT detectors (energy resolution, sensitivity, timing resolution, spatial resolution), properly simulating their creation and transport within the detector is important to users who work on optimizing detector design or improving the system performance.


Remember the Hackathon in Feb 2024: https://indico.in2p3.fr/event/30972/overview Next Opengate scientific meeting: May 2024 (to be announced)

As always, your feedback is crucial to us. Please don't hesitate to reach out with any questions, suggestions, or comments.
Thank you for your continued support and contributions.

Happy Christmas to all! 2023/12/22

Clone this wiki locally