[mcstas-users] DiskChopper bug?

robert.dalgliesh at stfc.ac.uk robert.dalgliesh at stfc.ac.uk
Thu Aug 20 11:15:00 CEST 2015


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>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20150820/37a72443/attachment.html>


More information about the mcstas-users mailing list