UnpackApdbFlags¶
- class lsst.ap.association.UnpackApdbFlags(flag_map_file, table_name)¶
Bases:
object
Class for unpacking bits from integer flag fields stored in the Apdb.
- Attributes:
Methods Summary
flagExists
(flagName[, columnName])Check if named flag is in the bitpacked flag set.
makeFlagBitMask
(flagNames[, columnName])Return a bitmask corresponding to the supplied flag names.
unpack
(input_flag_values, flag_name)Determine individual boolean flags from an input array of unsigned ints.
Methods Documentation
- flagExists(flagName, columnName='flags')¶
Check if named flag is in the bitpacked flag set.
Parameters:¶
- makeFlagBitMask(flagNames, columnName='flags')¶
Return a bitmask corresponding to the supplied flag names.
Parameters:¶
- flagNames
list
[str
] Flag names to include in the bitmask.
- columnName
str
, optional Name of bitpacked flag column.
- Returns:
- bitmask
np.unit64
Bitmask corresponding to the supplied flag names given the loaded configuration.
- bitmask
- Raises:
- ValueError
Raised if a flag in
flagName
is not included incolumnName
.
- flagNames
- unpack(input_flag_values, flag_name)¶
Determine individual boolean flags from an input array of unsigned ints.
- Parameters:
- input_flag_valuesarray-like of type uint
Array of integer flags to unpack.
- flag_name
str
Apdb column name of integer flags to unpack. Names of packed int flags are given by the flag_map_file.
- Returns:
- output_flags
numpy.ndarray
Numpy named tuple of booleans.
- output_flags