fors_star.h

00001 /* $Id: fors_star.h,v 1.21 2010-09-14 07:49:30 cizzo Exp $
00002  *
00003  * This file is part of the FORS Library
00004  * Copyright (C) 2002-2010 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00019  */
00020 
00021 /*
00022  * $Author: cizzo $
00023  * $Date: 2010-09-14 07:49:30 $
00024  * $Revision: 1.21 $
00025  * $Name: not supported by cvs2svn $
00026  */
00027 
00028 #ifndef FORS_STAR_H
00029 #define FORS_STAR_H
00030 
00031 #include <fors_std_star.h>
00032 
00033 #include <cpl.h>
00034 
00035 typedef struct _fors_star
00036 {
00037     fors_point *pixel;
00038     double semi_major;
00039     double semi_minor;
00040     double fwhm;
00041     double stellarity_index;    /* in [0; 1] */
00042     double orientation;         /* radians */
00043 
00044     double magnitude;           /* instrumental magnitude (integrated ADU) */
00045     double dmagnitude;          /* 1 sigma error bar */
00046 
00047     double magnitude_corr;      /* magnitude corrected for gain, atmospheric
00048                                    extinction, exposure time */
00049     double dmagnitude_corr;
00050 
00051     double weight;              /* for the user of this module to define the
00052                                    meaning this */
00053 
00054     const fors_std_star *id;    /* copy of identified, or NULL */
00055 
00056 } fors_star;
00057 
00058 #undef LIST_ELEM
00059 #define LIST_ELEM fors_star
00060 #include <list.h>
00061 
00062 CPL_BEGIN_DECLS
00063 
00064 fors_star *fors_star_new(                   double x, double y,
00065                                                         double fwhm,
00066                                             double smajor, double sminor,
00067                                                         double orientation,
00068                                                         double m, double dm,
00069                                             double si);
00070 
00071 fors_star *fors_star_new_from_table(        const cpl_table *tab,
00072                                             unsigned int    row,
00073                                             const char      *x_col,
00074                                             const char      *y_col,
00075                                             const char      *fwhm_col,
00076                                             const char      *smaj_col,
00077                                             const char      *smin_col,
00078                                             const char      *theta_col,
00079                                             const char      *mag_col,
00080                                             const char      *dmag_col,
00081                                             const char      *stlndx_col);
00082 
00083 bool fors_star_check_values(                const fors_star *star);
00084 
00085 void fors_star_delete(fors_star **star);
00086 void fors_star_delete_but_standard(fors_star **star);
00087 
00088 fors_star *
00089 fors_star_duplicate(const fors_star *star);
00090 
00091 bool
00092 fors_star_equal(const fors_star *s,
00093                 const fors_star *t);
00094 
00095 double fors_star_distsq(const fors_star *s, const fors_star *t);
00096 double fors_star_extension(const fors_star *s, void *data);
00097 double fors_star_stellarity(const fors_star *s, void *data);
00098 double fors_star_ellipticity(const fors_star *s, void *data);
00099 
00100 bool
00101 fors_star_brighter_than(const fors_star *s1,
00102                         const fors_star *s2,
00103                         void *data);
00104 
00105 void
00106 fors_star_print(cpl_msg_severity level, const fors_star *s);
00107 
00108 void
00109 fors_star_print_list(cpl_msg_severity level, const fors_star_list *sl);
00110 
00111 double
00112 fors_star_get_x(const fors_star *s, void *data);
00113 
00114 double
00115 fors_star_get_y(const fors_star *s, void *data);
00116 
00117 double
00118 fors_star_get_zeropoint(const fors_star *s, void *data);
00119 
00120 double
00121 fors_star_get_zeropoint_err(const fors_star *s, void *data);
00122 
00123 bool
00124 fors_star_is_identified(const fors_star *s, void *data);
00125 
00126 CPL_END_DECLS
00127 #endif

Generated on 12 Feb 2016 for FORS Pipeline Reference Manual by  doxygen 1.6.1