Open zhangyujun08 opened 2 months ago
On the documentation page Tests for Materials one can see reflectivity curves for various asymmetry angles (alphas). The script that makes these curves is tests/raycing/test_materials.py
. Look for compare_rocking_curves()
in it for flat crystals and compare_rocking_curves_bent()
for bent ones.
Thanks a lot! This solves my problem.
Konstantin Klementiev @.***> 于2024年6月24日周一 16:00写道:
On the documentation page Tests for Materials https://xrt.readthedocs.io/test_materials.html#test-materials one can see reflectivity curves for various asymmetry angles (alphas). The script that makes these curves is tests/raycing/test_materials.py. Look for compare_rocking_curves() in it.
— Reply to this email directly, view it on GitHub https://github.com/kklmn/xrt/issues/181#issuecomment-2185858919, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDKPXCLMAKBQBIFSWQVSJMTZI7G2PAVCNFSM6AAAAABJZAFZO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVHA2TQOJRHE . You are receiving this because you authored the thread.Message ID: @.***>
Another related question. Now I understand that by using get_amplitude(E, beamInDotNormal, beamOutDotNormal, beamInDotHNormal), reflectivity can be calculated for asymmetrically cut crystals. However, here beamInDotNormal, beamOutDotNormal, and beamInDotHNormal all correspond to the angles within the crystal. Is there any way to calculate the angles outside the crystal (the angle of incidence and emergence)? Thank you very much!
beamInDotNormal
is cosine of the angle of incidence counted from the normal. Subtract it from π/2 to have it relative to the surface.
The emergence direction for a general asymmetric case is given by the grating equation as explained in the docs with a reference to Sánchez del Río and Cerrina.
Thanks for your instruction.
So does it mean that I need to implement these following formula into the code by myself? Or is there an easier way to do it?
I thought you didn't want any optical element, did you? The method reflect()
does the job: it finds a new propagation direction for each ray and applies material reflectivity/transmittivity. As you don't want it, you need to implement these formulas yourself.
Thanks a lot! I will try both ways, either implementing the formulas or using reflect() method.
Konstantin Klementiev @.***> 于2024年6月27日周四 20:09写道:
I thought you didn't want any optical element, did you? The method reflect() does the job: it finds a new propagation direction for each ray and applies material reflectivity/transmittivity. As you don't want it, you need to implement these formulas yourself.
— Reply to this email directly, view it on GitHub https://github.com/kklmn/xrt/issues/181#issuecomment-2194519719, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDKPXCO5AZ6O76FWMXVLBNDZJP6IXAVCNFSM6AAAAABJZAFZO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUGUYTSNZRHE . You are receiving this because you authored the thread.Message ID: @.***>
I hope to calculate energy spectra of multi-bounce monochromators with xrt. Since I only care about the spectrum and do not need real space information, I am trying to calculate without constructing a beamline. I tried racing.materials.crystal.get_amplitude and it worked well. When I input the array of incident angle, it returns the array of reflectivity. But one problem I encounter is that this function does not allow me to define an angle of asymmetry (alpha) for the crystal. I found in the documentation that there is a get_amplitude_pytte function, which allows to do this, but when I define alpha, the output seems to be always exactly the same as alpha=0, no matter how I change the alpha. Could you please provide some solutions? Thanks a lot!