Comments (18)
Can I plot the light source image at the light source point?
Yes, find the example examples/withRaycing/09_Gratings/GratingFlexPES.py
and look for ''beamSource' in it. There is a plot of its xz distributions that is commented out in this example. In general, you can plot beam arrays “x”, “y”, “z”, “x’”, “z’”, “energy” and some others of any beam that you create in your run_process()
.
is the unit of divergence angle of a light source in radians?
Yes, unless it is specifically stated differently, like for undulators where for historical reasons the angular limits are in mrad.
can I set the curvature radius of the analytical crystal to infinity
Yes, you can give it a very big value or np.inf
.
from xrt.
Hi,
The meaning of source parameters is explained in the docs.
How can I set the X-ray energy I need?
You set the value of energies field of your source instance. The interpretation of energies depends on the value of distE.
In the same example, there are three versions of energy definition:
beamLine.sources[0].distE = 'flat'
beamLine.sources[0].energies = eAxisMin, eAxisMax
beamLine.sources[0].distE = 'lines'
beamLine.sources[0].energies = E0,
beamLine.sources[0].distE = 'lines'
beamLine.sources[0].energies = [E0 + dEStep * i for i in range(-3, 4)]
from xrt.
Hi,
The meaning of source parameters is explained in the docs.
How can I set the X-ray energy I need?
You set the value of energies field of your source instance. The interpretation of energies depends on the value of distE.
In the same example, there are three versions of energy definition:
beamLine.sources[0].distE = 'flat' beamLine.sources[0].energies = eAxisMin, eAxisMax
beamLine.sources[0].distE = 'lines' beamLine.sources[0].energies = E0,
beamLine.sources[0].distE = 'lines' beamLine.sources[0].energies = [E0 + dEStep * i for i in range(-3, 4)]
Hello! Thank you for your answer. At the same time, I would like to know how the Takagi Taupin equation is reflected in the code, but I was unable to find it in the code for this example. I hope you can give me some guidance.
Hi,
The meaning of source parameters is explained in the docs.
How can I set the X-ray energy I need?
You set the value of energies field of your source instance. The interpretation of energies depends on the value of distE.
In the same example, there are three versions of energy definition:
beamLine.sources[0].distE = 'flat' beamLine.sources[0].energies = eAxisMin, eAxisMax
beamLine.sources[0].distE = 'lines' beamLine.sources[0].energies = E0,
beamLine.sources[0].distE = 'lines' beamLine.sources[0].energies = [E0 + dEStep * i for i in range(-3, 4)]
Hello! Thank you for your answer. At the same time, I would like to know how the Takagi Taupin equation is reflected in the code, but I was unable to find it in the code for this example. I hope you can give me some guidance.
from xrt.
If you look at the same compiled doc strings (here), you would see that the link the Takagi-Taupin equations <useTT>
leads you to the useTT parameter of the Crystal
class. There is a variable with the same name in the script that you may want to change.
from xrt.
If you look at the same compiled doc strings (here), you would see that the link
the Takagi-Taupin equations <useTT>
leads you to the useTT parameter of theCrystal
class. There is a variable with the same name in the script that you may want to change.
First of all, thank you for your reply. Through the document you provided, I may be able to understand the content of the Takagi Taupin equation. But in the example I used, useTT seems to only be equal to True or False. Is it enough to change it to True or False according to my needs?
from xrt.
Is it enough to change it to True or False according to my needs?
Yes. What holds you from trying?
from xrt.
Yes. What holds you from trying?
Thank you for your reply. Currently, I have not yet understood the specific content of this equation. I will try again after understanding the content of the equation.
from xrt.
Is it enough to change it to True or False according to my needs?
Yes. What holds you from trying?
Hello! may I bother you again.
I have two questions to ask. Firstly, does changing the crystal thickness cause any changes in the curve?
I changed the crystal thickness, as shown in Figures 1 and 2, and the curve seems to have not changed.
Secondly, the Bragg angle calculated by setting the crystal plane index to (6,6,0) should be between 89 ° and 90 °, but Figure 3 shows that the Bragg angle is 90 °. Why is this?
Looking forward to your reply!
from xrt.
Well, the curve will stop changing after certain thickness threshold as it gets closer to "infinitely" thick crystal limit. Try 0.05-0.01mm, you will see the difference.
Regarding the Bragg angle, there might be a tiny difference between the value you use for the Si crystal lattice parameter and the one used in xrt, that becomes important as you approach 90deg. I get 89.923 deg for 9686.06eV.
from xrt.
Well, the curve will stop changing after certain thickness threshold as it gets closer to "infinitely" thick crystal limit. Try 0.05-0.01mm, you will see the difference. Regarding the Bragg angle, there might be a tiny difference between the value you use for the Si crystal lattice parameter and the one used in xrt, that becomes important as you approach 90deg. I get 89.923 deg for 9686.06eV.
Thank you for your reply
from xrt.
Well, the curve will stop changing after certain thickness threshold as it gets closer to "infinitely" thick crystal limit. Try 0.05-0.01mm, you will see the difference. Regarding the Bragg angle, there might be a tiny difference between the value you use for the Si crystal lattice parameter and the one used in xrt, that becomes important as you approach 90deg. I get 89.923 deg for 9686.06eV.
Hello, I'm sorry to bother you. I may need to insert a capillary optical element for simulation. May I ask if there is a model of the optical element capillary in xrt?
from xrt.
Hi,
Looking the documentation website for "capillary" is not an option for you?
from xrt.
Hi, Looking the documentation website for "capillary" is not an option for you?
thank you!
from xrt.
Hi, Looking the documentation website for "capillary" is not an option for you?
Hello, sorry to bother you. About code 01BD_SourceZCrystalThetaAlpha, I would like to ask a question. Can I plot the light source image at the light source point? I want to confirm that the light source size value set in the code is consistent with the light source size formed after the code is run.
Then there are two more questions I would like to ask.
Firstly,is the unit of divergence angle of a light source in radians?
Secondly,can I set the curvature radius of the analytical crystal to infinity, and then set the analytical crystal to flat?
I am looking forward to your reply!
from xrt.
Can I plot the light source image at the light source point?
Yes, find the example
examples/withRaycing/09_Gratings/GratingFlexPES.py
and look for ''beamSource' in it. There is a plot of its xz distributions that is commented out in this example. In general, you can plot beam arrays “x”, “y”, “z”, “x’”, “z’”, “energy” and some others of any beam that you create in yourrun_process()
.is the unit of divergence angle of a light source in radians?
Yes, unless it is specifically stated differently, like for undulators where for historical reasons the angular limits are in mrad.
can I set the curvature radius of the analytical crystal to infinity
Yes, you can give it a very big value or
np.inf
.
Ok, Thank you for your reply.Thank you so much!
from xrt.
Yes, find the example
examples/withRaycing/09_Gratings/GratingFlexPES.py
and look for ''beamSource' in it. There is a plot of its xz distributions that is commented out in this example. In general, you can plot beam arrays “x”, “y”, “z”, “x’”, “z’”, “energy” and some others of any beam that you create in yourrun_process()
.
Hello, sorry to bother you again. I have a question that I would like to ask you.
The linear distribution of the light source is a normal distribution, and the linear size is set as shown in the first figure. Why is the size of the light source image plotted different from the parameters I set?
The code for the plot light source is shown in the third image, which I copied from ’examples/withRaycing/09_Gratings/GratingFlexPES.py‘.Does the plot produced by this code represent the light source I have input?
I am looking forward to your reply!
from xrt.
The horizontal size was set to 0.2/2.35 sigma, which is 0.2 fwhm, and this is what you have in the plot.
The vertical size was set in the constructor to 0.05 (sigma) but modified in the generator to 0.07/2.35, which is 0.07 fwhm, and this is what is plotted.
from xrt.
The horizontal size was set to 0.2/2.35 sigma, which is 0.2 fwhm, and this is what you have in the plot. The vertical size was set in the constructor to 0.05 (sigma) but modified in the generator to 0.07/2.35, which is 0.07 fwhm, and this is what is plotted.
Thank you for your prompt reply!
So if I want to set the size of the light source, is it useless to set it in the constructor?
Can only change the size of the light source by changing the horizontal and vertical dimensions shown in the following figure?
from xrt.
Related Issues (20)
- Absorbing wall along the beam propagation direction?
- Help needed! Clarification on the Meaning and Origin of eAxesFlat Values in 07_AnalyzerBent2D.py HOT 2
- Rocking curve theta and energy range converter HOT 3
- Problems generating code from materials HOT 7
- Calculating crystal reflectivity without constructing a beamline HOT 7
- Question about toroidally bent crystal in Laue geometry HOT 6
- VLS grating local_g direction HOT 2
- Regarding the size of light sources and the output of light source images
- How to add and use compound refractive index materials? HOT 9
- The light source image does not match the image at the detector
- Problem when using pytte and OpenCL for bent asymmetric Laue crystal HOT 2
- Passing in_plane_rotation parameter to pytte HOT 2
- Question about making dispersion plots HOT 1
- Report an error when set useTT is true for using elastic deformation in crystal reflectivity HOT 6
- Saving histogram data HOT 3
- GPU calculation for geometric sources HOT 1
- build ellipsoidal mirror HOT 10
- adding surface error on Ellipsoidal mirror HOT 2
- Help on the X-ray Diffraction of polycrystal HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrt.