You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rotation of non-circular beams in current implementation of the UniformBeam wont be aligned with the coordinate system if the propagation direction is not along the x, y, or z axis.
A solution to this issue is to slightly modify the UniformBeam constructor to take orientation of the beam (the first axis of the ellipse) and rewrite the sampling part of the OpenCL code. Unfortunately, I don't have an example yet but will come back to you later with a snippet.
Thanks for your quick response! I am trying to implement a slit-type uniform input off-axis and off-angle. I was thinking if nothing else works then I can just iterate over the line source though will be time consuming.
In the attached zip file there are two new sources (UniformEllipticBeam in uniformellipticbeam.py and UniformRectangularBeam in uniformrectangularbeam.py) and a slightly modified __init__.py file. Extract/copy the three files into the xopto/mccyl/mcsource directory.
The two new sources take an additional axes parameter that can be used to fix the orientation of the beam in the transverse plane. Note that this is experimental and not fully tested.
Thank you I will try it! I also realised I could simply shift the coordinate system... either rotate until the beam until it is centred on y=0 or is paralell to the x axis. This Also seems to work.
When I make a source that is off centre and at an angle to the cylindrical sample, as in;
source = mc.mcsource.UniformBeam([0.5e-3,5.0e-3],position =(-20e-3, 5e-3, 0),direction=(np.cos(2*np.pi*ang/360), np.sin(2*np.pi*ang/360),0))
Looks like this in the x-y plane
But the 2D cross section of the beam seems to be tilted - the beam should be symmetrical in the z axis I believe.
It looks like the beam is rotated somehow.
Thank you :)
The text was updated successfully, but these errors were encountered: