[neutron-mc] Simple Question
Aaron M. Percival
percival at physics.queensu.ca
Wed Jan 10 19:40:16 CET 2007
Emmanuel,
Your suggestion worked. I was able to convert the data file from Matlab
format to the McStas format (which seems to be simple text) using
mcformat.exe. I then used excel to import only the data columns (in this
case there was theta, counts, error and intensity). I took this data from
excel into Origin, and used Origin to perform analysis. I do notice in
doing this that the Gaussian fit found in Origin gives slightly different
values for X0 and dX (the variable McStas used in Matlab) for the centre and
width of the curve respectively. The actual numbers are X0 = 99.852 dX =
6.024 (from Matlab) and X0 = 97.3, dX = 7.7, which as you can see is quite
significant.
Another interesting point to note is that the curve produced in Origin is
slightly different than the one produced in Matlab by mcplot, but they
should be produced from the same data.
Aaron.
_____
From: neutron-mc-bounces at risoe.dk [mailto:neutron-mc-bounces at risoe.dk] On
Behalf Of Emmanuel FARHI
Sent: Wednesday, January 10, 2007 10:48 AM
To: McStas users list at neutron.risoe.dk
Subject: Re: [neutron-mc] Simple Question
Hi AAron,
The idea is that axes are always regular, so that the min, max and number of
steps is sufficient to generate the axis vector. The min and max is given in
the 'xylimits' field of Matlab data structure, or on '# xylimits:' line of
PGPLOT data format file. The number of steps is written in the 'type' field
and '# type:' line as well. Then that's really easy to generate the axes
with 'linspace' function in Matlab.
the best for you is to generate the data using the PGPLOT format. If you do
not have PGPLOT you will not be able to plot it. Anyway you may use the
'mcformat' tool to convert it to e.g. Matlab format. You may also convert -
still with mcformat - your Matlab data into PGPLOT if the simulation is too
long to re-run.
E.
Aaron M. Percival wrote:
Good Day,
I have a simple question about exporting McStas data from Matlab to another
platform. I'll give an example of what I want to do:
I have a type Monitor_nD detector with the following options set, options =
"banana, theta, limits=[60,150], bins=100".
I'd like to take the data from this detector and export it to, say Origin
for further analysis. I've found in the detector file the array for the
data and the errors, however, I cannot find the array for the x-values (in
this case theta values). However, I did find something called stepx:
0.9091. Are the x-values generated by starting at (in this case) 60, then
increasing each increment by 0.9091, 100 times (since there are 100 bins)?
Regards,
Aaron M. Percival
*************************************************
Aaron M. Percival
M.Sc. Candidate
Dept. of Physics, Engineering Physics & Astronomy
Queen's University
Kingston, Ontario, Canada, K7L 3N6
Office: 613-533-6000 ext. 74789
Fax: 613-533-6463
*************************************************
_____
_______________________________________________
neutron-mc mailing list
neutron-mc at risoe.dk
http://mailman.risoe.dk/mailman/listinfo/neutron-mc
--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, http://www.ill.fr/Computing/people/Farhi \|/ ____ \|/
CS-Group BP2/22, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20070110/fce2c2e8/attachment.html>
More information about the mcstas-users
mailing list