Detector efficiency correction#
Summary#
Divide signal by angle-dependent detector absorption efficiency.
Metadata#
Module ID: DetectorEfficiencyCorrection
Module path: /home/runner/work/MoDaCor/MoDaCor/src/modacor/modules/technique_modules/scattering/detector_efficiency_correction.py
Module version: 20260902.1
Keywords: detector, efficiency, attenuation, absorption
Required data keys#
signal
CosAlpha
Modifies#
signal: signal, uncertainties
Required arguments#
with_processing_keys
Default configuration#
{
"beam_energy": null,
"beam_energy_source": null,
"beam_energy_units": "keV",
"beam_energy_units_source": null,
"chemical_composition": null,
"chemical_composition_source": null,
"correction_key": "detector_efficiency",
"cos_alpha_key": "CosAlpha",
"density": null,
"density_source": null,
"density_units": "g/cm^3",
"density_units_source": null,
"linear_attenuation_coefficient": null,
"linear_attenuation_coefficient_source": null,
"linear_attenuation_coefficient_units": "1/m",
"linear_attenuation_coefficient_units_source": null,
"material": null,
"material_source": null,
"minimum_cos_alpha": 1e-12,
"normalize_to_normal_incidence": true,
"thickness": null,
"thickness_source": null,
"thickness_units": "m",
"thickness_units_source": null,
"wavelength": null,
"wavelength_source": null,
"wavelength_units": "angstrom",
"wavelength_units_source": null,
"with_processing_keys": [
"sample"
]
}
Argument specification#
Argument |
Type |
Required |
Default |
Dependency role |
Description |
|---|---|---|---|---|---|
|
int or float or NoneType |
No |
- |
- |
Incident beam energy. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for incident beam energy. |
|
str |
No |
keV |
- |
Units for beam_energy. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for beam energy units. |
|
str or NoneType |
No |
- |
- |
Alias for material. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for chemical_composition. |
|
str |
No |
detector_efficiency |
- |
BaseData key used to store the applied relative or absolute efficiency map. |
|
str |
No |
CosAlpha |
- |
BaseData key containing the incidence cosine n dot rhat. |
|
int or float or NoneType |
No |
- |
- |
Sensor material density. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for sensor density. |
|
str |
No |
g/cm^3 |
- |
Units for density. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for density units. |
|
int or float or NoneType |
No |
- |
- |
Optional direct linear attenuation coefficient. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for a direct linear attenuation coefficient. |
|
str |
No |
1/m |
- |
Units for linear_attenuation_coefficient. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for linear attenuation coefficient units. |
|
str or NoneType |
No |
- |
- |
Sensor material formula or element symbol, used with xraylib lookup. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for sensor material formula or element symbol. |
|
int or float |
No |
1e-12 |
- |
Lower numerical clip for positive cos_alpha values. |
|
bool |
No |
True |
- |
If true, divide by efficiency(cos_alpha) / efficiency(cos_alpha=1). |
|
int or float or NoneType |
No |
- |
- |
Sensor thickness. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for sensor thickness. |
|
str |
No |
m |
- |
Units for thickness. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for thickness units. |
|
int or float or NoneType |
No |
- |
- |
Incident wavelength, used to derive beam energy if beam_energy is not configured. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for incident wavelength. |
|
str |
No |
angstrom |
- |
Units for wavelength. |
|
str or NoneType |
No |
- |
- |
Optional IoSources key for wavelength units. |
|
list |
Yes |
[“sample”] |
- |
ProcessingData keys whose signal should be corrected. |
Notes#
Material parameters can be provided as direct values or *_source paths. xraylib is used for material lookup unless linear_attenuation_coefficient is configured directly.