-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doubt in Test_grating_trans.instr #1594
Comments
Hi Veronica, It looks like Erik has tested this model in the frame of a Chandra study. We have tested the grating_reflect component, but not the one in transmission. However, it looks we actually see the fringes, which is fine to me. Regarding your EtOH sample, it looks a bit thick (1 cm with X-rays is huge), which actually absorbs the whole beam. I would recommend to rather use the Fluorescence sample which also handles absorption and is much more realistic. The syntax is also more flexible, and you can simply enter the chemical formulae. |
Hi! I am using McXtrace for the purpose of simulating X-ray dark field images. For this I need a transmission grating (like the one in the template example Test_grating_trans.instr).
But Test_grating_trans.instr does not include any sample... so we have modified the code and inserted a sphere of ethanol.txt and radius 0.01m (Test_grating_trans_upv.instr). The problem is that we don't know if what is observed in psd_giant when there is sample is what would be expected....
With no sample:
With sample:
Do you have any example where the Grating_trans and an Absorption_sample have been used? When using the grid, the source type has to be Source_div?
I attach the instrument file and the results. Thank you very much for your attention!
Code Test_grating_trans_upv.instr:
DEFINE INSTRUMENT Test_grating_trans(E0=1, dE=0.001, GD=1, Rx=0, Ry=0,Rz=0, int MEG=0)
DECLARE
%{
%}
INITIALIZE
%{
%}
TRACE
COMPONENT origin = Progress_bar()
AT (0, 0, 0) RELATIVE ABSOLUTE
// insert components here (e.g. Insert -> Source -> ...)
COMPONENT src_div = Source_div(xwidth=2e-8,yheight=0.15, focus_aw=0.001, focus_ah=0, E0=E0, dE=dE)
AT(0,0,0) RELATIVE origin
/*COMPONENT absorption_sample = Absorption_sample(
material_datafile_o="ethanol.txt",
radius_o=0.01,
yheight_o=0)
AT (0, 0, 0.7) RELATIVE origin */
COMPONENT MEG_1a = Arm()
AT(0,0,1) RELATIVE origin
COMPONENT MEG_1 = Grating_trans(
xwidth=0.15, yheight=0.15, gamma=0.3, period=4000e-10, zdepth=3600e-10, max_order=3, material="Au.txt"
)
WHEN(MEG) AT(0,0,0) RELATIVE MEG_1a
ROTATED (Rx,Ry,Rz) RELATIVE origin
COMPONENT HEG4 = Grating_trans(
xwidth=0.15, yheight=0.15, gamma=0.4, period=2000e-10, zdepth=5100e-10, max_order=3, material="Au.txt"
)
WHEN(!MEG) AT(0,0,0) RELATIVE MEG_1a
ROTATED(Rx,Ry,Rz) RELATIVE origin
COMPONENT psd_giant = PSD_monitor(xwidth=0.2, yheight=0.2, filename="psd_giant",ny=1000,nx=1000)
AT(0,0,GD) RELATIVE MEG_1a
FINALLY
%{
%}
END
The text was updated successfully, but these errors were encountered: