Skip to content

Commit 55e7827

Browse files
committed
Provide input-parameter handles to switch monitors on/off
(Should let instrument compile and run on GPU/OpenACC)
1 parent e9d540e commit 55e7827

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

mcstas-comps/examples/ISIS/ISIS_LET/ISIS_LET.instr

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,30 @@
1919
* %Example: Ei=3.7 res=HR Detector: sample_PSDmon_I=8835.3
2020
*
2121
* %P
22-
* Ei: [meV] Centre energy for moderator
23-
* dE: [] Multiplier for energy spread: Emin = Ei/dE, Emax = Ei*dE
24-
* Ch3_speed: [Hz] Chopper 3 frequency
25-
* Ch5_speed: [Hz] Chopper 5 frequency
26-
* Ch2_phase: [mus] Chopper 2 phase setting
27-
* pha_offset: [mus] Offset in time for moderator focus
28-
* res: [string] "HF" - High Flux, "HR" - High Resolution, "I" - Intermediate
29-
* snout: [string] "in" or "out"
22+
* Ei: [meV] Centre energy for moderator
23+
* dE: [] Multiplier for energy spread: Emin = Ei/dE, Emax = Ei*dE
24+
* Ch3_speed: [Hz] Chopper 3 frequency
25+
* Ch5_speed: [Hz] Chopper 5 frequency
26+
* Ch2_phase: [mus] Chopper 2 phase setting
27+
* pha_offset: [mus] Offset in time for moderator focus
28+
* res: [string] "HF" - High Flux, "HR" - High Resolution, "I" - Intermediate
29+
* snout: [string] "in" or "out"
30+
* monitors_on: [1] Flag to enable/disable TOF monitors in primary optics
31+
* movable_monitors: [1] Flag to enable/disable PSDs and Div monitors in primary optics
3032
*
3133
* %L
3234
* %E
3335
*******************************************************************************/
3436

3537
DEFINE INSTRUMENT ISIS_LET(Ei = 3.7, dE=1.1, Ch3_speed=100, Ch5_speed=200, Ch2_phase=95000,
36-
pha_offset=80e-6, string res="HF", string snout = "out")
38+
pha_offset=80e-6, string res="HF", string snout = "out", int monitor_on=0, int movable_monitors=0)
3739

3840
DECLARE
3941
%{
4042
double SE2K, v_foc, emin, emax, lam_min, lam_max, jitter=7e-7;
4143
double Ch1_speed, Ch2_speed=10, Ch2_offset=14500, Ch4_speed, Ch5_slit, snout_length;
4244
double L_Ch1=7.833, L_Ch2=8.200, L_Ch3=11.749, L_Ch4=15.664, L_Ch5=23.499;
4345
double L_sample=25, L2=3.5, Ch1_5_halfgap=0.005, smidge = 0.001;
44-
int monitors_on=0, movable_monitors=0;
4546
%}
4647

4748
INITIALIZE

0 commit comments

Comments
 (0)