FORS Pipeline Reference Manual  5.0.9
fors_star.h
1 /* $Id: fors_star.h,v 1.21 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.21 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef FORS_STAR_H
29 #define FORS_STAR_H
30 
31 #include <fors_std_star.h>
32 
33 #include <cpl.h>
34 
35 typedef struct _fors_star
36 {
37  fors_point *pixel;
38  double semi_major;
39  double semi_minor;
40  double fwhm;
41  double stellarity_index; /* in [0; 1] */
42  double orientation; /* radians */
43 
44  double magnitude; /* instrumental magnitude (integrated ADU) */
45  double dmagnitude; /* 1 sigma error bar */
46 
47  double magnitude_corr; /* magnitude corrected for gain, atmospheric
48  extinction, exposure time */
49  double dmagnitude_corr;
50 
51  double weight; /* for the user of this module to define the
52  meaning this */
53 
54  const fors_std_star *id; /* copy of identified, or NULL */
55 
56 } fors_star;
57 
58 #undef LIST_ELEM
59 #define LIST_ELEM fors_star
60 #include <list.h>
61 
62 CPL_BEGIN_DECLS
63 
64 fors_star *fors_star_new( double x, double y,
65  double fwhm,
66  double smajor, double sminor,
67  double orientation,
68  double m, double dm,
69  double si);
70 
71 fors_star *fors_star_new_from_table( const cpl_table *tab,
72  unsigned int row,
73  const char *x_col,
74  const char *y_col,
75  const char *fwhm_col,
76  const char *smaj_col,
77  const char *smin_col,
78  const char *theta_col,
79  const char *mag_col,
80  const char *dmag_col,
81  const char *stlndx_col);
82 
83 bool fors_star_check_values( const fors_star *star);
84 
85 void fors_star_delete(fors_star **star);
87 
88 fors_star *
89 fors_star_duplicate(const fors_star *star);
90 
91 bool
92 fors_star_equal(const fors_star *s,
93  const fors_star *t);
94 
95 double fors_star_distsq(const fors_star *s, const fors_star *t);
96 double fors_star_extension(const fors_star *s, void *data);
97 double fors_star_stellarity(const fors_star *s, void *data);
98 double fors_star_ellipticity(const fors_star *s, void *data);
99 
100 bool
102  const fors_star *s2,
103  void *data);
104 
105 void
106 fors_star_print(cpl_msg_severity level, const fors_star *s);
107 
108 void
109 fors_star_print_list(cpl_msg_severity level, const fors_star_list *sl);
110 
111 double
112 fors_star_get_x(const fors_star *s, void *data);
113 
114 double
115 fors_star_get_y(const fors_star *s, void *data);
116 
117 double
118 fors_star_get_zeropoint(const fors_star *s, void *data);
119 
120 double
121 fors_star_get_zeropoint_err(const fors_star *s, void *data);
122 
123 bool
124 fors_star_is_identified(const fors_star *s, void *data);
125 
126 CPL_END_DECLS
127 #endif
double fors_star_get_x(const fors_star *s, void *data)
Get position.
Definition: fors_star.c:467
void fors_star_print_list(cpl_msg_severity level, const fors_star_list *sl)
Print list of stars.
Definition: fors_star.c:443
double fors_star_stellarity(const fors_star *s, void *data)
Get star stellarity.
Definition: fors_star.c:384
double fors_star_ellipticity(const fors_star *s, void *data)
Get star ellipticity.
Definition: fors_star.c:402
bool fors_star_equal(const fors_star *s, const fors_star *t)
Test for equality.
Definition: fors_star.c:309
void fors_star_delete(fors_star **star)
Delete object and set pointer to NULL.
Definition: fors_star.c:273
double fors_star_distsq(const fors_star *s, const fors_star *t)
Get distance between stars.
Definition: fors_star.c:347
void fors_star_print(cpl_msg_severity level, const fors_star *s)
Print object.
Definition: fors_star.c:418
CPL_BEGIN_DECLS fors_star * fors_star_new(double x, double y, double fwhm, double smajor, double sminor, double orientation, double m, double dm, double si)
Constructor.
Definition: fors_star.c:114
bool fors_star_is_identified(const fors_star *s, void *data)
Determine if star was identified.
Definition: fors_star.c:541
fors_star * fors_star_duplicate(const fors_star *star)
Copy constructor.
Definition: fors_star.c:248
double fors_star_get_y(const fors_star *s, void *data)
Get position.
Definition: fors_star.c:485
double fors_star_get_zeropoint_err(const fors_star *s, void *data)
Get zeropoint error.
Definition: fors_star.c:522
double fors_star_extension(const fors_star *s, void *data)
Get star size.
Definition: fors_star.c:365
bool fors_star_brighter_than(const fors_star *s1, const fors_star *s2, void *data)
Compare star brightness.
Definition: fors_star.c:329
bool fors_star_check_values(const fors_star *star)
Copy constructor.
Definition: fors_star.c:227
void fors_star_delete_but_standard(fors_star **star)
Delete object and set pointer to NULL - but ignore the standard star.
Definition: fors_star.c:291
double fors_star_get_zeropoint(const fors_star *s, void *data)
Get zeropoint.
Definition: fors_star.c:504
fors_star * fors_star_new_from_table(const cpl_table *tab, unsigned int row, const char *x_col, const char *y_col, const char *fwhm_col, const char *smaj_col, const char *smin_col, const char *theta_col, const char *mag_col, const char *dmag_col, const char *stlndx_col)
Create a star from a table WITHOUT checking.
Definition: fors_star.c:170