Skip to content
Merged
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
20 changes: 15 additions & 5 deletions mcxtrace-comps/examples/SOLEIL/SOLEIL_PX2a/SOLEIL_PX2a.instr
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
* This is a simplified model with an Undulator, mirrors, a double crystal
* monochromator, a sample stage and a detector.
*
* %Example: E0=12.65 sample="Mo.lau" SPLITs=1500 Detector: Eiger9M_I=2.8e+11
* %Example: E0=12.65 sample="adrenaline.lau" SPLITs=4200 Detector: Eiger9M_I=1.8e+15
* %Example: E0=12.65 sample="Mo.lau" SPLITs=1500 Detector: psd4pi_I=1.75e+12
* %Example: E0=12.65 sample="adrenaline.lau" SPLITs=4200 Detector: psd4pi_I=4.4e+15
*
* %Parameters
* E0: [keV] Energy selected at the Undulator.
Expand All @@ -52,7 +52,7 @@ DEFINE INSTRUMENT SOLEIL_PX2a(
mirror_grazing_angle=4e-3,
string sample="adrenaline.lau",
rotX=0, rotY=0, rotZ=0, SPLITs=10)

DEPENDENCY " -DMCSX_REFL_SLIST_SIZE=1024 "
DECLARE
%{
double calculated_angle;
Expand All @@ -70,7 +70,17 @@ INITIALIZE
exit(fprintf(stderr, "ERROR: Monochromator can not reach this energy (arg=%g > 1)\n",
arg));
calculated_angle = RAD2DEG*asin(arg);

/* Ensure that we are running with at least 1e7 neutrons/core if not 'displaying' */
#ifndef USE_MPI
#define mpi_node_count 1
#endif
if (!mcdotrace) {
if (mcget_ncount()<=1e7) {
MPI_MASTER(printf("This instrument needs higher statistics to converge. Increasing your ncount=%llu to ",mcget_ncount()));
mcset_ncount(mpi_node_count*1e7);
MPI_MASTER(printf("%llu\n",mcget_ncount()));
}
}
%}

TRACE
Expand Down Expand Up @@ -209,7 +219,7 @@ COMPONENT sample_monitor = Monitor_nD(
AT (0, 0, 0) RELATIVE sample_stage

SPLIT SPLITs COMPONENT sample = Single_crystal(reflections=sample, material_datafile="NULL",
radius = .5e-4, yheight = 5e-3, p_transmit = 0, mosaic=0.1)
radius = .5e-4, yheight = 5e-3, p_transmit = 0, mosaic=0.1, order=1)
AT (0, 0, 0) RELATIVE sample_stage
ROTATED (rotX,rotY,rotZ) RELATIVE sample_stage
EXTEND %{
Expand Down
Loading