[Ifit-users] Problems with iFit Waterfall plot of McStas scans

Emmanuel FARHI farhi at ill.fr
Thu Feb 23 15:35:46 CET 2012


Hello Henrik,

If you import mcstas.sim or dat, only the integral value is recorded
there. The solution is to import all files under the subdirectories, and
search for the monitor you want, then assemble them:

  a=iData('results'); % the full directory...

or, to only get the monitors whou want:

  a=iData({'results/0/PSD_fulllam*','results/1/PSD_fulllam*', .. });

then plot them as waterfall:

  plot(a, 'waterfall')

or even assemble then into a surface, and plot it:

  b = cat(2, a); plot(b);

As I do not know about your data, this may fails, or not show what you
want...

Emmanuel.


On Thu, February 23, 2012 14:50, Henrik Jacobsen wrote:
> Hi Emmanuel
> I have made a scan over one parameter in McStas, and I would like to make
> a
> waterfall plot of this (i.e. plotting intensity vs. wavelength and the
> scan
> parameter for an L_monitor).
>
> I thought this would work by simply using
>
> a=iData('mcstas.sim') (or 'mcstas.dat')
> b=a(14) (I want to plot monitor nr. 14)
> waterfall(b)
>
> But this only plots the integrated intensity of the monitor instead of
> intensity as function af lambda.
> Looking closer at the iData contents, it has all the parameters, MetaData,
> Headers, Parameters and PSD_fulllam_01_ERR, which must be the errorbars on
> my monitor called PSD_fulllam_01.
>
> This is weird, since that monitor is nr. 64 (the last one), while I am
> trying to plot monitor nr. 14.
>
> So it seems there are problems with the loading of the data - perhaps
> because I have many monitors?
>
> I could send you the data, but the folder is 280mb, so I'd rather not do
> that..
>
> Otherwise I'm really enjoying using iFit!
>
> Best
>
> Henrik
>


-- 
FARHI Emmanuel <farhi at ill.fr>
Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35
ILL, Grenoble




More information about the ifit-users mailing list