sdss_flagval

pydl.pydlutils.sdss.sdss_flagval(flagname, bitname)[source]

Convert bitmask names into values.

Converts human-readable bitmask names into numerical values. The inputs are not case-sensitive; all inputs are converted to upper case internally.

Parameters:
flagnamestr

The name of a bitmask group.

bitnamestr or list

The name(s) of the specific bitmask(s) within the flagname group.

Returns:
numpy.uint64

The value of the bitmask name(s).

Raises:
KeyError

If flagname or bitname are invalid names.

Examples

>>> from pydl.pydlutils.sdss import sdss_flagval
>>> sdss_flagval('ANCILLARY_TARGET1',['BLAZGX','ELG','BRIGHTGAL']) 
2310346608843161600