FUNCTION  fGetNearbySpecObjAllXYZ

Returns table of all spectrum objects within @r arcmins of an xyz point (@nx,@ny, @nz).

There is no limit on the number of objects returned.

returned table:

  • objID bigint, -- Photo primary object identifier
  • run int NOT NULL, -- run that observed this object
  • camcol int NOT NULL, -- camera column that observed the object
  • field int NOT NULL, -- field that had the object
  • rerun int NOT NULL, -- computer processing run that discovered the object
  • type int NOT NULL, -- type of the object (3=Galaxy, 6= star, see PhotoType in DBconstants)
  • mode tinyint NOT NULL, -- mode of photoObj
  • cx float NOT NULL, -- x,y,z of unit vector to this object
  • cy float NOT NULL,
  • cz float NOT NULL,
  • htmID bigint, -- Hierarchical Trangular Mesh id of this object
  • distance float -- distance in arc minutes to this object from the ra,dec.
    Sample call to find SpecObj within 0.5 arcminutes of xyz -.0996,-.1,0

    select *
    from dbo.fGetNearbySpecObjAllXYZ(-.996,-.1,0,0.5)

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

    nametypelengthinoutpnum
    @nxfloat8input1
    @nyfloat8input2
    @nzfloat8input3
    @rfloat8input4
    plateint4output2
    mjdint4output3
    fiberIDint4output4
    zWarningint4output7
    sciencePrimaryint4output8
    zreal4output5
    zErrreal4output6
    cxfloat8output9
    cyfloat8output10
    czfloat8output11
    distancefloat8output13
    specObjIDbigint8output1
    htmIDbigint8output12