pypeit.core.framematch module
Routines for matching frames to certain types or each other.
- class pypeit.core.framematch.FrameTypeBitMask[source]
Bases:
BitMask
Define a bitmask to set the frame types.
Frame types can be arc, bias, dark, pinhole, pixelflat, science, standard, or trace.
- type_names(type_bits, join=True)[source]
Use the type bits to get the type names for each frame.
Todo
This should probably be a general function in
pypeit.bitmask.BitMask
- Parameters:
type_bits (int, list, numpy.ndarray) – The bit mask for each frame.
bitmask (
pypeit.bitmask.BitMask
, optional) – The bit mask used to pull out the bit names. UsesFrameTypeBitMask
by default.join (
bool
, optional) – Instead of providing a list of type names for items with multiple bits tripped, joint the list into a single, comma-separated string.
- Returns:
List of the frame types for each frame. Each frame can have multiple types, meaning the 2nd axis is not necessarily the same length for all frames.
- Return type:
- pypeit.core.framematch.check_frame_exptime(exptime, exprng)[source]
Check that the exposure time is within the provided range.
- Parameters:
exptime (numpy.ndarray) – Exposure times to check; allowed to be None.
exprng (array-like) – An array with the minimum and maximum exposure. The limits are exclusive and a limit of None means there is no limit.
- Returns:
A boolean array that is True for all times within the provided range. The value is False for any exposure time that is None or outside the provided range.
- Return type:
- Raises:
ValueError – Raised if the length of exprng is not 2.