Comments (7)
Yes, you're right. If the optical axis is deflected, the parametric representation needs a shifted pitch angle. In the present implementation this is not available. I will implement it in about a week.
Thank you for discovering the problem!
from xrt.
Hi,
Please try the last update. Please look at the docs and a new test script test_param_mirror.py
for a usage example and get back with your results/comments.
from xrt.
Hi,
In test script test_param_mirror.py,
I changed the inclination to -2.5e-3, something weird happened. Dose that mean the inclination couldn't be negative?
from xrt.
Yes, you're right. Thanks for finding it!
I've fixed it. Please try the update.
from xrt.
Hi, the test script test_param_mirror.py
could run correctly in my computer now.
However, I still can't successfully apply the new EllipticalMirrorParam to my own codes. Here is the main building of the optical elements .
beamLine.TorM = roe.ToroidMirror(beamLine, 'ToroidMirrir', [0., 41000., 0.],
pitch=2.5e-3,
roll=-np.pi/2,
material=None,
limPhysX=[-20., 20.], limPhysY=[-256., 256.],
R=[41000., 19000.], r=[41000., 19000.])
beamLine.Screen2 = rsc.Screen(beamLine, '2ndSource', [0., 60000., 0.])
beamLine.Screen2.center[0] = beamLine.TorM.center[0] - (beamLine.Screen2.center[1] -
beamLine.TorM.center[1])*np.tan(2*beamLine.TorM.pitch)
KB1_center1 = 76440.
KB1_center0 = beamLine.TorM.center[0] - (KB1_center1-
beamLine.TorM.center[1])*np.tan(2*beamLine.TorM.pitch)
beamLine.KB1 = roe.EllipticalMirrorParam(beamLine, 'VKB', [0., 76440, 0.],
pitch=1.5e-3, material=mPt,
limPhysY=[-190., 190.],
p=16440., q=1560.,
isCylindrical=True)
f1_x = beamLine.TorM.center[0] - (beamLine.Screen2.center[1] -
beamLine.TorM.center[1])*np.tan(2*beamLine.TorM.pitch)
KB2_center1 = 76870.
KB2_center0 = beamLine.Screen2.center[0] - (KB2_center1-beamLine.Screen2.center[1]) *
np.tan(2*beamLine.TorM.pitch)
KB2_center2 = beamLine.KB1.center[2] + (KB2_center1-KB1_center1)
*np.tan(2*beamLine.KB1.pitch)
#beamLine.KB2 = roe.EllipticalMirrorParam(beamLine, 'HKB',
# [KB2_center0, 76870, KB2_center2],
# pitch=1.5e-3, material=mPt,
# roll=np.pi/2, extraPitch=-5.0e-3,
# limPhysY=[-195., 195.],
# p=16870., q=1130., isCylindrical=True)
beamLine.KB2 = roe.EllipticalMirrorParam(beamLine, 'HKB',
[KB2_center0, 76870, KB2_center2],
pitch=1.5e-3-5.e-3, material=mPt,
roll=np.pi/2,
limPhysY=[-195., 195.],
f1=[f1_x, 60000., 0.], q=1130.,
isCylindrical=True)
beamLine.KBSampleShort = rsc.Screen(beamLine, 'AtSamplePos', [0., 78000., 0])
The commented out statements are my original treatment. Toroidal mirror provide a second source at Screen2.
I think the main difference between my codes and the test script is that my codes deflect in sagittal plane not the meridian as shown in test script.
I just want to make sure whether it's my own problem in parameter setting or not.
Thanks for your quick update anyway!
from xrt.
Hi,
I have now implemented the most general case and have tested it with test_param_mirror.py
. I have removed pitch from the ellipse calculations and put the general coordinate system transformation. Please try the last update.
Note also that when you use a horizontally deflecting mirror and the incoming beam is not horizontal, you should also define a yaw angle. Specify a sequence for the rotations to get the orientation that you expect. Please look at test_param_mirror.py
for yaw.
from xrt.
Hi,
it seems that both the test script and my own script could run correctly on my computer now.
Thanks very much for your help!
from xrt.
Related Issues (20)
- Example for distorted surfaces HOT 2
- how to set the divergence of the source HOT 3
- Problem with run_ray_tracing HOT 24
- a bug about xrtqook HOT 5
- Python created from XRTGlow show different results HOT 6
- simulation of VLS HOT 6
- build spherical mirror from elliptical optic HOT 4
- simulation of Hyperboloid mirror HOT 3
- Question about plotting energy spectrum HOT 6
- How to change the screen size or resolution when viewing a small focus image? HOT 2
- problem with xrtBentXtal in Laue geometry HOT 5
- plot error with matplotlib 3.8.2 HOT 6
- ParabolicalMirrorParam optics with figure error HOT 3
- Some doubts about custom faceted lenses HOT 4
- xyz_to_param and param_to_xyz for class ParabolicalMirrorParam HOT 2
- How to simulate nested shells HOT 9
- Problems encountered while running trace examples HOT 5
- Error when run xrtQook on Nvidia V100 GPU node
- How to add a caliber setting!
- Some doubts about the energy setting of X-ray sources HOT 18
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.