Functions for standard stars


Functions

int irplib_stdstar_write_catalogs (cpl_frameset *set_in, const cpl_frameset *set_raw, const char *recipe_name, const char *pro_cat, const char *package_name, const char *ins_name, cpl_table *(*convert_ascii_table)(const char *))
 Write the ASCII catalogs as FITS files.
cpl_table * irplib_stdstar_load_catalog (const char *filename, const char *ext_name)
 Load the FITS catalog in a table.
int irplib_stdstar_select_stars_dist (cpl_table *cat, double ra, double dec, double dist)
 Select the stars that are within a given distance.
int irplib_stdstar_select_stars_mag (cpl_table *cat, const char *mag)
 Select the stars that have a known magnitude.
int irplib_stdstar_find_closest (const cpl_table *cat, double ra, double dec)
 Find the closest star.
int irplib_stdstar_get_mag (const char *catfile, double ra, double dec, const char *band, const char *catname, double *mag, char *name, char *type, double dist_am)
 Look for the mag in the catalog.
cpl_vector * irplib_stdstar_get_conversion (const cpl_bivector *spec, double dit, double surface, double gain, double mag)
 Get the conversion.
cpl_vector * irplib_stdstar_get_mag_zero (const cpl_bivector *sed, const cpl_vector *waves, double cent_wl)
 Get the 0 magnitude spectrum.
cpl_bivector * irplib_stdstar_get_sed (const char *seds_file, const char *sptype)
 Get the SED.

Function Documentation

int irplib_stdstar_write_catalogs ( cpl_frameset *  set_in,
const cpl_frameset *  set_raw,
const char *  recipe_name,
const char *  pro_cat,
const char *  package_name,
const char *  ins_name,
cpl_table *(*)(const char *)  convert_ascii_table 
)

Write the ASCII catalogs as FITS files.

Parameters:
set_in Input frameset wher the product is registered
set_raw Set of ASCII catalogs
recipe_name Recipe name
pro_cat PRO.CATG
package_name Usually PACKAGE "/" PACKAGE_VERSION
ins_name Instrument name
Returns:
0 if ok, -1 in error case
Every catalog will be written in a different extension, where EXTNAME is the name of the catalog ASCII file name.

The conversion ascii -> cpl_table is done by convert_ascii_table() and should be defined in each instrument

Definition at line 81 of file irplib_stdstar.c.

cpl_table* irplib_stdstar_load_catalog ( const char *  filename,
const char *  ext_name 
)

Load the FITS catalog in a table.

Parameters:
filename Name of the FITS catalog
ext_name Name of the catalog or "all"
Returns:
The newly allocated table orNULL in error case.
The table is loaded from the specified extension. If "all" is specified, all extension with the same columns as the first one are loaded and put together in the returned table.

The returned table must be de allocated with cpl_table_delete().

Definition at line 183 of file irplib_stdstar.c.

Referenced by irplib_stdstar_get_mag().

int irplib_stdstar_select_stars_dist ( cpl_table *  cat,
double  ra,
double  dec,
double  dist 
)

Select the stars that are within a given distance.

Parameters:
cat the catalog
ra RA pos
dec DEC pos
dist the distancw
Returns:
0 if ok, -1 in error case
The stars that are within not further than dist from ra,dec are selected in the table.

Definition at line 279 of file irplib_stdstar.c.

Referenced by irplib_stdstar_get_mag().

int irplib_stdstar_select_stars_mag ( cpl_table *  cat,
const char *  mag 
)

Select the stars that have a known magnitude.

Parameters:
cat the catalog
mag the column name with the searched magnitude
Returns:
0 if ok, -1 in error case
The stars whose magnitude in the mag band is known are selected in the table.

Definition at line 328 of file irplib_stdstar.c.

Referenced by irplib_stdstar_get_mag().

int irplib_stdstar_find_closest ( const cpl_table *  cat,
double  ra,
double  dec 
)

Find the closest star.

Parameters:
cat the catalog
ra RA pos
dec DEC pos
Returns:
the index of the star in the table or -1 in error case
Returns the index of the star that is closest to (ra,dec)

Definition at line 364 of file irplib_stdstar.c.

Referenced by irplib_stdstar_get_mag().

int irplib_stdstar_get_mag ( const char *  catfile,
double  ra,
double  dec,
const char *  band,
const char *  catname,
double *  mag,
char *  name,
char *  type,
double  dist_am 
)

Look for the mag in the catalog.

Parameters:
cat the catalog file name
ra RA pos
dec DEC pos
band the band name
cat the searched catalog name
mag the computed magnitude
name the star name
type the star type
dist_am the distance in arc minutes
Returns:
0 if ok, -1 in error case
If cat is "all", all the catalogs are searched at once

Definition at line 427 of file irplib_stdstar.c.

References irplib_stdstar_find_closest(), irplib_stdstar_load_catalog(), irplib_stdstar_select_stars_dist(), and irplib_stdstar_select_stars_mag().

cpl_vector* irplib_stdstar_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 517 of file irplib_stdstar.c.

cpl_vector* irplib_stdstar_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 576 of file irplib_stdstar.c.

cpl_bivector* irplib_stdstar_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 679 of file irplib_stdstar.c.


Generated on Thu Nov 15 14:32:37 2007 for UVES Pipeline Reference Manual by  doxygen 1.5.1