FORS Pipeline Reference Manual 4.9.20
|
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: fors-4_9_20 $ 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 fors_star *fors_star_new( double x, double y, 00063 double fwhm, 00064 double smajor, double sminor, 00065 double orientation, 00066 double m, double dm, 00067 double si); 00068 00069 fors_star *fors_star_new_from_table( const cpl_table *tab, 00070 unsigned int row, 00071 const char *x_col, 00072 const char *y_col, 00073 const char *fwhm_col, 00074 const char *smaj_col, 00075 const char *smin_col, 00076 const char *theta_col, 00077 const char *mag_col, 00078 const char *dmag_col, 00079 const char *stlndx_col); 00080 00081 bool fors_star_check_values( const fors_star *star); 00082 00083 void fors_star_delete(fors_star **star); 00084 void fors_star_delete_but_standard(fors_star **star); 00085 00086 fors_star * 00087 fors_star_duplicate(const fors_star *star); 00088 00089 bool 00090 fors_star_equal(const fors_star *s, 00091 const fors_star *t); 00092 00093 double fors_star_distsq(const fors_star *s, const fors_star *t); 00094 double fors_star_extension(const fors_star *s, void *data); 00095 double fors_star_stellarity(const fors_star *s, void *data); 00096 double fors_star_ellipticity(const fors_star *s, void *data); 00097 00098 bool 00099 fors_star_brighter_than(const fors_star *s1, 00100 const fors_star *s2, 00101 void *data); 00102 00103 void 00104 fors_star_print(cpl_msg_severity level, const fors_star *s); 00105 00106 void 00107 fors_star_print_list(cpl_msg_severity level, const fors_star_list *sl); 00108 00109 double 00110 fors_star_get_x(const fors_star *s, void *data); 00111 00112 double 00113 fors_star_get_y(const fors_star *s, void *data); 00114 00115 double 00116 fors_star_get_zeropoint(const fors_star *s, void *data); 00117 00118 double 00119 fors_star_get_zeropoint_err(const fors_star *s, void *data); 00120 00121 bool 00122 fors_star_is_identified(const fors_star *s, void *data); 00123 00124 #endif