PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v0.7.0 »
- SDSS Utilities (`pydl.pydlutils`) »
- sdss_flagname

# sdss_flagname

`pydl.pydlutils.sdss.``sdss_flagname`(flagname, flagvalue, concat=False)

  Return a list of flag names corresponding to the values.

  Parameters:

  flagname : `str`

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

  flagvalue : `long`

  > The value to be converted into bitmask names.

  concat : `bool`, 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:

  :exc:`KeyError`

  > If `flagname` is invalid

  Examples

      >>> from pydl.pydlutils.sdss import sdss_flagname
      >>> sdss_flagname('ANCILLARY_TARGET1',2310346608843161600) # doctest: +REMOTE_DATA
      ['BRIGHTGAL', 'BLAZGX', 'ELG']