NACO Pipeline Reference Manual  4.4.0
irplib_stdstar.h
1 /* $Id: irplib_stdstar.h,v 1.16 2013-02-27 10:37:52 llundin Exp $
2  *
3  * This file is part of the irplib package
4  * Copyright (C) 2002,2003 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: llundin $
23  * $Date: 2013-02-27 10:37:52 $
24  * $Revision: 1.16 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef IRPLIB_STDSTAR_H
29 #define IRPLIB_STDSTAR_H
30 
31 /*-----------------------------------------------------------------------------
32  Includes
33  -----------------------------------------------------------------------------*/
34 
35 #include <cpl.h>
36 
37 /*-----------------------------------------------------------------------------
38  Defines
39  -----------------------------------------------------------------------------*/
40 
41 #define IRPLIB_STDSTAR_STAR_COL "STARS"
42 #define IRPLIB_STDSTAR_TYPE_COL "SP_TYPE"
43 #define IRPLIB_STDSTAR_RA_COL "RA"
44 #define IRPLIB_STDSTAR_DEC_COL "DEC"
45 #define IRPLIB_STDSTAR_CAT_COL "CATALOG"
46 
47 /* Maximum allowed distance [arc minutes] between observation and
48  catalogue coordinates */
49 #define IRPLIB_STDSTAR_MAXDIST 2.0
50 
51 /* Magical value to indicate an invalid magnitude */
52 #define IRPLIB_STDSTAR_NOMAG 99.0
53 
54 /* Use this limit in comparisons regarding an invalid magnitude */
55 #define IRPLIB_STDSTAR_LIMIT (IRPLIB_STDSTAR_NOMAG-1.0)
56 
57 /*-----------------------------------------------------------------------------
58  Function prototypes
59  -----------------------------------------------------------------------------*/
60 
61 cpl_error_code
62 irplib_stdstar_write_catalogs(cpl_frameset *, const cpl_frameset *,
63  const char *, const char *, const char *,
64  const char *, const char *,
65  cpl_table * (*)(const char *));
66 cpl_table * irplib_stdstar_load_catalog(const char *, const char *);
67 cpl_error_code irplib_stdstar_check_columns_exist(const cpl_table *);
68 int irplib_stdstar_select_stars_dist(cpl_table *, double, double, double);
69 int irplib_stdstar_select_stars_mag(cpl_table *, const char *);
70 int irplib_stdstar_find_closest(const cpl_table *, double, double);
71 cpl_error_code irplib_stdstar_find_star(const char *, double, double, const char *,
72  const char *, double *, char **, char **, char **,
73  double *, double * , double);
74 cpl_vector * irplib_stdstar_get_conversion(const cpl_bivector *, double, double,
75  double, double);
76 cpl_vector * irplib_stdstar_get_mag_zero(const cpl_bivector *,
77  const cpl_vector *, double);
78 cpl_bivector * irplib_stdstar_get_sed(const char *, const char *);
79 
80 #endif
cpl_vector * irplib_stdstar_get_conversion(const cpl_bivector *, double, double, double, double)
Get the conversion.
cpl_error_code irplib_stdstar_check_columns_exist(const cpl_table *)
Check that the table has the relevant columns of a stdstar table.
int irplib_stdstar_select_stars_dist(cpl_table *, double, double, double)
Select the stars that are within a given distance.
int irplib_stdstar_find_closest(const cpl_table *, double, double)
Find the closest star.
cpl_vector * irplib_stdstar_get_mag_zero(const cpl_bivector *, const cpl_vector *, double)
Get the 0 magnitude spectrum.
cpl_bivector * irplib_stdstar_get_sed(const char *, const char *)
Get the SED.
int irplib_stdstar_select_stars_mag(cpl_table *, const char *)
Select the stars that have a known magnitude.
cpl_error_code irplib_stdstar_write_catalogs(cpl_frameset *set_in, const cpl_frameset *set_raw, const char *recipe_name, const char *pro_cat, const char *pro_type, 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 *, const char *)
Load the FITS catalog in a table.
cpl_error_code irplib_stdstar_find_star(const char *, double, double, const char *, const char *, double *, char **, char **, char **, double *, double *, double)
Find the closest star to ra, dec in the catalog.