Polarization correction#
Summary#
Divide signal by the linear-polarization intensity factor.
Metadata#
Module ID: PolarizationCorrection
Module path: /home/runner/work/MoDaCor/MoDaCor/src/modacor/modules/technique_modules/scattering/polarization_correction.py
Module version: 20260902.1
Keywords: polarization, polarisation, scattering, correction
Required data keys#
signal
TwoTheta
Psi
Modifies#
signal: signal, uncertainties
Required arguments#
with_processing_keys
Default configuration#
{
"correction_key": "polarization_factor_map",
"minimum_polarization_factor": 1e-12,
"mode": "linear_fraction",
"polarisation_angular_offset": null,
"polarisation_angular_offset_units": null,
"polarisation_factor": null,
"polarization_angular_offset": 0.0,
"polarization_angular_offset_units": "degree",
"polarization_factor": null,
"psi_key": "Psi",
"two_theta_key": "TwoTheta",
"with_processing_keys": [
"sample"
]
}
Argument specification#
Argument |
Type |
Required |
Default |
Dependency role |
Description |
|---|---|---|---|---|---|
|
str |
No |
polarization_factor_map |
- |
BaseData key used to store the applied polarization factor. |
|
int or float |
No |
1e-12 |
- |
Lower allowed polarization factor before division. |
|
str |
No |
linear_fraction |
- |
Polarization model. Currently supports ‘linear_fraction’; ‘stokes’ is reserved. |
|
int or float or NoneType |
No |
- |
- |
British-spelling alias for polarization_angular_offset. |
|
str or NoneType |
No |
- |
- |
British-spelling alias for polarization_angular_offset_units. |
|
int or float or NoneType |
No |
- |
- |
British-spelling alias for polarization_factor. |
|
int or float |
No |
0.0 |
- |
Angular offset between Psi=0 and the horizontal polarization axis. |
|
str |
No |
degree |
- |
Units for polarization_angular_offset. |
|
int or float or NoneType |
No |
- |
- |
Fraction of horizontally polarized intensity. 0.5 is unpolarized. |
|
str |
No |
Psi |
- |
BaseData key containing the detector azimuth. |
|
str |
No |
TwoTheta |
- |
BaseData key containing the scattering angle 2theta. |
|
list |
Yes |
[“sample”] |
- |
ProcessingData keys whose signal should be corrected. |
Notes#
The implemented mode is DAWN/pyFAI-style linear_fraction:
P = f * (1 - sin(2theta)^2 * cos(Psi - offset)^2)
+ (1 - f) * (1 - sin(2theta)^2 * sin(Psi - offset)^2)
mode='stokes' is reserved for a future implementation once the
Stokes reference-frame convention has been fixed.