hexrd.material.utils module
- hexrd.material.utils.calculate_energy_absorption_length(density, formula, energy_vector)[source]
this function calculates the absorption length (in mm) based on the total energy absorbed by the medium. this function is used in calculating the scintillator response to x-rays
@author Saransh Singh, LLNL @date 04/25/2023 1.0 original
Parameters
- densityfloat
density of material in g/cm^3.
- formulastr/dict
chemical formula of compound either as a string or a dict. eg. “H2O” and {“H”:2, “O”:1} are both acceptable
- energy_vector: list/numpy.ndarray
energy (units keV) list or array of 1D vector for which beta values are calculated for.
Returns
- numpy.ndarray
the attenuation length in microns
- hexrd.material.utils.calculate_linear_absorption_length(density, formula, energy_vector)[source]
this function calculates the absorption length (in mm) based on both coherent and incoherent scattering cross sections. This gives the total absorption length, instead of the one due to only photoeffect cross-section
linear attenuation coefficient = 1/linear absorption length
@author Saransh Singh, LLNL @date 04/19/2023 1.0 original
Parameters
- densityfloat
density of material in g/cm^3.
- formulastr/dict
chemical formula of compound either as a string or a dict. eg. “H2O” and {“H”:2, “O”:1} are both acceptable
- energy_vector: list/numpy.ndarray
energy (units keV) list or array of 1D vector for which beta values are calculated for.
Returns
- numpy.ndarray
the attenuation length in microns