OpenGATE / opengate

Gate 10 (beta)
http://www.opengatecollaboration.org
GNU Lesser General Public License v3.0
42 stars 38 forks source link

how to change pet scanner #351

Open jizhang02 opened 6 months ago

jizhang02 commented 6 months ago

Hello,

I use pet = pet_biograph.add_pet(sim, "pet") as a pet scanner. The problem is the simulation result under this default setting can not cover the whole body.

I would like to ask if I want to add more rings, how can I change them? In siementsbiograph.py there is code like:

    # 4 rings
    ring = sim.add_volume("Tubs", f"{name}_ring")
    ring.mother = pet.name
    ring.rmax = 460 * mm
    ring.rmin = 410 * mm
    ring.dz = 56 * mm / 2
    ring.translation = get_grid_repetition([1, 1, 4], [0, 0 * mm, 56 * mm])
    ring.material = "G4_AIR"
    ring.color = transparent

I changed the number [1, 1, 4] to [1, 1, 20],, there was an error:

image

jizhang02 commented 6 months ago

Hi,

I solved this by changing the code in siementsbiograph.py:

image then the gap between rings and overlap exceptions are gone.

I hope in the future, the ring number can be as a parameter to pass in the function pet_biograph.add_pet(sim, "pet")