sdss_flagname

pydl.pydlutils.sdss.sdss_flagname(flagname, flagvalue, concat=False)[source]

Return a list of flag names corresponding to the values.

Parameters:
flagnamestr

The name of a bitmask group. Not case-sensitive.

flagvaluelong

The value to be converted into bitmask names.

concatbool, optional

If set to True, the list of names is converted to a space-separated string.

Returns:
str or list

The names of the bitmasks encoded in flagvalue.

Raises:
KeyError

If flagname is invalid

Examples

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