QAFlags

class musered.QAFlags(table, additional_flags=None)[source]

Bases: object

Manage QA flags.

Parameters
tabledataset.Table

The table containing the flags.

additional_flagsdict

Additional flags, added to the default FLAGS dict.

Attributes Summary

names

Return the list of flag names.

Methods Summary

add(exps, *flags[, value])

Add flags to exposures.

as_table([indexes, remove_empty_columns])

Return the flags table as an astropy Table.

find(*flags[, _and, flag_dict])

Find exposures that have some flags.

list(exps)

List flags for exposures.

remove(exps, *flags)

Remove flags from exposures.

Attributes Documentation

names

Return the list of flag names.

Methods Documentation

add(exps, *flags, value=1)[source]

Add flags to exposures.

as_table(indexes=None, remove_empty_columns=True)[source]

Return the flags table as an astropy Table.

find(*flags, _and=False, flag_dict=None)[source]

Find exposures that have some flags.

Examples:

>>> mr.flags.find(mr.flags.SHORT_EXPTIME) 
>>> flags.find(flag_dict={flags.SHORT_EXPTIME: 2,
...                       flags.IMPHOT_BAD_SCALE: 2}) 
list(exps)[source]

List flags for exposures.

remove(exps, *flags)[source]

Remove flags from exposures.