Dear Mischa,
If you are already adapting the code and are comfortable with that then
I think you should be able to achieve what you are looking for.
The example you mention should be a good starting point.
Now to change the crystal alignment I think there are two main options:
1) If you turn the crystal using a goniometer then it should be straight
forward to obtain the rotation matrix the goniometer rotations
correspond to and apply this transformation to the Bragg peak positions.
2) In the example you mention [1] there are used two crystal directions
which define the orientation of the crystal in the experiment. e.g. line
9 of the code uses 11-2 and 111 directions to orient the substrate. You
can change/turn those two vectors and therefore also effectively change
the orientation. Just be sure to keep using two perpendicular
directions. The HXRD initialization otherwise will use some projections
(and should print out a warning/message).
I hope this helps. Also if you manage to obtain something useful it
would be nice to contribute the resulting function/script via a Github
Pull request.
cheers
Dominik
[1]
https://xrayutilities.sourceforge.io/examples.html#visualization-of-the-bragg-peaks-in-a-reciprocal-space-plane
On 04/01/2023 11.47, Mischa Stifter wrote:
> Dear Xrayutilities-Team,
>
> I am currently looking for a single crystal diffraction simulator. Your
> package seems very promising for that since it’s very strong and
> provides all degrees of changeability in an experimental setup.
> Unfortunately, I didn’t figure it out yet, how to use it in the proper
> manner.
>
> What I am looking for is, a changeable crystal alignment in an X-ray
> beam that produces a single diffraction pattern on the detector for
> further use. (I have currently worked with the Laue method and am
> therefore thinking in that kind of setups etc.) I was able to modify the
> example of section ‘Visualization of the Bragg peaks in a reciprocal
> space plane’ to a full image, because that seems for me as the starting
> point. But now I am stuck on how to rotate the crystal in the
> experimental alignment. Best would be to have just the crystal
> orientation as a free parameter, without the detector aswell.
>
> Is there this possibility of creating such patterns and if yes can you
> help me to get it done?
>
> Thanks a lot for your help!
> Best,
>
> Mischa
>
>
>
> _______________________________________________
> xrayutilities-users mailing list
> xra...@li...
> https://lists.sourceforge.net/lists/listinfo/xrayutilities-users
|