sdss_objid

pydl.pydlutils.sdss.sdss_objid(run, camcol, field, objnum, rerun=301, skyversion=None, firstfield=None)[source]

Convert SDSS photometric identifiers into CAS-style ObjID.

Bits are assigned in ObjID thus:

Bits Name Comment
63 empty unassigned
59-62 skyVersion resolved sky version (0-15)
48-58 rerun number of pipeline rerun
32-47 run run number
29-31 camcol camera column (1-6)
28 firstField is this the first field in segment? Usually 0.
16-27 field field number within run
0-15 object object number within field
Parameters:
run, camcol, field, objnum : int or array of int

Run, camcol, field and object number within field. If arrays are passed, all must have the same length.

rerun, skyversion, firstfield : int or array of int, optional

rerun, skyversion and firstfield usually don’t change at all, especially for ObjIDs in DR8 and later. If supplied, make sure the size matches all the other values.

Returns:
:class:`numpy.ndarray` of :class:`numpy.int64`

The ObjIDs of the objects.

Raises:
:exc:`ValueError`

If the sizes of the arrays don’t match or if the array values are out of bounds.

Notes

  • The firstField flag is never set in ObjIDs from DR8 and later.
  • On 32-bit systems, makes sure to explicitly declare all inputs as 64-bit integers.

Examples

>>> from pydl.pydlutils.sdss import sdss_objid
>>> print(sdss_objid(3704,3,91,146))
[1237661382772195474]