Utility Functions
- xrayphysics.xrayPhysics.effectiveZ(self, chemicalFormula, min_energy=10.0, max_energy=100.0, arealDensity=0.0)
Calculate the effective atomic number of a material
- Parameters:
chemicalFormula (string) – atomic number, chemical formula, mixture of compounds with mass fractions, or member of the material library
min_energy (scalar) – the minimum of the energy in which to perform the calculation
max_energy (scalar) – the maximum of the energy in which to perform the calculation
arealDensity (scalar) – the areal density (g/cm^2) to use for the calculation
- Returns:
The effective atomic number
- xrayphysics.xrayPhysics.effectiveAttenuation(self, Z, density, thickness, spectralResponse, gammas)
Calculate the effective attenuation of a material
- Parameters:
Z (scalar or string) – atomic number, chemical formula, mixture of compounds with mass fractions, or member of the material library
density (scalar) – mass density (g/cm^3) of the material
thickness (scalar) – the thickness (cm) of the material
spectralResponse (numpy array) – spectra model
gammas (numpy array) – energies at which the spectra model is defined
- Returns:
The effective Linear Attenuation Coefficient (LAC, cm^-1)
- xrayphysics.xrayPhysics.effectiveEnergy(self, Z, density, thickness, spectralResponse, gammas)
Calculate the effective energy of a material
- Parameters:
Z (scalar or string) – atomic number, chemical formula, mixture of compounds with mass fractions, or member of the material library
density (scalar) – mass density (g/cm^3) of the material
thickness (scalar) – the thickness (cm) of the material
spectralResponse (numpy array) – spectra model
gammas (numpy array) – energies at which the spectra model is defined
- Returns:
The monochromatic energy (keV) that would provide the same attenuation as the given polychromatic spectra
- xrayphysics.xrayPhysics.transmission(self, Z, density, thickness, spectralResponse, gammas)
Calculate the transmission through a given material
- Parameters:
Z (scalar or string) – atomic number, chemical formula, mixture of compounds with mass fractions, or member of the material library
density (scalar) – mass density (g/cm^3) of the material
thickness (scalar) – the thickness (cm) of the material
spectralResponse (numpy array) – spectra model
gammas (numpy array) – energies at which the spectra model is defined
- Returns:
The transmission (unitless) through the given filter