FUNCTION  fGetNearbySpecObjEq

Returns table of spectrum objects within @r arcmins of an equatorial point (@ra, @dec).

There is no limit on the number of objects returned.

returned table:

  • specObjID bigint, -- unique spectrum ID
  • plate int NOT NULL, -- spectroscopic plate number
  • mjd int NOT NULL, -- MJD of observation
  • fiberID int NOT NULL, -- fiber number on plate
  • z real NOT NULL, -- final spectroscopic redshift
  • zErr real NOT NULL, -- redshift error
  • zWarning int NOT NULL, -- warning flags
  • cx float NOT NULL, -- x of normal unit vector in J2000
  • cy float NOT NULL, -- y of normal unit vector in J2000
  • cz float NOT NULL, -- z of normal unit vector in J2000
  • htmID bigint, -- 20-deep HTM ID
  • distance float -- distance in arc minutes
    Sample call to find SpecObj within 0.5 arcminutes of ra,dec 180.0, -0.5

    select *
    from dbo.fGetNearbySpecObjXYZ(180.0, -0.5, 0,5)

    see also fGetNearbySpecObjEq, fGetNearestSpecObjXYZ, fGetNearestSpecObjXYZ
  • Input and output parameters

    nametypelengthinoutpnum
    @rafloat8input1
    @decfloat8input2
    @rfloat8input3
    plateint4output2
    mjdint4output3
    fiberIDint4output4
    zWarningint4output7
    zreal4output5
    zErrreal4output6
    cxfloat8output8
    cyfloat8output9
    czfloat8output10
    distancefloat8output12
    specObjIDbigint8output1
    htmIDbigint8output11