From: Mina Nozar <nozarm_at_triumf.ca>

Date: Fri, 12 Oct 2012 16:36:59 -0700

Date: Fri, 12 Oct 2012 16:36:59 -0700

Thank you Mario,

I did not take the example you sent me literally, I took your suggestion and looked at the gnuplot command in the flair

execution window. The mistake I made was not flipping the geometry axis as well (well, I actually didn't know how till

I looked at your example). This worked:

splot 'TR24_Mo100_BPdistXZ_lg.dat' us 1:(-$2):3 notitle ,'Geometry-PlanView.dat' ind 0 us 5:(-$3):(0) w l ls 1 notit

I didn't know the last bit, i.e. "ind 0 us 5:(-$3):(0) w l ls 1 notit" dealt with the geometry axes. And can't make the

connection between the numbers and axes (i.e. how does z axis get the number 5 assignment while x number 3?).

So it works now. THANK you again for the guidance.

Still, I would like to hear from Vasillis as to why the default behaviour would require the above playing around. I

would understand it if someone wanted to change view points from that used in the geo-viewer/geo-editor, when plotting

2-D distribution of quantities from the usrbin estimator.

Wish you the best,

Mina

On 12-10-12 02:40 PM, Santana, Mario wrote:

*> Hi Mina,
*

*>
*

*> It is difficult to understand through text how exactly things should look like (i.e. where's the beam with respect to the geometry, orientation, preferred viewing projection...).
*

*> In the example that I sent earlier, I just wanted to show the knobs you have to customize your plot. It was not meant to be used literarily. If the usrbin plot looks like you want it to look like, I suggest that you play with the axis of the 'TR24_Mo100_BPdistXZ_lg.geo.dat' (not Geometry-PlanView.dat), as I showed in my previous example, for instance swap axis 3:5:(0) instead of 5:3:(0), OR/AND apply reflections, e.g. (-$5):3:(0). If you know what you are doing you will get it right away, otherwise it should just take a couple of trials till you properly underlay your geometry with your data in the wished projection.
*

*>
*

*> Mario
*

*>
*

*> -----Original Message-----
*

*> From: Mina Nozar [mailto:nozarm_at_triumf.ca]
*

*> Sent: Friday, October 12, 2012 12:58 PM
*

*> To: Santana, Mario
*

*> Cc: Vasilis Vlachoudis; fluka-discuss_at_fluka.org
*

*> Subject: Re: How to keep the coordinate system the same when plotting usrbin distributions
*

*>
*

*> Hello Mario,
*

*>
*

*> Thank you for your suggestion. I just realized that the png files saved directly through flair were of size zero! This happens when I save images in png format through flair. This time, I saved them as eps files and converted them to png to reduce the sizes.
*

*>
*

*> As you will see in the Geometry-XZ.png file, the coordinate system I have chosen (a right-handed system) is such that y is pointing up with xz in the plane of the beam. In the case of this cyclotron, there is more than one beam line and target. I have started with two beamlines on the left side of the cyclotron. There will be at least one more on the right side. So in this plan view, we are looking down. The geometry plot looks as I have constructed the geometry in the input file.
*

*>
*

*> The second image, TR24_Mo100_BPdistXZ_lg_orig.png, is the beam particle distribution for the target that sits off of the top beamline but as you can see flair shows the reflected image (x -> -x).
*

*>
*

*> If I follow what you suggested, i.e.
*

*> splot 'TR24_Mo100_BPdistXZ_lg.dat' us 1:(-$2):3 notitle ,'Geometry-PlanView.dat' ind 0 us 5:3:(0) w l ls 1 notit I get TR24_Mo100_BPdistXZ_lg.png, where the beam distribution is plotted correctly but the geometry itself is not reflected to match the reality. How do I get around this?
*

*>
*

*> I guess my question is why does the flip (reflection) happen to begin with if I am not specifically asking for it? I would like to see the distributions overlayed the geometry as constructed.
*

*>
*

*> Thank you again Mario.
*

*> Best wishes,
*

*> Mina
*

*>
*

*>
*

*> On 12-10-12 10:10 AM, Santana, Mario wrote:
*

*>> Hi Mina,
*

*>>
*

*>> I guess that if you use the 'standard' CERN reference frame (z=beam, x=up, y horizontal) then that will not happen.
*

*>>
*

*>> Otherwise, you can easily get around this by customizing your plot in the gnuplot instruction box.
*

*>> For instance, if you have a plot called "topview", you will type something like:
*

*>>
*

*>> splot 'topview.dat' us (-$1):($2):($3*1E5) notitle, 'topview.geo.dat'
*

*>> ind 0 us (-$4):3:(0) w l ls 1 notit
*

*>>
*

*>> Where 1E5 is the normalization factor in my example. You may have to use the 'plot' and 'replot' keys and play around with the axis definitions.
*

*>> It is useful to look at the flair output window to see what it is interpreted.
*

*>>
*

*>>
*

*>> Hope this helps,
*

*>>
*

*>> Mario
*

*>>
*

*>>
*

*>>
*

*>> -----Original Message-----
*

*>> From: owner-fluka-discuss_at_mi.infn.it
*

*>> [mailto:owner-fluka-discuss_at_mi.infn.it] On Behalf Of Mina Nozar
*

*>> Sent: Thursday, October 11, 2012 12:18 PM
*

*>> To: Vasilis Vlachoudis; fluka-discuss_at_fluka.org
*

*>> Subject: How to keep the coordinate system the same when plotting
*

*>> usrbin distributions
*

*>>
*

*>> Hello everyone,
*

*>>
*

*>> I have noticed that when plotting quantities scored via usrbin, the vertical axis is reversed (+ to - and vice versa).
*

*>> This doesn't happen when plotting the geometry (plan view of the layout for instance). How can one keep the viewpoint the same when looking at 2D plots of a 3D distribution? I am not sure why this happens in the first place since it makes visualizing things difficult.
*

*>>
*

*>> Attached please find two plots which show this effect. The first one is a simple geometry plot of the setup where the axis directions are the same as constructed in the geometry. The second one is the beamparticle distribution on the same plane. Here the vertical axis (X in my case) is flipped by default.
*

*>>
*

*>> Thanks and best wishes,
*

*>> Mina
*

*>
*

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mina Nozar, PhD Scientific Computing Analyst TRIUMF 4004 Wesbrook Mall Vancouver, BC, V6T 2A3 http://www.triumf.ca nozarm_at_triumf.ca (604)222-1047 ext 6005Received on Sat Oct 13 2012 - 12:39:26 CEST

*
This archive was generated by hypermail 2.2.0
: Sat Oct 13 2012 - 12:39:57 CEST
*