Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions mcstas-comps/union/Union_abs_logger_1D_space.comp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -81,7 +82,7 @@ DEFINE COMPONENT Union_abs_logger_1D_space

SETTING PARAMETERS(string target_geometry="NULL",
yheight, n=100,
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -519,10 +520,12 @@ TRACE
SAVE
%{
// Write to disk
DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
&this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
if (!nowritefile) {
DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
&this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
}
%}

FINALLY
Expand Down
7 changes: 5 additions & 2 deletions mcstas-comps/union/Union_abs_logger_1D_space_event.comp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -90,7 +91,7 @@
DEFINE COMPONENT Union_abs_logger_1D_space_event

SETTING PARAMETERS(string target_geometry="NULL", yheight, int n, int fake_event=0,
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -615,7 +616,9 @@ TRACE

SAVE
%{
Monitor_nD_Save (&(this_abs_storage.DEFS), &(this_abs_storage.Vars));
if (!nowritefile) {
Monitor_nD_Save (&(this_abs_storage.DEFS), &(this_abs_storage.Vars));
}
%}

FINALLY
Expand Down
13 changes: 8 additions & 5 deletions mcstas-comps/union/Union_abs_logger_1D_space_tof.comp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -85,7 +86,7 @@ DEFINE COMPONENT Union_abs_logger_1D_space_tof
SETTING PARAMETERS(string target_geometry="NULL",
yheight, n=0.2,
time_min=0, time_max=1, time_bins=100,
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -580,10 +581,12 @@ TRACE
SAVE
%{
// Write to disk
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
*this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
if (!nowritefile) {
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
*this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
}
%}

FINALLY
Expand Down
13 changes: 8 additions & 5 deletions mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -119,7 +120,7 @@ SETTING PARAMETERS(string target_geometry="NULL",
lambda_m_min=-1, lambda_m_max=-1, lambda_m_bins=-1,
lambda_t_min=-1, lambda_t_max=-1, lambda_t_bins=-1,
relative_measured=0, relative_min=0.5, relative_max=1.5, relative_bins=100,
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -784,10 +785,12 @@ TRACE
SAVE
%{
// Write to disk
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
*this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
if (!nowritefile) {
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
*this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
}
%}

FINALLY
Expand Down
13 changes: 8 additions & 5 deletions mcstas-comps/union/Union_abs_logger_1D_time.comp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
* init: [string] name of Union_init component (typically "init", default)
* time_min: [s] Minimum time to log
* time_max: [s] Maximum time to log
* nowritefile: [1] If set, logger will skip writing to disk
*
* OUTPUT PARAMETERS:
*
Expand All @@ -85,7 +86,7 @@ DEFINE COMPONENT Union_abs_logger_1D_time
DEFINITION PARAMETERS ()
SETTING PARAMETERS(string target_geometry="NULL",
time_min=0, time_max, n=100,
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
OUTPUT PARAMETERS ()

/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -503,10 +504,12 @@ TRACE
SAVE
%{
// Write to disk
DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
&this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
if (!nowritefile) {
DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
&this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
}
%}

FINALLY
Expand Down
13 changes: 8 additions & 5 deletions mcstas-comps/union/Union_abs_logger_2D_space.comp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -92,7 +93,7 @@ DEFINE COMPONENT Union_abs_logger_2D_space
SETTING PARAMETERS(string target_geometry="NULL",
string D_direction_1="x", D1_min=-0.2, D1_max=5, n1=0.2,
string D_direction_2="z", D2_min=-0.2, D2_max=5, n2=0.2,
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -641,10 +642,12 @@ TRACE
SAVE
%{
// Write to disk
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
*this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
if (!nowritefile) {
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
*this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
}
%}

FINALLY
Expand Down
7 changes: 5 additions & 2 deletions mcstas-comps/union/Union_abs_logger_event.comp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
* ybins: [1] Number of bins along y in logging volume
* zbns: [1] Number of bins along z in logging volume
* init: [string] Name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -87,7 +88,7 @@ DEFINE COMPONENT Union_abs_logger_event

SETTING PARAMETERS(string target_geometry="NULL", string filename="NULL",
xwidth=0, xbins=0, yheight=0, ybins=0, zdepth=0, zbins=0,
order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -693,7 +694,9 @@ TRACE

SAVE
%{
Monitor_nD_Save (&this_abs_storage.DEFS, &this_abs_storage.Vars);
if (!nowritefile) {
Monitor_nD_Save (&this_abs_storage.DEFS, &this_abs_storage.Vars);
}
%}

FINALLY
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/union/Union_abs_logger_nD.comp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
* username9: [str] Name assigned to User9
* restore_neutron: [0|1] Not functional for Union version
* geometry: [str] Name of an OFF file to specify a complex geometry detector
* nowritefile: [1] Not functional for Union version
* nowritefile: [1] If set, logger will skip writing to disk
* nexus_bins: [1] NeXus mode only: store component BIN information <br>(-1 disable, 0 enable for list mode monitor, 1 enable for any montor)
*
* OUTPUT PARAMETERS:
Expand Down
13 changes: 8 additions & 5 deletions mcstas-comps/union/Union_logger_1D.comp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -70,7 +71,7 @@

DEFINE COMPONENT Union_logger_1D

SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL", min_value, max_value, n1=90, string variable="time",string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init")
SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL", min_value, max_value, n1=90, string variable="time",string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -588,10 +589,12 @@ TRACE
SAVE
%{
// Write to disk
DETECTOR_OUT_1D (this_storage.Detector_1D.title_string, this_storage.Detector_1D.string_axis, this_storage.Detector_1D.string_axis_value,
this_storage.Detector_1D.string_axis_short, this_storage.Detector_1D.min, this_storage.Detector_1D.max, this_storage.Detector_1D.bins,
&this_storage.Detector_1D.Array_N[0], &this_storage.Detector_1D.Array_p[0], &this_storage.Detector_1D.Array_p2[0],
this_storage.Detector_1D.Filename);
if (!nowritefile) {
DETECTOR_OUT_1D (this_storage.Detector_1D.title_string, this_storage.Detector_1D.string_axis, this_storage.Detector_1D.string_axis_value,
this_storage.Detector_1D.string_axis_short, this_storage.Detector_1D.min, this_storage.Detector_1D.max, this_storage.Detector_1D.bins,
&this_storage.Detector_1D.Array_N[0], &this_storage.Detector_1D.Array_p[0], &this_storage.Detector_1D.Array_p2[0],
this_storage.Detector_1D.Filename);
}
%}


Expand Down
13 changes: 8 additions & 5 deletions mcstas-comps/union/Union_logger_2DQ.comp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, uwsing the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
Expand All @@ -76,7 +77,7 @@ SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",
string Q_direction_1="x", Q1_min=-5,Q1_max=5, n1=90,
string Q_direction_2="z", Q2_min=-5,Q2_max=5, n2=90,
string filename="NULL", order_total=0, order_volume=0,
order_volume_process=0,logger_conditional_extend_index=-1, string init="init")
order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down Expand Up @@ -669,10 +670,12 @@ TRACE
SAVE
%{
// Write to disk
DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
*this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
if (!nowritefile) {
DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
*this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
}
%}

FINALLY
Expand Down
Loading
Loading