Giter VIP home page Giter VIP logo

Comments (18)

kklmn avatar kklmn commented on August 17, 2024 1

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.

kklmn avatar kklmn commented on August 17, 2024

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.

999-x avatar 999-x commented on August 17, 2024

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.
屏幕截图 2024-05-20 204404

from xrt.

kklmn avatar kklmn commented on August 17, 2024

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.

999-x avatar 999-x commented on August 17, 2024

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.

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.

kklmn avatar kklmn commented on August 17, 2024

Is it enough to change it to True or False according to my needs?

Yes. What holds you from trying?

from xrt.

999-x avatar 999-x commented on August 17, 2024

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.

999-x avatar 999-x commented on August 17, 2024

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.
1
2

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?
3

Looking forward to your reply!

from xrt.

yxrmz avatar yxrmz commented on August 17, 2024

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.

999-x avatar 999-x commented on August 17, 2024

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.

999-x avatar 999-x commented on August 17, 2024

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.

kklmn avatar kklmn commented on August 17, 2024

Hi,
Looking the documentation website for "capillary" is not an option for you?

from xrt.

999-x avatar 999-x commented on August 17, 2024

Hi, Looking the documentation website for "capillary" is not an option for you?

thank you!

from xrt.

999-x avatar 999-x commented on August 17, 2024

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?
344091431-04ffce21-417a-4159-9286-761e9510c3bd
Secondly,can I set the curvature radius of the analytical crystal to infinity, and then set the analytical crystal to flat?
344091878-b26d69f5-ef3a-4eff-90bf-4312c8c39f57
I am looking forward to your reply!

from xrt.

999-x avatar 999-x commented on August 17, 2024

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.

Ok, Thank you for your reply.Thank you so much!

from xrt.

999-x avatar 999-x commented on August 17, 2024

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().

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?
微信截图_20240703152336
2D-01b-Si660-88 6074-beamSource-flat
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?
1
I am looking forward to your reply!

from xrt.

kklmn avatar kklmn commented on August 17, 2024

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.

999-x avatar 999-x commented on August 17, 2024

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?
2

from xrt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.