Computes the long Spec IDs from its individual components. |
The bit-fields (starting from bit# 63) and their lengths are: plate[14] - bits 50-63 for the plate number, fiber[12] - bits 38-49 for (MJD - 50000), mjd[14] - bits 24-37 for the fiberid, run2d[14] - bits 10-23 for the spec2d rerun, and 0 - bits 0-9 unused in SpecObj, used for line/redshift/index in other tables. select dbo.fSpecidFromSDSS(266,51630,145) as specObjID |
name | type | length | inout | pnum |
@plate | int | 4 | input | 1 |
@mjd | int | 4 | input | 2 |
@fiber | int | 4 | input | 3 |
@run2d | varchar | 32 | input | 4 |
bigint | 8 | output | 0 |