Wavelength#

Source Code Documentation#

Wavelength of the incident radiation.

Supports compatible unit conversions.

A_KEV

X-ray voltage wavelength product (\(h \nu\)), per NIST standard.

ConstantMonochromaticWavelength(wavelength, ...)

Monochromatic wavelength (and units); cannot be changed.

MonochromaticXrayWavelength(wavelength[, ...])

Monochromatic X-ray wavelength (and units).

WavelengthBase(*[, units])

Base for all wavelength (\(\lambda\)) classes.

hklpy2.wavelength_support.A_KEV = 12.398419843856837#

X-ray voltage wavelength product (\(h \nu\)), per NIST standard.

class hklpy2.wavelength_support.ConstantMonochromaticWavelength(wavelength: float, **kwargs)[source]#

Bases: WavelengthBase

Monochromatic wavelength (and units); cannot be changed.

Just wavelength. Can be used with any type of radiation source.

wavelength

Wavelength (\(\lambda\)).

wavelength_units

Engineering units of the wavelength.

source_type

Nature of the incident radiation.

spectrum_type

Description of the spectrum of the incident radiation.

source_type = 'any'#

Nature of the incident radiation.

spectrum_type = 'monochromatic'#

Description of the spectrum of the incident radiation.

property wavelength: float#

Wavelength (\(\lambda\)).

property wavelength_units: str#

Engineering units of the wavelength.

class hklpy2.wavelength_support.MonochromaticXrayWavelength(wavelength: float, energy_units: str = None, **kwargs)[source]#

Bases: WavelengthBase

Monochromatic X-ray wavelength (and units).

wavelength

Wavelength (\(\lambda\)).

wavelength_units

Engineering units of the wavelength.

energy

Incident monochromatic X-ray photon energy (\(E\)).

energy_units

Engineering units of the X-ray photon energy.

source_type

Nature of the incident radiation.

spectrum_type

Description of the spectrum of the incident radiation.

property energy: float#

Incident monochromatic X-ray photon energy (\(E\)).

\[\lambda = (h \nu) / E\]
property energy_units: str#

Engineering units of the X-ray photon energy.

source_type = 'X-ray'#

Nature of the incident radiation.

spectrum_type = 'monochromatic'#

Description of the spectrum of the incident radiation.

property wavelength: float#

Wavelength (\(\lambda\)).

property wavelength_units: str#

Engineering units of the wavelength.

class hklpy2.wavelength_support.WavelengthBase(*, units: str = None)[source]#

Bases: ABC

Base for all wavelength (\(\lambda\)) classes.

wavelength

Wavelength (\(\lambda\)).

wavelength_units

Engineering units of the wavelength.

source_type

Nature of the incident radiation.

spectrum_type

Description of the spectrum of the incident radiation.

source_type = 'any'#

Nature of the incident radiation.

spectrum_type = 'any'#

Description of the spectrum of the incident radiation.

abstract property wavelength: float#

Wavelength (\(\lambda\)).

property wavelength_units: str#

Engineering units of the wavelength.

hklpy2.wavelength_support.XRAY_ENERGY_EQUIVALENT_ = 806554.3937#

Energy equivalent factor \(1 / (h \nu)\)

Per NIST publication, of CODATA Fundamental Physical Constants, 2022 revision.

See:

https://physics.nist.gov/cuu/Constants/factors.html (“1 eV” v. “1/m”)