container_functions¶
average_polarised_scans(*scans)
¶
Find unique polarisations and average each scan at that polarisation Spectra are only separated by polarisation, all spectra with the same polarisation are averaged together.
pol1, pol2 = average_polarised_scans(*scans)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scans
|
SpectraContainer
|
list of SpectraContainer objects |
()
|
Returns:
| Type | Description |
|---|---|
tuple[SpectraContainerAverage, SpectraContainerAverage | None]
|
pol1, (pol2|None) SpectraContainer objects for opposite polarisations |
Source code in mmg_toolbox/xas/container_functions.py
average_scans(*scans)
¶
Average spectra within a set of scans
av_scan = average_scans(scan1, scan2, scan3)
Equivalent to: av_scan = sum([scan2, scan3], scan1)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scans
|
SpectraContainer
|
list of SpectraContainer objects |
()
|
Returns:
| Type | Description |
|---|---|
SpectraContainerAverage
|
SpectraContainer object containing averaged spectra |
Source code in mmg_toolbox/xas/container_functions.py
pair_scans(*scans)
¶
Find the polarisation pair of each spectra from the list of spectra
[(pol1, pol2), (pol3, pol4)] = pair_scans(*scans)
Scans are paired against their opposite polarisation or the opposite magnetic field, whichever comes first.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scans
|
SpectraContainer
|
list of SpectraContainer objects |
()
|
Returns:
| Type | Description |
|---|---|
list[tuple[SpectraContainer, SpectraContainer]]
|
list((pol1, pol2)) SpectraContainer objects for opposite polarisations |
Source code in mmg_toolbox/xas/container_functions.py
polarised_pairs(*scans)
¶
Find the polarisation pair of each spectra from the list of spectra
[(pol1, pol2), (pol3, pol4)] = polarised_pairs(*scans)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scans
|
SpectraContainer
|
list of SpectraContainer objects |
()
|
Returns:
| Type | Description |
|---|---|
list[tuple[SpectraContainer, SpectraContainer]]
|
list((pol1, pol2)) SpectraContainer objects for opposite polarisations |