Gamma Sources¶
SourceParams class to manage calibration source energy and features.
- x_ray_imager_bagriff.identify_lines._sources.check_gain_range(gain=None, gain_range=None)¶
Validate a gain or gain_range.
- Parameters:
- Returns:
Tuple of the either gain_range or gain twice,ordered (smallest, largest).
- Raises:
ValueError – gain_range is invalid. Also if too many or too few arguments are provided.
- Return type:
- class x_ray_imager_bagriff.identify_lines._sources.SourceParams¶
Collection of all lines for a gamma source.
- __init__(energies, name=None)¶
Initialize the source with its energy.
- Parameters:
energies (ArrayLike) – Array of source lines in keV
name (str | None) – Name of source. For example, ‘Ba133’. No form is required, but the [Element Abbreviation][Isotope] is used for all provided sources.
- Return type:
None
- get_filter(points, gain=None, gain_range=None, bumper=1.3)¶
Create a boolean array to remove points away from target energies.
- Parameters:
- Returns:
Boolean array, true for all points near an energy for this source.
- Raises:
ValueError – An invalid gain/gain range is provided.
- Return type:
NDArray[bool]