[mcstas-users] mantid output test

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Tue Nov 25 13:12:05 CET 2014


Dear Rob,


You have indeed stumbled across a proper bug - it seems what I implemented in mcdisplay for generation of the IDF implicitly assumes n>1 bins… :-) I will test for the special case of n=1 bins in the next released mcdisplay.

I am able to generate the IDF and NeXus output if I define an event monitor with 2x2 bins which loads OK into Mantid.

(My Mantid then on the other hand crashes when I attempt to show the instrument… This may or may not be my recently updated Mac OS X Yosemite, not clear…. - But “color fill plot” can be done)


Best,

Peter




On 25 Nov 2014, at 12:13 , robert.dalgliesh at stfc.ac.uk<mailto:robert.dalgliesh at stfc.ac.uk> wrote:

Hi,
I’ve been brave and tried the Mantid output option in mcstas this morning.
I’m using mcstas 2.1 and mantid 3.2.1 on a Redhat 6.4 box.
There seems to be no problem with the installed NeXus and hdf libraries the simulation runs fine.

The problem comes when I try following the instructions to generate the IDF file.

This is the simple instrument I’ve tried some of the variables would be picked up in later components.

/* Change name of instrument and input parameters with default values */
DEFINE INSTRUMENT test(s1=0.03,s2=0.02,s3=0.008,bs=0.05,cdel=0.0,sampdet=4.406,lmin=0.5,lmax=13.0,dang=0.0)

DECLARE
%{
%}

INITIALIZE
%{
%}

TRACE

COMPONENT Origin = Progress_bar()
  AT (0,0,0) ABSOLUTE

COMPONENT sourceMantid = ISIS_moderator(
    Face = "hydrogen", Lmax = lmax, Lmin = lmin, dist = 3.7,
    focus_xw = 0.03, focus_yh = 0.03, xwidth = 0.083, yheight = 0.033,
    CAngle = 0.0, SAC = 1)
  AT (0.0, 0.0, 0.0) RELATIVE PREVIOUS

COMPONENT guide1 = Guide(
    w1 = 0.03, h1 = 0.03, w2 = 0.03, h2 = 0.03, l = 5.3, m = 3.0)
  AT (0.0, 0.0, 3.7) RELATIVE Origin

COMPONENT disk1 = DiskChopper(
    theta_0 = 111.0, radius = 0.27, yheight = 0.04, nu = 10.0, nslit = 1,
    jitter = 0.0, delay = 0.015417+0.00012222+cdel*1.0e-6)
  AT (0.0, 0.0, 9.689) ABSOLUTE
  ROTATED (0.0, 0.0, 90.0) ABSOLUTE

COMPONENT disk2 = DiskChopper(
    theta_0 = 111.0, radius = 0.27, yheight = 0.04, nu = -10.0, nslit = 1,
    jitter = 0.0, delay = 0.015417+0.00012222+cdel*1.0e-6)
  AT (0.0, 0.0, 9.739) ABSOLUTE
  ROTATED (0.0, 0.0, 90.0) ABSOLUTE

COMPONENT nD_Mantid_0 = Monitor_nD(
   options ="mantid square x limits =[-0.0155 0.0155] bins=1 y limits =[-0.0155 0.0155] bins=1, neutron pixel t, list all neutrons",
   xmin = -0.0155, xmax = 0.0155, ymin = -0.0155, ymax = 0.0155, restore_neutron = 1, filename = "monitor1Events.dat")
AT (0, 0, 9.8195) RELATIVE sourceMantid

The xml file resulting from this when I run the command

mcdisplay --format=Mantid Test_Mantid.instr  -n0

after compiling chucks out this message

Illegal division by zero at /usr/local/bin/mcdisplay line 391, <IN> line 73.

And proceeds to dump an enormously long xml file with a huge number of weird repeated components.

Any hints as to what is messing things up would be greatly appreciated.

Thanks

Rob

===================================
Dr. Robert Dalgliesh
ISIS
STFC Rutherford Appleton Laboratory
R3 1.29
Harwell Oxford
Didcot
OX11 0QX
Office Tel: +44 (0) 1235 445687 or OffSpec Instrument: +44 (0) 1235 567045
Internal Mobile Extension: 1176
e-mail: robert.dalgliesh at stfc.ac.uk<mailto:robert.dalgliesh at stfc.ac.uk>



--
Scanned by iCritical.

_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20141125/864440f6/attachment.html>


More information about the mcstas-users mailing list