[Gate-users] source rotation
David Sarrut
David.Sarrut at creatis.insa-lyon.fr
Wed Jan 4 14:40:17 CET 2012
Hello,
you can also "attach" your source to a volume and move the volume, see
exemple n°2 here : http://wiki.opengatecollaboration.org/index.php/GateRT
...
/gate/source/MySource/attachTo MyVolume
...
/gate/MyVolume/moves/insert genericMove
/gate/MyVolume/genericMove/setPlacementsFilename data/Myplacements.txt
See also GenericMove in :
http://wiki.opengatecollaboration.org/index.php/Users_Guide_V6:Defining_a_geometry
However, I am not 100% sure that it works with all type of source. To be
checked ...
Sincerely,
David
On Wed, Jan 4, 2012 at 14:13, Marc Chamberland <mchamber at connect.carleton.ca
> wrote:
> Hi Marcin!
>
> posrot1 and posrot2 are indeed the commands that you need to rotate your
> source. It's a bit counter-intuitive at first because these commands
> manipulate your coordinate axes, but the source is fixed relative to the
> axes. This means that your source will always be aligned with the new
> z'-axis that you define.
>
> To use the commands, you need to provide vectors. The first vector you
> provide is for posrot1: you provide the new x'-axis that you want. The
> second vector you need to provide is a vector in the x'-y' plane; this will
> define your y'- and z'-axes.
>
> It's easier to understand with an example. In your case, your source is
> currently aligned along the z-axis, but you want it aligned with the
> original x-axis. You would use the following commands:
>
> /gate/source/YOUR_SOURCE/gps/posrot1 0. 0. -1.
> /gate/source/YOUR_SOURCE/gps/posrot2 0. 1. 0.
>
> This means that you want your new coordinate system to point the x'-axis
> along the original negative z direction (i.e. a 90 degrees rotation around
> the original y-axis), and you want the new y'-axis to be the same as the
> original y-axis. Now your source is aligned along the new z'-axis, which
> happens to point along the original x-axis... which is what you wanted!
> Note that for posrot2, you need to provide a vector in the x'-y' plane, but
> I find it easier to just provide a vector along the y'-axis.
>
> And if you want to do an arbitrary rotation? Break down your rotation into
> 2 angles: 1) a rotation of theta around the original y-axis and 2) a
> rotation of phi around the new x-axis. Then, the final x'-axis is given by
> the following vector (you would use that in posrot1):
>
> ( cos(theta), 0, -sin(theta) )
>
> and the final y'-axis is given by (you would use that in posrot2):
>
> ( sin(phi)*sin(theta), cos(phi), sin(phi)*cos(theta) )
>
> Just calculate the value of these vectors with the appropriate theta and
> phi angles.
>
> I hope this helps anyone trying to rotate a source.
>
>
> Marc
>
>
>
> __________________________
>
>
> Marc Chamberland, MSc
> PhD candidate
> Department of Physics
> Carleton University
> Ottawa (ON)
>
> Le 2012-01-04 à 7:09 AM, Marcin Balcerzyk a écrit :
>
> > Hi Gaters.
> >
> >
> >
> > I wanted to create cylindrical source along x axis instead of default z
> > axis. How can I do that? Gps does not seem to have rotation parameters -
> > there are two undocumented posrot1 and posrot2 commands, but hard to
> > understand for what they are. I found some explanation at
> > http://reat.space.qinetiq.com/gps/gps_sum_files/Document.htm but it is
> not
> > clear for me.
> >
> >
> >
> > Kind regards
> >
> >
> >
> > Marcin Balcerzyk
> >
> >
> >
> > _______________________________________________
> > Gate-users mailing list
> > Gate-users at lists.opengatecollaboration.org
> > http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
--
David Sarrut, Phd
Chargé de recherche CNRS
Laboratoire CREATIS, UMR CNRS 5220, Inserm U 1044
Centre de lutte contre le cancer Léon Bérard
28 rue Laënnec, 69373 Lyon cedex 08
Tel : 04 78 78 51 51 / 06 74 72 05 42
http://www.creatis.insa-lyon.fr/rio
_________________________________
"2 + 2 = 5, for extremely large values of 2"
_________________________________
More information about the Gate-users
mailing list