FORS Pipeline Reference Manual  5.0.9
fors_std_star.h
1 /* $Id: fors_std_star.h,v 1.14 2010-09-14 07:49:30 cizzo Exp $
2  *
3  * This file is part of the FORS Library
4  * Copyright (C) 2002-2010 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 02110-1301 USA
19  */
20 
21 /*
22  * $Author: cizzo $
23  * $Date: 2010-09-14 07:49:30 $
24  * $Revision: 1.14 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef FORS_STD_STAR_H
29 #define FORS_STD_STAR_H
30 
31 #include <fors_point.h>
32 
33 #include <cpl.h>
34 
35 #include <stdbool.h>
36 
37 CPL_BEGIN_DECLS
38 
39 typedef struct _fors_std_star
40 {
41  fors_point *pixel;
42  double ra, dec;
43  double magnitude; /* Color corrected according to filter used */
44  double dmagnitude; /* 1 sigma error */
45  double cat_magnitude; /* From catalog */
46  double dcat_magnitude; /* From catalog */
47  double color; /* color, defined as difference between bands */
48  double dcolor; /* 1 sigma color error */
49  double cov_catm_color; /* covariance(cat_magnitude, color) */
50  const char *name;
51  bool trusted;
52 } fors_std_star;
53 
54 #undef LIST_ELEM
55 #define LIST_ELEM fors_std_star
56 #include <list.h>
57 
58 fors_std_star *fors_std_star_new( double ra, double dec,
59  double m, double dm,
60  double cat_m, double dcat_m,
61  double col, double dcol,
62  double cov_catm_col,
63  const char *name);
64 
65 fors_std_star *fors_std_star_new_from_table(
66  const cpl_table *tab,
67  unsigned int row,
68  const char *ra_col,
69  const char *dec_col,
70  const char *mag_col,
71  const char *dmag_col,
72  const char *catmag_col,
73  const char *dcatmag_col,
74  const char *color_col,
75  const char *dcolor_col,
76  const char *cov_catm_color_col,
77  const char *x_col,
78  const char *y_col,
79  const char *name_col);
80 
81 void fors_std_star_delete( fors_std_star **s);
82 
83 void fors_std_star_delete_const( const fors_std_star **s);
84 
85 fors_std_star *fors_std_star_duplicate( const fors_std_star *s);
86 
87 void fors_std_star_set_name( fors_std_star *s,
88  const char *name);
89 
90 bool fors_std_star_equal( const fors_std_star *s,
91  const fors_std_star *t);
92 
93 void fors_std_star_print( cpl_msg_severity level,
94  const fors_std_star *star);
95 
96 void fors_std_star_print_list( cpl_msg_severity level,
97  const fors_std_star_list *sl);
98 
99 bool fors_std_star_brighter_than(const fors_std_star *s,
100  const fors_std_star *t,
101  void *data);
102 
103 double fors_std_star_dist_arcsec( const fors_std_star *s,
104  const fors_std_star *t);
105 
106 void fors_std_star_compute_corrected_mag(
107  fors_std_star *s,
108  double color_term,
109  double dcolor_term);
110 
111 CPL_END_DECLS
112 
113 #endif