SC_REGION
Name
sc_region
Purpose
Extract a region of a star catalog about some location.
Description
Generates a temporary table in the database of stars that are in a
region of the sky centered on the input coordinates. Also generates a new
field tangsep in the table that is the distance in radians from the
point specified by ra/dec to the object in the given record.
Category
Database
Calling Sequence
sc_region, db, ra, dec, radius, tmptbl
Inputs
db - handle to an open mysql ddatabase
ra - ra of serach location (radians)
dec - dec of serach location (radians)
radius - maximum disance from ra/dec to look (radians)
Optional Input Parameters
Keyword Input Parameters
MAG_MIN - faint limit of star magnitude to return (eg. 12.0)
MAG_MAX - bright limit of star magnitude to return (eg. -3.0)
SCLASS - Spectral classification, as a regexp
(eg. [ab]0 for a0 and b0 class)
default is to return all types.
TBLNAME - Name of table to query in the DB, default='ppm_catalog'
Outputs
tmptbl - name of temporary table that was created
Keyword Output Parameters
Common Blocks
Side Effects
Restrictions
Procedure
Send 'DROP TABLE '+tmptbl+';' to mysql to close the table when you
are done with it. The temporary table will disappear once the handle
to the database is droped.
Modification History
2002/02/07, Writen by David Tucker
2002/02/19, DT, expanded to sc_region and sc_nearest
2014/02/18, MWB, fixed a long-standing problem with a small number of inputs