unwrap_objid¶
-
pydl.photoop.photoobj.
unwrap_objid
(objid)[source]¶ Unwrap CAS-style objID into run, camcol, field, id, rerun.
See
sdss_objid()
for details on how the bits within an objID are assigned.Parameters: objid :
numpy.ndarray
An array containing 64-bit integers or strings. If strings are passed, they will be converted to integers internally.
Returns: A record array with the same length as objid, with the columns ‘run’, ‘camcol’, ‘frame’, ‘id’, ‘rerun’, ‘skyversion’.
Notes
For historical reasons, the inverse of this function,
sdss_objid()
is not in the same namespace as this function.‘frame’ is used instead of ‘field’ because record arrays have a method of the same name.
Examples
>>> from numpy import array >>> from pydl.photoop.photoobj import unwrap_objid >>> unwrap_objid(array([1237661382772195474])) rec.array([(2, 301, 3704, 3, 91, 146)], dtype=[('skyversion', '<i4'), ('rerun', '<i4'), ('run', '<i4'), ('camcol', '<i4'), ('frame', '<i4'), ('id', '<i4')])