Bent Laue Monochromators X-ray Optics
Project description
BLXO (Bent Laue X-ray Optics)
Installation
Option 1
pip install blxo
Option 2
Download the repository. Import the blxo
folder as a python package.
How to use it
-
Define a monochromator with your parameters.
Example:
from blxo import *
mono = mc.BentLaueMono(chi=np.radians(4.4671),theta=np.radians(8.99),nu=0.2,t=0.3,r=2000,p=22000) # Length unit is mm. Angle unit is radians.
-
Get the interested properties from the monochromator.
- Quasi-mono beam
qmb = mono.qmb # Quasi-mono beam width (mm) width = qmb['width'] # Quasi-mono beam footlength (mm) footlength = qmb['foot_length'] # Energy spread of the QMB in terms of angle (rad) ang_spread = qmb['angular_spread']
- Resolutions
# Energy resolution mono.energy_resolution # Energy resolution in terms of angle mono.angle_resolution
- Optimal focus-to-detector distance
mono.f2d_optimal
- Calculators for magic condition
from blxo import * # Expect the result to be zero when the magic condition is met. # Magic condition function in terms of angle mc_angle_misalignment = mc.magic_condition_angles(chi=np.radians(4.4671),theta=np.radians(8.99),nu=0.2,t=0.3,r=2000,p=22000) # `mc_angle_misalignment` is expected to be zero (or zero enough) when the magic condition is met. # Magic condition function in terms of foci mc_focus_misalignment = mc.magic_condition_foci(chi=np.radians(4.4671),theta=np.radians(8.99),nu=0.2,t=0.3,r=2000,p=22000) # Thickness (t) is not a factor in the calculation, but a called module requires it for some other functions. So just give it any number.
- Others
mono.lengths.geo_focus() mono.lengths.single_ray_focus()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
blxo-0.1.8-py3-none-any.whl
(18.1 kB
view hashes)
blxo-0.1.7-py3-none-any.whl
(16.6 kB
view hashes)