[Gate-users] source rotation

Marcin Balcerzyk m.balcerzyk at pluri.ucm.es
Wed Jan 4 14:45:22 CET 2012


Dear Marc.

 

Thank you for your reply – does that mean that everything I already built in
my scanner (detector, phantoms etc) would sense a new coordinate system? I
wanted to rotate the source, because the system did not correctly behaved
when oriented along original z axis.

 

Kind regards

 

Marcin Balcerzyk

 

From: Marc Chamberland [mailto:mchamber at connect.carleton.ca] 
Sent: Wednesday, January 04, 2012 2:14 PM
To: Marcin Balcerzyk
Cc: gate-users at lists.opengatecollaboration.org
Subject: Re: [Gate-users] source rotation

 

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

 



More information about the Gate-users mailing list