/********************************************************************************
* 
* 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: test_Source_custom
* 
* %Identification
* Written by: Pablo Gila-Herranz
* Date: 15:36:54 on April 04, 2025
* Origin: Materials Physics Center (CFM-MPC), CSIC-UPV/EHU
* %INSTRUMENT_SITE: Tests_sources
*
* Test instrument for the Source_custom component 
*
* %Description
* This is a test file for the Source_custom component
* Using the parameters for the HBS bi-spectral source
*
* %Parameters
* 
* %End 
********************************************************************************/

DEFINE INSTRUMENT test_Source_custom (
)

DECLARE 
%{
%}

INITIALIZE 
%{
%}

TRACE 
COMPONENT source = Source_custom(
 target_index = 1, focus_xw = 0.04,
 focus_yh = 0.04, radius = 0.022,
 r_i = 0.01, Lmin = 0.2,
 Lmax = 10, freq = 24,
 t_pulse = 0.016, tmax_multiplier = 3,
 n_pulses = 2, T1 = 60,
 I1 = 1.75E+12, tau1 = 0.00017,
 T2 = 305, I2 = 5.6E+11,
 tau2 = 0.00013, n_mod = 1,
 I_um = 3.82E+10, chi_um = 2.5)
AT (0,0,0) ABSOLUTE

COMPONENT TOF_monitor = TOF_monitor(
 nt = 100, xwidth = 0.04,
 yheight = 0.04, tmin = 0,
 tmax = 80000, restore_neutron = 1)
AT (0,0,10) ABSOLUTE

COMPONENT L_monitor = L_monitor(
 nL = 100, xwidth = 0.04,
 yheight = 0.04, Lmin = 0.2,
 Lmax = 10, restore_neutron = 1)
AT (0,0,10) ABSOLUTE

FINALLY 
%{
%}

END
