RE: flair 1.0-1 and plotting 1-D projections of usrbin distributions - Is this a bug?

From: Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch>
Date: Wed, 14 Nov 2012 21:18:49 +0000

Hi Mina,

in the last respin of fluka we modified the USRBIN processing program $FLUPRO/flutil/gplevbin, to generate an output format compatible with the _tab.lis files (from usxsuw, and ustsuw) in order to be able to superimpose withing the same USR-1d plot many USRBIN 1D projections. Therefore to get the correct plot you need fluka and flair to be the latest version.

Sorry for the confusion
Vasilis Vlachoudis
Dep EN, CERN
CH-1211 GENEVA 23
SWITZERLAND

Phone: +41-22 767 9851
GSM: +41-76 487 4378
Fax: +41-22 766 9644

________________________________________
From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on behalf of Mina Nozar [nozarm_at_triumf.ca]
Sent: 14 November 2012 20:29
To: fluka-discuss_at_fluka.org; Vasilis Vlachoudis
Subject: Re: flair 1.0-1 and plotting 1-D projections of usrbin distributions - Is this a bug?

Hello everyone,

I set this issue aside while tending to other things but have had to come back to it.
I definitely see an odd behaviour when plotting 1-D projections using flair 1.0-1, even when I use plotting styles not
involving error bars, i.e. "points", "lines", "linespoints", etc.

Wed Nov 14 11:17:13 2012 Plotting: TR24_Mo100_DoseEq_Z
Starting gnuplot
set mouse
show version
Gnuplot version = 4.2
show terminal
Default terminal = x11
bin(x,m,s)=floor((x-m)/s)*s+m
logbin(x,m,s)=10**(floor((log10(x)-m)/s)*s+m)
rnd(x)=abs(int((x*1103515245+12345)/65536)%32768)
set terminal x11 3 enhanced raise title 'TR24.flair-3: TR24 - Mo100 - Dose Eq (uSv/h) - for a 2 meter slice in y around
the beam'
reset

set title 'TR24 - Mo100 - Dose Eq (uSv/h) - for a 2 meter slice in y around the beam'
set xlabel 'Z (cm)'
set ylabel 'Dose Eq (uSv/h)'
set grid
set key default
set cblabel ''
set style line 1 lt -1 lw 1
set logscale y
plot 'TR24_Mo100_DoseEq_Z.dat' us 1:($3*1.12347e+13) w points lt 1 lw 1 lc rgb 'black' pt 1 ps 1 notitle <=======

1) I no longer see the command used to generate TR24_Mo100_DoseEq_Z.dat (the data file used as input to gnuplot)
2) In the above gnuplopt command, the errorbars are plotted as a function of z and not the quantity scored because of
the $3.

3) If I choose to plot with errorbars, this is the command that is passed to gnuplot within flair:
plot 'TR24_Mo100_DoseEq_Z.dat' us 1:($3*1.12347e+13):(($3*$4/100)*1.12347e+13) w errorbars lt 1 lw 1 lc rgb 'black' pt 1
ps 1 notitle

And that's why I get the error: "line 0: x range is invalid"

When I use gnuplot directly (not via flair) with the corrected commands (i.e. the right column number used to plot the
quantity and error bars), things look fine.

plot 'TR24_Mo100_DoseEq_Z.dat' us 1:($2*1.12347e+13) w points lt 1 lw 1 lc rgb 'black' pt 1 ps 1 notitle
plot 'TR24_Mo100_DoseEq_Z.dat' us 1:($2*1.12347e+13):(($2*$3/100)*1.12347e+13) w errorbars lt 1 lw 1 lc rgb 'black' pt 1
ps 1 notitle

Does anyone know why this is happening within flair?

Thank you in advance,
Mina

On 12-11-01 01:08 PM, Mina Nozar wrote:
> Hello everyone,
>
> I am having a problem plotting 1-D projections of 2-D plots generated from a USRBIN estimator with errorbars, so
> basically all options under 'Plotting Style' that involves errorbars. I am not sure why this is.
>
> The error message I get is: " <e< line 0: x range is invalid "
>
>
> This is what the '.dat' file looks like:
> -970. 3.60040433E-16 75.3390884
> -960. 4.82170911E-16 72.745163
> -950. 4.82170911E-16 70.335434
> -940. 4.82170911E-16 100.
> -930. 4.82170911E-16 72.6674881
> -920. 4.82170911E-16 77.4434357
> -910. 4.82170911E-16 88.6815872
> -900. 4.82170911E-16 82.6831665
> -890. 4.82170911E-16 70.9556732
> -880. 4.98189045E-16 67.284584
> -870. 2.63280159E-15 22.167038
> -860. 9.28354294E-15 13.8853865
> -850. 2.48675507E-14 11.0314779
> -840. 5.83361687E-14 8.37456894
> -830. 1.20444832E-13 7.85978127
> -820. 3.04576839E-13 5.7727437
> -810. 8.30334716E-13 4.78959179
> -800. 2.10400078E-12 3.74105716
> -790. 4.89483714E-12 2.79912043
> -780. 1.29408264E-11 2.53790736
> -770. 3.35692758E-11 1.88130307
> -760. 8.68509709E-11 1.61146486
> -750. 2.13434118E-10 1.17526901
> -740. 5.33403655E-10 0.886002541
> -730. 1.33893463E-09 0.795381248
> -720. 3.36977357E-09 0.614626765
> -710. 8.44234993E-09 0.562169731
> -700. 2.11343867E-08 0.484024316
> etc...
>
> So, nothing odd about it. Is anyone else having this issue?
>
> Thanks a lot 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 6005
Received on Thu Nov 15 2012 - 09:22:51 CET

This archive was generated by hypermail 2.2.0 : Thu Nov 15 2012 - 09:22:51 CET