[Gate-users] TPS Pencil Beam Source setting

jbaran jbaran at ifj.edu.pl
Thu May 21 22:40:46 CEST 2020


Dear Loic,

many thanks for your answear. I was not so explicit in my explanations 
as you in previous emails. Regarding your comment about te 
setBeamConvergence option, I completely missed that somehow (I have no 
idea why) during the beam model preparation and this is the reason why I 
change the source code. You are right, thanks for claryfing and 
indicating that option.

All the best,
Jakub



On 2020-05-20 09:58, Grevillot Loic wrote:
> Dear both,
> 
> I was having a short look at your discussion and I do not exactly get
> your issue, but I would like to provide a few hints if it may help:
> 
>  1.       In the TPS source, one can set the following option to true
> or false, depending if you want the beam to be diverging or
> converging:
> 
>  o   /gate/source/PBS/setBeamConvergence true (or false)
> 
>  o   If you use this option, I do not understand why you would need to
> change the source code or recompile? Just use the setBeamConvergence
> option.
> 
>  o   For a more detailed understanding of the TPS source, you can run
> the validation tests provided in the GATE-RTion folder [1] of the
> GitContrib repository of GATE
> 
>  2.       If despite changing this option, the beam is always
> diverging, it may simply be that you define your beam properties at
> the waist position… then in that case the beam can only diverge.
> 
>  o
> 
> Hope this helps?
> 
> Best,
> 
> Loïc
> 
> -----Original Message-----
> From: Gate-users
> [mailto:gate-users-bounces at lists.opengatecollaboration.org] On Behalf
> Of jbaran
> Sent: Dienstag, 19. Mai 2020 12:17
> To: 张晖 <zhanghui at impcas.ac.cn>
> Cc: gate-users at lists.opengatecollaboration.org
> Subject: Re: [Gate-users] TPS Pencil Beam Source setting
> 
> Dear Hui Zhang,
> 
> maybe this is trivial (I am sorry if I write obvious things), but I
> want to clarify it. Whenever you change the source code of GATE you
> have to recompile it. Assuming you have GATE ver.8.2, you have to go
> to the directory gate_v8.2-build
> 
> (https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopengate.readthedocs.io%2Fen%2Flatest%2Fcompilation_instructions.html%23compilation-instructions-label&data=02%7C01%7Cloic.grevillot%40medaustron.at%7C7689c7e6677d4cbf737908d7fbdde75d%7Cadb749e06dfd4f6fbea8cd9f8e0c9b89%7C0%7C0%7C637254802831509937&sdata=phmMjoqNL9dXmsyN0zzMkFvqzDJjZ8NHMK%2BT2I5J98Y%3D&reserved=0
> [2]
> 
> this is for GATE 9.0 but the procedure is very similar) and run again
> 
> commands:
> 
> make -jN (N is the number of processor(s) in your PC) make install
> 
> you don't have to build it from the scratch and run commands like
> ccmake and others, just two commands will be enough (I belive only
> 'make install' would be sufficient but run both just to be sure). Due
> to the fact you changed just one file the compilation will be very
> fast not as it was in case of first compilation.
> 
> If you did that already, could you please provide example 2D dose
> distribution images?
> 
> Jakub
> 
> On 2020-05-19 11:54, 张晖 wrote:
> 
>> Dear Jakub,
> 
>> The attachment is the percentage depth dose distribution in water
> box.
> 
>> I just changed the default values on true in
> 
>> GateSourceTPSPencilBeam.cc file,and run my code again. Did you mean
> 
>> reinstall the Gate 8.2?
> 
>> 
> 
>> 
> 
>> > -----原始邮件-----
> 
>> > 发件人: jbaran <jbaran at ifj.edu.pl>
> 
>> > 发送时间: 2020-05-19 17:29:00 (星期二)
> 
>> > 收件人: "张晖" <zhanghui at impcas.ac.cn> > 抄送:
> 
>> gate-users at lists.opengatecollaboration.org
> 
>> > 主题: Re: [Gate-users] TPS Pencil Beam Source setting >
> >
> 
>> Dear Hui Zhang, > > just to check, did you recompile the GATE
> 
>> once again? Could you please > explain if the differences are in
> 
>> spatial distribution or the spatial > distribution of the doses
> is
> 
>> consistent and the differences are in the > values?
> 
>> >
> 
>> > Jakub
> 
>> >
> 
>> >
> 
>> > On 2020-05-19 11:13, 张晖 wrote:
> 
>> > >> Dear Jakub
> 
>> > >> I used Gate 8.2 for simulation.In
> 
>> GateSourceTPSPencilBeam.cc, the beam > >> is divergent by
> 
>> default, and I have changed the default values on > >>
> true.
> 
>> However, it dosen't work in my case.
> 
>> > >> #=====================================================
> 
> 
>> > >> # BEAMS
> 
>> > >> #=====================================================
> 
> 
>> > >> /gate/source/addSource PBS TPSPencilBeam > >>
> 
> 
>> /gate/source/PBS/setParticleType GenericIon > >>
> 
>> /gate/source/PBS/setIonProperties 6 12 6 0 > >>
> 
>> /gate/source/PBS/setTestFlag false > >>
> 
>> /gate/source/PBS/setPlan data/PlanDescriptionToGATE.txt >
> >>
> 
>> #/gate/source/PBS/setNotAllowedFieldID 1 > >>
> 
>> #/gate/source/PBS/setNotAllowedFieldID 2 > >>
> 
>> /gate/source/PBS/setFlatGenerationFlag false > >>
> 
>> /gate/source/PBS/setSpotIntensityAsNbIons true > >>
> 
>> /gate/source/PBS/setSortedSpotGenerationFlag false > >>
> 
>> /gate/source/PBS/setSigmaEnergyInMeVFlag false > >>
> 
>> /gate/source/PBS/setSourceDescriptionFile
> 
>> data/Source-Properties.txt
> 
>> > >> /gate/source/PBS/setBeamConvergence true > >>
> 
> 
>> > >> This is my part of code in main.mac file.
> 
>> > >>
> 
>> > >>
> 
>> > >> > -----原始邮件-----
> 
>> > >> > 发件人: jbaran <jakub.baran at ifj.edu.pl> >
> >>
> 
>> > 发送时间: 2020-05-19 16:34:13 (星期二)
> 
>> > >> > 收件人: "张晖" <zhanghui at impcas.ac.cn> >
> >>
> 
>> > 抄送: gate-users at lists.opengatecollaboration.org
> 
>> > >> > 主题: Re: [Gate-users] TPS Pencil Beam Source
> setting
> 
>> > >> > > >> > Dear Hui Zhang, > >>
> 
>> > > >> > I am not sure which version of GATE you are
> 
>> using but from my > >> experience > >> > it
> seems
> 
>> that when you are using Pencil Beam source you are able >
> >>
> 
>> to set > >> > if your beam is divergent or convergent
> and
> 
>> you are using > >> convergent > >> > beam from
> 
>> what I see in your souce code. In case of TPS source > >>
> the
> 
>> beam > >> > is divergent by default > >> >
> 
>> > >>
> 
>> 
> (https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> [3]
> 
>> 
> hub.com%2FOpenGATE%2FGate%2Fblob%2Fdevelop%2Fsource%2Fphysics%2Fsrc%2F
> 
> 
>> 
> GateSourceTPSPencilBeam.cc&data=02%7C01%7Cloic.grevillot%40medaust
> 
> 
>> 
> ron.at%7C7689c7e6677d4cbf737908d7fbdde75d%7Cadb749e06dfd4f6fbea8cd9f8e
> 
> 
>> 
> 0c9b89%7C0%7C0%7C637254802831519922&sdata=YQQt8kRb6F9Xf%2BYiVkouea
> 
> 
>> 6hf%2BUO0ErAb6eZ0%2FWswZM%3D&reserved=0
> 
>> > >> > - lines: 60 and 61), for sure in GATE 8.2 and 9.0
> 
> 
>> and I pressume > >> for all > >> > of GATE
> 
>> versions is the case but you have to check it with your >
> >>
> 
>> version.
> 
>> > >> > In my case I just change the default values on
> true
> 
>> (lines: 60
> 
>> > >> and 61)
> 
>> > >> > and recompile GATE once again. Please let us know
> 
> 
>> if it works in > >> your > >> > case.
> 
>> > >> >
> 
>> > >> > All the best,
> 
>> > >> > Jakub
> 
>> > >> >
> 
>> > >> >
> 
>> > >> >
> 
>> > >> > On 2020-05-19 10:19, 张晖 wrote:
> 
>> > >> > > Dear Gate Users:
> 
>> > >> > >
> 
>> > >> > >  I previously used Pencil Beam Source to
> 
>> simulate > >> single-energy pencil > >> > >
> 
>> beam for carbon-ion therapy. The features of the pencil beam >
> 
>> >> source > >> > > such as spot size,
> divergence
> 
>> and beam emittance were > >> defined as > >> >
> 
>> > follows: 3 mm spot size in both x and y directions, 4 mrad >
> 
> 
>> >> divergence > >> > > and 15 mm·mrad beam
> 
>> emittance. The energy spread was set to > >> 0.1% of >
> 
>> >> > > the respective energy. Except for dipole scanning
> 
> 
>> > >> magnets,vacuum pipe > >> > > and
> window,
> 
>> main and sub-dose monitors, a multi-strip > >> ionization
> 
>> > >> > > chamber (IC) and a mini ridge filter were
> 
>> modeled in my MC > >> > > simulations. The source
> 
>> position was located before the > >> vacuum window >
> 
>> >> > > and a water box was located at isocenter.
> 
>> > >> > >
> 
>> > >> > >  #################Pencil Beam > >>
> 
>> > > Source########################################
> 
>> > >> > >
> 
>> > >> > >  # SOURCE PBS
> 
>> > >> > > /gate/source/addSource C12 PencilBeam >
> 
>> >> > > > >> > > #particle type >
> 
>> >> > > /gate/source/C12/setParticleType GenericIon >
> 
>> >> > > /gate/source/C12/setIonProperties 6 12 6 0 >
> 
>> >> > > > >> > > #energy spectrum >
> 
>> >> > > /gate/source/C12/setEnergy 2687.52 MeV >
> 
>> >> > > /gate/source/C12/setSigmaEnergy 2.68752 MeV >
> 
>> >> > > > >> > > #position > >>
> 
>> > > /gate/source/C12/setPosition 0 0 -1.4059 m > >>
> 
>> > > > >> > > # spot size > >> >
> >
> 
>> /gate/source/C12/setSigmaX 3 mm > >> > >
> 
>> /gate/source/C12/setSigmaY 3 mm > >> > > >
> >>
> 
>> > > #divergence > >> > >
> 
>> /gate/source/C12/setSigmaTheta 4 mrad > >> > >
> 
>> /gate/source/C12/setSigmaPhi 4 mrad > >> > > >
> 
>> >> > > #emittance > >> > >
> 
>> /gate/source/C12/setEllipseXThetaEmittance 15 mm*mrad > >>
> 
>> > > /gate/source/C12/setEllipseYPhiEmittance 15 mm*mrad >
> 
>> >> > > > >> > > #positive-> converging
> 
> 
>> beam; negative diverging beam > >> > >
> 
>> /gate/source/C12/setEllipseXThetaRotationNorm
> 
>> positive
> 
>> > >> > > /gate/source/C12/setEllipseYPhiRotationNorm
> 
>> positive
> 
>> > >> > >
> 
>> > >> > >  Now, I want to use TPS Pencil Beam Source
> to
> 
>> simulate > >> realistic > >> > > treatment
> 
>> plan for carbon ion therapy. In > >> Source-properties.txt
> 
>> file, > >> > > it contains 8 polynomial equations,
> each
> 
>> equation being a > >> function of > >> > >
> the
> 
>> energy at the nozzle entrance.
> 
>> > >> > >
> 
>> > >> > >  #################TPS Pencil Beam >
> 
>> >> > > > >>
> 
>> Source-Source-properties########################################
> 
>> > >> > >
> 
>> > >> > >  # Source properties > >> > >
> 
> 
>> > >> > > # Nozzle exit to Isocenter distance >
> 
>> >> > > 1405.9 > >> > > # SMX to Isocenter
> 
> 
>> distance > >> > > 4000 > >> > > # SMY
> to
> 
>> Isocenter distance > >> > > 4000 > >> >
> 
>> > > >> > > # ENERGY > >> > > # mean
> 
> 
>> energy > >> > > # polynomial order > >> >
> 
> 
>> > 1 > >> > > # polynomial parameters (highest to
> 
>> lowest) > >> > > 1 > >> > > 0 >
> 
>> >> > > > >> > > # energy spread >
> 
>> >> > > # polynomial order > >> > >
> percent
> 
>> > >> > > 1 > >> > > # polynomial
> 
>> parameters (highest to lowest) > >> > > 0.001 >
> 
>> >> > > 0 > >> > > > >> > >
> #
> 
>> SPOT x y theta phi > >> > > # x > >> >
> >
> 
>> # polynomial order > >> > > 1 > >> > >
> #
> 
>> polynomial parameters > >> > > 0 > >> >
> 
>> > 3 > >> > > # Theta > >> > > #
> 
>> polynomial order > >> > > 1 > >> > > #
> 
> 
>> polynomial parameters > >> > > 0 > >> >
> 
>> > 0.004 > >> > > # y > >> > > #
> 
>> polynomial order > >> > > 1 > >> > > #
> 
> 
>> polynomial parameters > >> > > 0 > >> >
> 
>> > 3 > >> > > # Phi > >> > > #
> 
>> polynomial order > >> > > 1 > >> > > #
> 
> 
>> polynomial parameters > >> > > 0 > >> >
> 
>> > 0.004 > >> > > > >> > > # SPOT
> 
>> emmittances > >> > > # x-theta emmittance >
> >>
> 
>> > > # polynomial order > >> > > 1 > >>
> 
> 
>> > > # polynomial parameters > >> > > 0 >
> 
>> >> > > 0.015 > >> > > # y-phi emmittance
> 
>> > >> > > # polynomial order > >> > > 1
> 
> 
>> > >> > > # polynomial parameters > >> >
> 
>> > 0 > >> > > 0.015 > >> > > >
> 
>> >> > >  #################TPS Pencil Beam > >>
> 
>> > > > >>
> 
>> Source-PlanDescriptionToGate########################################
> 
> 
>> > >> > >
> 
>> > >> > >  #TREATMENT-PLAN-DESCRIPTION > >>
> 
>> > > #PlanName > >> > > IMPT
> 
>> > >> > > #NumberOfFractions            ***
> CURRENTLY
> 
>> THIS VALUE IS
> 
>> > >> NOT USED
> 
>> > >> > >   ***
> 
>> > >> > > 1
> 
>> > >> > > ##FractionID                ***    CURRENTLY
> 
> 
>> THIS VALUE IS
> 
>> > >> NOT USED
> 
>> > >> > > ***
> 
>> > >> > > 1
> 
>> > >> > > ##NumberOfFields > >> > > 1
> 
>> > >> > > ###FieldsID > >> > > 1 >
> 
>> >> > >
> 
>> > >> > > #TotalMetersetWeightOfAllFields        ***
> 
>> CURRENTLY THIS
> 
>> > >> VALUE IS
> 
>> > >> > > NOT USED    ***
> 
>> > >> > > 662421
> 
>> > >> > >
> 
>> > >> > > #FIELD-DESCRIPTION > >> > >
> 
>> ###FieldID > >> > > 1
> 
>> > >> > > ###FinalCumulativeMeterSetWeight    ***
> 
>> CURRENTLY THIS
> 
>> > >> VALUE IS NOT
> 
>> > >> > > USED    ***
> 
>> > >> > > 336732
> 
>> > >> > > ###GantryAngle (in degrees) > >>
> >
> 
>> > 0
> 
>> > >> > > ###PatientSupportAngle            ***
> 
>> CURRENTLY THIS
> 
>> > >> VALUE IS NOT
> 
>> > >> > > USED    ***
> 
>> > >> > > 0
> 
>> > >> > > ###IsocenterPosition            ***
> 
>> CURRENTLY THIS VALUE
> 
>> > >> IS NOT
> 
>> > >> > > USED    ***
> 
>> > >> > > 0 0 0
> 
>> > >> > > ###NumberOfControlPoints > >> >
> 
>> > 1 > >> > > > >> > >
> 
>> #SPOTS-DESCRIPTION > >> > > ####ControlPointIndex
> >
> 
>> >> > > 0
> 
>> > >> > > ####SpotTunnedID            ***    CURRENTLY
> 
> 
>> THIS VALUE IS
> 
>> > >> NOT USED
> 
>> > >> > > ***
> 
>> > >> > > 0
> 
>> > >> > > ####CumulativeMetersetWeight        ***
> 
>> CURRENTLY THIS
> 
>> > >> VALUE IS NOT
> 
>> > >> > > USED    ***
> 
>> > >> > > 0
> 
>> > >> > > ####Energy (MeV) > >> > >
> 
>> 2687.52 > >> > > ####NbOfScannedSpots > >>
> 
>> > > 1 > >> > > ####X Y Weight (spot position at
> 
> 
>> isocenter in mm, with > >> weight in MU > >> >
> 
>> > (default) or number of ions "setSpotIntensityAsNbIons true")
> >
> 
>> >> > > 0 0 100 > >> > > > >>
> >
> 
>> >  I simulated the same energy beam in my > >>
> 
>> PlanDescriptionToGate.txt file > >> > > and the spot
> 
>> position is at isocenter.
> 
>> However, I find that
> 
>> > >> the dose
> 
>> > >> > > distributions with these two sources in
> water
> 
>> box were > >> different. I'm > >> > >
> puzzled
> 
>> about the parameter settings in TPS Pencil Beam > >> Source
> 
> 
>> if I > >> > > want to make them consistent with those
> 
> 
>> in Pencil Beam > >> Source > >> > >
> settings.
> 
>> How can I do?
> 
>> > >> > >
> 
>> > >> > >  Best regards, > >> > > >
> 
>> >> > >  Hui Zhang > >> > > > >>
> 
>> > > ------------------------- > >> > >
> 
>> _______________________________________________
> 
>> > >> > > Gate-users mailing list > >> >
> 
>> > Gate-users at lists.opengatecollaboration.org
> 
>> > >> > >
> 
>> > >>
> 
>> 
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists
> [4]
> 
>> 
> .opengatecollaboration.org%2Fmailman%2Flistinfo%2Fgate-users&data=
> 
> 
>> 
> 02%7C01%7Cloic.grevillot%40medaustron.at%7C7689c7e6677d4cbf737908d7fbd
> 
> 
>> 
> de75d%7Cadb749e06dfd4f6fbea8cd9f8e0c9b89%7C0%7C0%7C637254802831519922&
> 
> 
>> 
> amp;sdata=oItkB5U0cTnuuyVWvjCg0MF%2FRr%2B%2FZzCJ7Bn5BdcXKhs%3D&res
> 
> 
>> erved=0
> 
>> > >>
> 
>> > >>
> 
>> > >> ------------------------------ > >> Zhang
> 
>> HuiUniversity of Chinese Academy of Sciences > >> Institute
> 
> 
>> of Modern Physics > >>
> 
>> </zhanghui at impcas.ac.cn></jakub.baran at ifj.edu.pl>
> 
>> > >> _______________________________________________
> 
>> > >> Gate-users mailing list
> 
>> > >> Gate-users at lists.opengatecollaboration.org
> 
>> > >>
> 
>> 
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists
> [4]
> 
>> 
> .opengatecollaboration.org%2Fmailman%2Flistinfo%2Fgate-users&data=
> 
> 
>> 
> 02%7C01%7Cloic.grevillot%40medaustron.at%7C7689c7e6677d4cbf737908d7fbd
> 
> 
>> 
> de75d%7Cadb749e06dfd4f6fbea8cd9f8e0c9b89%7C0%7C0%7C637254802831519922&
> 
> 
>> 
> amp;sdata=oItkB5U0cTnuuyVWvjCg0MF%2FRr%2B%2FZzCJ7Bn5BdcXKhs%3D&res
> 
> 
>> erved=0
> 
>> 
> 
>> 
> 
>> ------------------------------
> 
>> Zhang HuiUniversity of Chinese Academy of Sciences Institute of
> Modern
> 
>> Physics </zhanghui at impcas.ac.cn></jbaran at ifj.edu.pl>
> 
> _______________________________________________
> 
> Gate-users mailing list
> 
> Gate-users at lists.opengatecollaboration.org
> 
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opengatecollaboration.org%2Fmailman%2Flistinfo%2Fgate-users&data=02%7C01%7Cloic.grevillot%40medaustron.at%7C7689c7e6677d4cbf737908d7fbdde75d%7Cadb749e06dfd4f6fbea8cd9f8e0c9b89%7C0%7C0%7C637254802831519922&sdata=oItkB5U0cTnuuyVWvjCg0MF%2FRr%2B%2FZzCJ7Bn5BdcXKhs%3D&reserved=0
> [5]
> 
> DISCLAIMER:
> Please notice our E-Mail Disclaimer
> http://www.medaustron.at/email-disclaimer/ [6]
> 
> 
> Links:
> ------
> [1]
> https://github.com/OpenGATE/GateContrib/tree/master/GATE-RTion/TPSPencilBeamSource
> [2]
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopengate.readthedocs.io%2Fen%2Flatest%2Fcompilation_instructions.html%23compilation-instructions-label&amp;data=02%7C01%7Cloic.grevillot%40medaustron.at%7C7689c7e6677d4cbf737908d7fbdde75d%7Cadb749e06dfd4f6fbea8cd9f8e0c9b89%7C0%7C0%7C637254802831509937&amp;sdata=phmMjoqNL9dXmsyN0zzMkFvqzDJjZ8NHMK%2BT2I5J98Y%3D&amp;reserved=0
> [3] 
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> [4] 
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists
> [5]
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opengatecollaboration.org%2Fmailman%2Flistinfo%2Fgate-users&amp;data=02%7C01%7Cloic.grevillot%40medaustron.at%7C7689c7e6677d4cbf737908d7fbdde75d%7Cadb749e06dfd4f6fbea8cd9f8e0c9b89%7C0%7C0%7C637254802831519922&amp;sdata=oItkB5U0cTnuuyVWvjCg0MF%2FRr%2B%2FZzCJ7Bn5BdcXKhs%3D&amp;reserved=0
> [6] http://www.medaustron.at/email-disclaimer/


More information about the Gate-users mailing list