Skip to main content

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

  1. 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.
  1. Get the interested properties from the monochromator.

    1. 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']
    
    1. Resolutions
    # Energy resolution
    mono.energy_resolution
    # Energy resolution in terms of angle
    mono.angle_resolution
    
    1. Optimal focus-to-detector distance
    mono.f2d_optimal
    
    1. 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.
    
    1. Others
    mono.lengths.geo_focus()
    mono.lengths.single_ray_focus()
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blxo-0.1.10.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

blxo-0.1.10-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file blxo-0.1.10.tar.gz.

File metadata

  • Download URL: blxo-0.1.10.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.5

File hashes

Hashes for blxo-0.1.10.tar.gz
Algorithm Hash digest
SHA256 a26f5d149caf7c010b84388b23a582014084c6a1d7d2f8eebd950ac408652058
MD5 c81fcb0a9dc698c75acb9f4c1134579e
BLAKE2b-256 02ba672363eb87d3b3eb0f7e36b35bf73da16010372b2eff534b7b2f7837868e

See more details on using hashes here.

File details

Details for the file blxo-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: blxo-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.5

File hashes

Hashes for blxo-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c96bf5c2027609cf5f180e48425fbd12b4561d6f3da8b5b1dd34351d1094850e
MD5 7b441db483841dba7b3266ad27205bfb
BLAKE2b-256 2686d4b020203c9a47d13cb9fd413fb60b9ff9bda454ea5132b704b396c77943

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page