diff --git a/mcxtrace-comps/examples/SOLEIL/SOLEIL_ANATOMIX/SOLEIL_ANATOMIX.instr b/mcxtrace-comps/examples/SOLEIL/SOLEIL_ANATOMIX/SOLEIL_ANATOMIX.instr index 2c6c9ca48..0ae0cba5a 100644 --- a/mcxtrace-comps/examples/SOLEIL/SOLEIL_ANATOMIX/SOLEIL_ANATOMIX.instr +++ b/mcxtrace-comps/examples/SOLEIL/SOLEIL_ANATOMIX/SOLEIL_ANATOMIX.instr @@ -55,7 +55,7 @@ * EH3 | 165.7-174.1 | Guard slits; TXM sample stage and zone-plate table; microtomography sample stage; detector table | EH3 * EH4 | 197.2-208.5 | Guard slits; microtomography sample stage; detector table; X-ray grating interferometer | EH4 * -* %Example: -n 1e5 E0=17 Detector: psd_monitor_after_cc_I=8.7e+17 +* %Example: -n 1e5 E0=17 Detector: psd_monitor_after_cc_I=1e18 * * %Parameters * E0: [keV] Energy selected at the Undulator. @@ -76,6 +76,7 @@ DEFINE INSTRUMENT SOLEIL_ANATOMIX(E0=11, Emono=0, dE=1, ANGLE=0, string sample=" DECLARE %{ double calculated_angle; + char emonopts[128]; %} INITIALIZE @@ -91,6 +92,7 @@ INITIALIZE } else { exit(printf("%s: ERROR: Monochromator energy is outside the Undulator bandwidth.\n", NAME_INSTRUMENT)); } + sprintf(emonopts,"energy limits=[%g %g], y",E0-dE,E0+dE); %} TRACE @@ -110,7 +112,7 @@ COMPONENT e_repartition_before_cc = Monitor_nD( xwidth=0.01, yheight=0.01, restore_xray=1, - options="auto energy, y", bins=100, + options=emonopts, bins=100, filename="e_repartition_before_cc") AT (0, 0, 50) RELATIVE PREVIOUS diff --git a/mcxtrace-comps/optics/Filter.comp b/mcxtrace-comps/optics/Filter.comp index 5049729ff..f7d77a541 100644 --- a/mcxtrace-comps/optics/Filter.comp +++ b/mcxtrace-comps/optics/Filter.comp @@ -39,7 +39,7 @@ * material_datafile: [str] File where the material parameters for the filter may be found. Format is similar to what may be found off the NIST website. [Be.txt] * geometry: [str] File containing the polygon definition of a general shape object. When xwidth is also given, the object is rescaled accordingly (OFF/PLY) * fixed_delta:[0/1] Use a fixed delta to compute refraction - useful for debugging. -* refraction: [0/1] If nonzero, refraction is enabled. +* refraction: [0/1] If nonzero, refraction is enabled. (Only functional for box-geometery.) * * %Link * Meshlab https://www.meshlab.net/ @@ -57,7 +57,7 @@ *******************************************************************************/ DEFINE COMPONENT Filter -SETTING PARAMETERS (refraction=1,fixed_delta=0,string material_datafile="Be.txt", +SETTING PARAMETERS (refraction=0,fixed_delta=0,string material_datafile="Be.txt", string geometry=0,xwidth=0,yheight=0,zdepth=0,radius=0) /* X-ray parameters: (x,y,z,kx,ky,kz,phi,t,Ex,Ey,Ez,p) */ @@ -176,6 +176,12 @@ INITIALIZE Table_Rebin (&(table)); printf ("done\n"); } + if (shape != CUBE) { + if (refraction) { + fprintf (stderr, "Warning(%s): refraction=1 not supported with chosen geometry\n", NAME_CURRENT_COMP); + refraction=0; + } + } %} TRACE