Commit ea246d53 authored by Islam, Fahima's avatar Islam, Fahima
Browse files

Upload New File

parent 4ae41353
Loading
Loading
Loading
Loading
+153 −0
Original line number Diff line number Diff line
/********************************************************************************
* 
* McStas, neutron ray-tracing package
*         Copyright (C) 1997-2008, All rights reserved
*         Risoe National Laboratory, Roskilde, Denmark
*         Institut Laue Langevin, Grenoble, France
* 
* This file was written by McStasScript, which is a 
* python based McStas instrument generator written by 
* Mads Bertelsen in 2019 while employed at the 
* European Spallation Source Data Management and 
* Software Centre
* 
* Instrument NOMAD_jupyter
* 
* %Identification
* Written by: Python McStas Instrument Generator
* Date: 10:27:00 on November 27, 2024
* Origin: ESS DMSC
* %INSTRUMENT_SITE: Generated_instruments
* 
* 
* %Parameters
* 
* %End 
********************************************************************************/

DEFINE INSTRUMENT NOMAD_jupyter (
s3l = 1.1, 
s3r = 1.1, 
s3t = 1.1, 
s3b = 1.1, 
s4l = 1.1, 
s4r = 1.1, 
s4t = 1.1, 
s4b = 1.1 
)

DECLARE 
%{
  double s3xmin;
  double s3xmax;
  double s3ymin;
  double s3ymax;
  double s4xmin;
  double s4xmax;
  double s4ymin;
  double s4ymax;
  

%}

INITIALIZE 
%{
   s3xmin = (-s3r)/1000;
   s3xmax = (s3l)/1000;
   s3ymin = (-s3b)/1000;
   s3ymax = (s3t)/1000;

   s4xmin = (-s4r)/1000;
   s4xmax = (s4l)/1000;
   s4ymin = (-s4b)/1000;
   s4ymax = (s4t)/1000;

%}

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

COMPONENT source = SNS_source(
 filename = "a1G0AD-2-f5.dat", xwidth = 0.1,
 yheight = 0.12, dist = 7.17119,
 focus_xw = 0.067, focus_yh = 0.08,
 Emin = 0.01, Emax = 10000)
AT (0,0,0) RELATIVE Origin

COMPONENT band_width_chopper1 = DiskChopper(
 theta_0 = 131.8, radius = 0.319,
 yheight = 0.134, nu = 60,
 nslit = 1, delay = 0.00270379)
AT (0,0,7.095) RELATIVE Origin

COMPONENT guide1 = Guide_gravity(
 w1 = 0.06662, h1 = 0.0792,
 w2 = 0.06135, h2 = 0.07204,
 l = 1.747, R0 = 0.99,
 Qc = 0.021, alpha = 5.707,
 m = 3, W = 0.003)
AT (0,0,7.17119) RELATIVE Origin

COMPONENT band_width_chopper2 = DiskChopper(
 theta_0 = 160.8, radius = 0.319,
 yheight = 0.134, nu = 60,
 nslit = 1, delay = 0.00342235)
AT (0,0,8.95) RELATIVE Origin

COMPONENT Guide2 = Guide_gravity(
 w1 = 0.06042, h1 = 0.07095,
 w2 = 0.05088, h2 = 0.05835,
 l = 2.8301, R0 = 0.99,
 Qc = 0.021, alpha = 5.707,
 m = 3, W = 0.003)
AT (0,0,9.04265) RELATIVE Origin

COMPONENT band_width_chopper3 = DiskChopper(
 theta_0 = 204, radius = 0.319,
 yheight = 0.134, nu = 60,
 nslit = 1, delay = 0.00455455)
AT (0,0,11.94) RELATIVE Origin

COMPONENT Guide3 = Guide_gravity(
 w1 = 0.0498, h1 = 0.05711,
 w2 = 0.03398, h2 = 0.03702,
 l = 3.78, R0 = 0.99,
 Qc = 0.021, alpha = 5.707,
 m = 3, W = 0.003)
AT (0,0,12.03175) RELATIVE Origin

COMPONENT t0_chopper = DiskChopper(
 theta_0 = 339, radius = 0.25,
 yheight = 0.25, nu = 60,
 nslit = 1, delay = 0.00837365)
AT (0,0,15.84) RELATIVE Origin

COMPONENT Guide4 = Guide_gravity(
 w1 = 0.02837, h1 = 0.0309,
 w2 = 0.016, h2 = 0.016,
 l = 2.023, R0 = 0.99,
 Qc = 0.021, alpha = 5.707,
 m = 3, W = 0.003)
AT (0,0,16.3708) RELATIVE Origin

COMPONENT slit3 = Slit(
 xmin = s3xmin, xmax = s3xmax,
 ymin = s3ymin, ymax = s3ymax)
AT (0,0,18.5) RELATIVE Origin

COMPONENT slit4 = Slit(
 xmin = s4xmin, xmax = s4xmax,
 ymin = s4ymin, ymax = s4ymax)
AT (0,0,19.25) RELATIVE Origin

COMPONENT saveN = MCPL_output(
 filename = "neutrons_b4_sample")
AT (0,0,19.25) RELATIVE Origin

FINALLY 
%{
// Start of finally for generated NOMAD_jupyter
%}

END