corrct.physics.xrf
XRF support functions.
@author: Nicola VIGANÒ, ESRF - The European Synchrotron, Grenoble, France, and CEA-IRIG, Grenoble, France
Module Contents
Classes
Fluorescence line description class. |
|
Siegbahn fluorescence lines collection class. |
|
Simple XRF detector model. |
Functions
Return the radiation rates of the requested lines for the given element. |
|
Return the energy(ies) of the requested line for the given element. |
API
- class corrct.physics.xrf.FluoLine[source]
Fluorescence line description class.
- name: str
None
- indx: int
None
- class corrct.physics.xrf.LinesSiegbahn[source]
Siegbahn fluorescence lines collection class.
- lines
None
- static get_lines(line: str) collections.abc.Sequence[corrct.physics.xrf.FluoLine] [source]
Return the list of xraylib line macro definitions for the requested family.
Parameters
line : str The requested line. It can be a whole shell (transition to that shell), or sub-shells.
Returns
Sequence List of corresponding lines.
- corrct.physics.xrf._get_lines_list(lines) collections.abc.Sequence[corrct.physics.xrf.FluoLine] [source]
- corrct.physics.xrf.get_radiation_rate(element: Union[str, int], lines: Union[str, corrct.physics.xrf.FluoLine, collections.abc.Sequence[corrct.physics.xrf.FluoLine]], verbose: bool = False) numpy.typing.NDArray [source]
Return the radiation rates of the requested lines for the given element.
Parameters
element : Union[str, int] The requested element lines : Union[str, FluoLine, Sequence[FluoLine]] The requested line. It can be a whole shell (transition to that shell), or sub-shells. verbose : bool, optional Whether to produce verbose output in case of errors, by default False
Returns
NDArray The list of radiation rates
- corrct.physics.xrf.get_energy(element: Union[str, int], lines: Union[str, corrct.physics.xrf.FluoLine, collections.abc.Sequence[corrct.physics.xrf.FluoLine]], *, compute_average: bool = False, verbose: bool = False) Union[float, numpy.typing.NDArray] [source]
Return the energy(ies) of the requested line for the given element.
Parameters
element : Union[str, int] The requested element. line : str The requested line. It can be a whole shell (transition to that shell), or sub-shells. compute_average : bool, optional Weighted averaging the lines, using the radiation rate. The default is False.
Returns
energy_keV : Union[float, NDArray] Either the average energy or the list of different energies.
- class corrct.physics.xrf.DetectorXRF[source]
Simple XRF detector model.
- surface_mm2: float
None
- distance_mm: Union[float, numpy.typing.NDArray]
None
- angle_rad: float
None
- property solid_angle_sr: Union[float, numpy.typing.NDArray]
Compute the solid angle covered by the detector.
Returns
float | NDArray The computed solid angle of the detector geometry.