Functions for standard stars


Defines

#define IRPLIB_STD_MAXRADIUS   2.0

Functions

static double irplib_great_circle_dist (double ra1, double dec1, double ra2, double dec2)
 Compute the great-circle distance between two points on a sphere.
static int irplib_std_setactive (const char *catalog)
 Sets the active catalogs for search.
static const irplib_irstd * irplib_std_get_closest_star (double ra_d, double dec_d)
 Find the closest star to a given position.
irplib_irstd * irplib_std_get_mag_one_cat (double ra, double dec, irplib_band band, const char *cat, double *mag)
 Find the closest star from one catalog if the mag is known.
cpl_vector * irplib_std_get_conversion (const cpl_bivector *spec, double dit, double surface, double gain, double mag)
 Get the conversion.
cpl_vector * irplib_std_get_mag_zero (const cpl_bivector *sed, const cpl_vector *waves, double cent_wl)
 Get the 0 magnitude spectrum.
cpl_bivector * irplib_std_get_sed (const char *seds_file, const char *sptype)
 Get the SED.
irplib_irstd * irplib_std_get_type (double ra, double dec)
 Find the closest star from the catalog where the type is known.
irplib_irstd * irplib_std_get_mag (double ra, double dec, irplib_band band, double *mag)
 Find the closest star from the catalog where the mag is known.
const char * irplib_std_band_name (irplib_band band)
 Return a band name.
const char * irplib_std_catalog_name (int cat_id)
 Return a catalog name.
const char * irplib_std_get_name (const irplib_irstd *self)
 Get the name of the given standard star.
const char * irplib_std_get_type_spectral (const irplib_irstd *self)
 Get the spectral type of the given standard star.
const char * irplib_std_get_catalog (const irplib_irstd *self)
 Get the catalog of the given standard star.

Function Documentation

static double irplib_great_circle_dist double  ra1,
double  dec1,
double  ra2,
double  dec2
[static]
 

Compute the great-circle distance between two points on a sphere.

Parameters:
ra1 Right ascension of first point [degrees]
dec1 Declination of first point [degrees]
ra2 Right ascension of second point [degrees]
dec2 Declination of second point [degrees]
Returns:
Non-negative distance [degrees].
See also:
http://en.wikipedia.org/wiki/Great-circle_distance (on 2005-10-23)
Note:
This function is a copy of visir_great_circle_dist().

Definition at line 819 of file irplib_std.c.

Referenced by irplib_std_get_closest_star().

static int irplib_std_setactive const char *  catalog  )  [static]
 

Sets the active catalogs for search.

Parameters:
catalog Name of catalog to activate.
Returns:
int Total number of stars still active in star list.
Pass a catalog name to activate for further searches with irplib_std_get_star functions. Invalid catalog names trigger an error message.

If catalog name is "none", all catalogs are deactivated. If catalog name is "all", all catalogs are activated. If catalog name is NULL, the number of active stars in list is computed and returned.

Definition at line 692 of file irplib_std.c.

Referenced by irplib_std_get_mag(), irplib_std_get_mag_one_cat(), and irplib_std_get_type().

static const irplib_irstd * irplib_std_get_closest_star double  ra_d,
double  dec_d
[static]
 

Find the closest star to a given position.

Parameters:
ra_d Right ascension {in degrees}.
dec_d Declination {in degrees}.
Returns:
Pointer to a standard star object.
Finds out the closest star to a given position and returns it as a newly allocated star object. Provide RA and DEC in degrees!

The returned star object is a pointer to the found star in the internal irstd_list structure, thus must not be freed.

Definition at line 761 of file irplib_std.c.

References irplib_great_circle_dist(), and IRPLIB_STD_MAXRADIUS.

Referenced by irplib_std_get_mag(), irplib_std_get_mag_one_cat(), and irplib_std_get_type().

irplib_irstd* irplib_std_get_mag_one_cat double  ra,
double  dec,
irplib_band  band,
const char *  cat,
double *  mag
 

Find the closest star from one catalog if the mag is known.

Parameters:
ra Right ascension {in degrees}.
dec Declination {in degrees}.
band Band in which we want the magnitude
cat The catalog to search in (cannot be "all")
mag The magnitude
Returns:
Pointer to one standard star object
Note:
FIXME: Redeclare as const

Definition at line 82 of file irplib_std.c.

References irplib_std_get_closest_star(), and irplib_std_setactive().

cpl_vector* irplib_std_get_conversion const cpl_bivector *  spec,
double  dit,
double  surface,
double  gain,
double  mag
 

Get the conversion.

Parameters:
spec the extracted spectrum
dit the DIT (in sec)
surface the surface of the miror (in sq cm)
gain the gain of the instrument (ISAAC=4.5, SINFONI=2.42)
mag the star magnitude
Returns:
the newly allocated conversion or NULL in error case
conversion(wave) = (spec * gain * 10^(mag/2.5) * h * c) / (dit * surface * dispersion * wave)

Definition at line 169 of file irplib_std.c.

cpl_vector* irplib_std_get_mag_zero const cpl_bivector *  sed,
const cpl_vector *  waves,
double  cent_wl
 

Get the 0 magnitude spectrum.

Parameters:
sed the SED in angstroms / ergs/s/cm^2/Angstrom
waves the wavelengths in angstroms
cent_wl the central wavelength in microns
Returns:
the newly allocated spectrum or NULL in error case

Definition at line 228 of file irplib_std.c.

cpl_bivector* irplib_std_get_sed const char *  seds_file,
const char *  sptype
 

Get the SED.

Parameters:
seds_file the table file name
sptype the requested spectral type
Returns:
the newly allocated SED or NULL in error case
wavelength in Angstroms SED in

Definition at line 331 of file irplib_std.c.

irplib_irstd* irplib_std_get_type double  ra,
double  dec
 

Find the closest star from the catalog where the type is known.

Parameters:
ra Right ascension {in degrees}.
dec Declination {in degrees}.
Returns:
Pointer to one standard star object
Note:
FIXME: Redeclare as const

Definition at line 402 of file irplib_std.c.

References irplib_std_get_closest_star(), and irplib_std_setactive().

irplib_irstd* irplib_std_get_mag double  ra,
double  dec,
irplib_band  band,
double *  mag
 

Find the closest star from the catalog where the mag is known.

Parameters:
ra Right ascension {in degrees}.
dec Declination {in degrees}.
band Band in which we want the magnitude
mag The magnitude
Returns:
Pointer to one standard star object
Note:
FIXME: Redeclare as const

Definition at line 459 of file irplib_std.c.

References irplib_std_get_closest_star(), and irplib_std_setactive().

const char* irplib_std_band_name irplib_band  band  ) 
 

Return a band name.

Parameters:
band a BB
Returns:
1 pointer to a static band name.

Definition at line 586 of file irplib_std.c.

const char* irplib_std_catalog_name int  cat_id  ) 
 

Return a catalog name.

Parameters:
cat_id Catalog Id as stored in the star source field
Returns:
1 pointer to a static catalog name.
This function is useful to get the static catalog name supported by the current internal database. Do not modify or try to free the returned string. Since it is static, this would cause a segfault.

Definition at line 619 of file irplib_std.c.

const char* irplib_std_get_name const irplib_irstd *  self  ) 
 

Get the name of the given standard star.

Parameters:
self The standard star
Returns:
The star name or NULL on NULL input

Definition at line 633 of file irplib_std.c.

const char* irplib_std_get_type_spectral const irplib_irstd *  self  ) 
 

Get the spectral type of the given standard star.

Parameters:
self The standard star
Returns:
The spectral type or NULL on NULL input

Definition at line 649 of file irplib_std.c.

const char* irplib_std_get_catalog const irplib_irstd *  self  ) 
 

Get the catalog of the given standard star.

Parameters:
self The standard star
Returns:
The catalog name or NULL on NULL input

Definition at line 666 of file irplib_std.c.


Generated on Tue Jun 19 14:39:22 2007 for UVES Pipeline Reference Manual by  doxygen 1.4.6