hexsample.sensor
— Sensor active media#
Module documentation#
Active sensor medium.
- class hexsample.sensor.CrossSection(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#
Enum class expressing the various cross sections.
- COHERENT = 'coh'#
- INCOHERENT = 'incho'#
- PHOTOELECTRIC = 'photo'#
- TOTAL = 'total'#
- class hexsample.sensor.Material(symbol: str, fano_factor: float, density: float = None, ionization_potential: float = None)#
Class describing a material.
This will work for either an element or a compound, provided that the symbol is recognized by xraydb.
- _attenuation_length(energy: ndarray, kind: CrossSection) ndarray #
Return the attenuation length (in cm) for the material.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
kind (CrossSection) – The cross secttion to be used.
- coherent_attenuation_length(energy: ndarray) ndarray #
Return the coherent attenuation length (in cm) for the material.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- incoherent_attenuation_length(energy: ndarray) ndarray #
Return the incoherent attenuation length (in cm) for the material.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- photoelectric_attenuation_length(energy: ndarray) ndarray #
Return the photoelectric attenuation length (in cm) for the material.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- total_attenuation_length(energy: ndarray) ndarray #
Return the total length (in cm) for the material.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- _mu_components(energy: ndarray, kind: CrossSection) dict #
Return the absorption coefficients (in cm^{-1}) for the various elements in a compound.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
kind (CrossSection) – The cross secttion to be used.
- coherent_mu_components(energy: ndarray) ndarray #
Return the coherent absorption coefficients (in cm^{-1}) for the various elements in a compound.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- incoherent_mu_components(energy: ndarray) ndarray #
Return the incoherent absorption coefficients (in cm^{-1}) for the various elements in a compound.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- photoelectric_mu_components(energy: ndarray) ndarray #
Return the photoelectric absorption coefficients (in cm^{-1}) for the various elements in a compound.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- total_mu_components(energy: ndarray) ndarray #
Return the total absorption coefficients (in cm^{-1}) for the various elements in a compound.
- Parameters:
energy (array_like) – The energy (in eV) at which the attenuation length is calculated.
- fluorescence_yield(edge: str, line: str, energy: ndarray) ndarray #
Return the fluorescence yield for an X-ray emission line or family of lines.
- Parameters:
edge (str) – IUPAC symbol of X-ray edge.
line (str) – Siegbahn notation for emission line.
energy (array_like) – Incident X-ray energy in eV.
- rvs_num_pairs(energy: ndarray) ndarray #
Extract the number of pairs for the primary ionization.
- class hexsample.sensor.Sensor(material: Material, thickness: float, trans_diffusion_sigma: float)#
Simple class describing a sensor.
This is essentially a parallel-plate like slab of material acting as an absorbing medium for impinging X-rays.
- Parameters:
material (Material instance) – The sensor material.
thickness (float) – The sensor thickness in cm.
trans_diffusion_sigma (float) – The transverse diffusion sigma in um / sqrt(cm).
- photabsorption_efficiency(energy: ndarray) ndarray #
Return the photabsorption efficiency for a given array of energy values.
- rvs_absorption_depth(energy: ndarray) ndarray #
Exract random variates for the absorption depth.
Note this is using a truncated exponential distribution with the maximum value corresponding to the thickness of the detector.
- rvs_absz(energy: ndarray) ndarray #
Extract random variates for the absorption position along the z axis.
Not that, in our parallel-plane geometry, the z axis runs perpendicularly to the readout plane, which is assumed to be at z = 0. The top of the sensor is therefore at z = thickness, and all the photons are assumed to have a momentum parallel to the z axis.
- class hexsample.sensor.SiliconSensor(thickness: float = 0.03, trans_diffusion_sigma: float = 40.0)#
Specialized class describing a silicon sensor.