unwrap_specobjid

pydl.pydlutils.sdss.unwrap_specobjid(specObjID, run2d_integer=False, specLineIndex=False)[source]

Unwrap CAS-style specObjID into plate, fiber, mjd, run2d.

See sdss_specobjid() for details on how the bits within a specObjID are assigned.

Parameters:
specObjIDnumpy.ndarray

An array containing 64-bit integers or strings. If strings are passed, they will be converted to integers internally.

run2d_integerbool, optional

If True, do not attempt to convert the encoded run2d values to a string of the form ‘vN_M_P’.

specLineIndexbool, optional

If True interpret any low-order bits as being an ‘index’ rather than a ‘line’.

Returns:
numpy.recarray

A record array with the same length as specObjID, with the columns ‘plate’, ‘fiber’, ‘mjd’, ‘run2d’, ‘line’.

Examples

>>> from numpy import array, uint64
>>> from pydl.pydlutils.sdss import unwrap_specobjid
>>> unwrap_specobjid(array([4565636362342690816], dtype=uint64))
rec.array([(4055, 408, 55359, 'v5_7_0', 0)],
          dtype=[('plate', '<i4'), ('fiber', '<i4'), ('mjd', '<i4'), ('run2d', '<U8'), ('line', '<i4')])