[mcstas-users] DiskChopper bug?

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Thu Aug 20 11:26:40 CEST 2015


Hi Rob,
(mcstas-users, nobugs list and Andrew J cc:)


As you probably know I have been on paternity leave and vacation and just came back - this is my 2nd working day… :-)

While I was away Andrew Jackson from ESS noticed that problem and was kind enough to submit a fix through GitHub - hence, the version that you can retrieve from here:

https://github.com/McStasMcXtrace/McCode/blob/master/mcstas-comps/optics/DiskChopper.comp

does not exhibit this behaviour.


Pretty serious bug - I am sorry that our tests missed it. I am planning a mcstas-2.2b in the coming month or so that will include this and other fixes.

Sorry for the inconvenience this may have caused.


Best,

Peter



Peter Kjær Willendrup
Senior Research Engineer, Special Advisor

DTU Physics



Technical University of Denmark



[cid:image002.gif at 01CCCAF1.5E6331F0]


Department of Physics
Fysikvej

Building 307

DK-2800 Kongens Lyngby

Direct +45 2125 4612

Mobil +45 2125 4612
Fax +45 4593 2399


pkwi at fysik.dtu.dk<mailto:pkwi at fysik.dtu.dk>

On 20 Aug 2015, at 11:15 , <robert.dalgliesh at stfc.ac.uk<mailto:robert.dalgliesh at stfc.ac.uk>> <robert.dalgliesh at stfc.ac.uk<mailto:robert.dalgliesh at stfc.ac.uk>> wrote:

Has anyone else noticed that the disk chopper component in 2.2a doesn’t block the beam?

The following doesn’t work on RHEL 6.4

DEFINE INSTRUMENT test(Par1=1)

DECLARE
%{
%}

INITIALIZE
%{
%}

TRACE

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

COMPONENT isis_mod = ISIS_moderator(
    Face = "crisp", dist = 6.3, focus_xw = 0.1, focus_yh = 0.1,
    xwidth = -1.0, yheight = -1.0, SAC = 1, Lmin = 0.25,
    Lmax = 20.0, verbose = 1)
  AT (0.0, 0.0, 0.0) RELATIVE Origin

COMPONENT chopper1 = DiskChopper(
    theta_0 = 77.0, radius = 0.4, yheight = 0.11, nu = 50.0,
    nslit = 1, jitter = 0.0, delay = 10000.0e-6, verbose = 1)
  AT (0.0, 0.0, 6.3) RELATIVE Origin

COMPONENT TOFmon1 = TOF_monitor(
    nt = 1000, filename = "TOFmon1.dat", xwidth = 0.15,
    yheight = 0.15, tmin = 0.0, tmax = 60000.0,
    restore_neutron = 1)
  AT (0.0, 0.0, 6.4) RELATIVE Origin

FINALLY
%{
%}
END

The error seems to be in the jitter part of the code.
This mod works at line 157 of diskchopper.comp for me.

        jitter=jitter*randnorm();
        //toff=fabs(t-atan2(x,yprime)/omega - delay - jitter ? jitter*randnorm():0);
        toff=fabs(t-atan2(x,yprime)/omega - delay - jitter );


===================================
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>

_______________________________________________
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/20150820/99bb3ab7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20150820/99bb3ab7/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20150820/99bb3ab7/attachment-0001.gif>


More information about the mcstas-users mailing list