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()
Metadata
Release files for blxo 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blxo-0.1.13.tar.gz | 17.1 kB | Without provenance | Details for blxo-0.1.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blxo-0.1.13-py3-none-any.whl | Python 3 | none | any | Details for blxo-0.1.13-py3-none-any.whl |
Total release size: 34.5 kB
Release files / blxo-0.1.13.tar.gz
| Download URL | blxo-0.1.13.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90b69d3493e2cee13fa0caed1e0b5acc08d53985a0651766e5ce529f28984e93
|
|
BLAKE2b-256 checksum How to use checksums |
405f7ecf3d712708ed0788b1d7f4cb7f73c0b177bc0c58cf88437bcd34df65c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Release files / blxo-0.1.13-py3-none-any.whl
| Download URL | blxo-0.1.13-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e070910873ec66c71c28a61560b63f4c30a36c6e409883450f389b24afa793d5
|
|
BLAKE2b-256 checksum How to use checksums |
cb3d4b0ec503cd7d938e0b0eb436d3e9d99bf0704ce79df83896fb71627656a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Security for blxo 0.1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.