sinfo_functions.h

00001 /* $Id: sinfo_functions.h,v 1.13 2009/03/04 10:17:38 amodigli Exp $
00002  *
00003  * This file is part of the SINFONI Pipeline
00004  * Copyright (C) 2002,2003 European Southern Observatory
00005  *
00006  * This proram 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: amodigli $
00023  * $Date: 2009/03/04 10:17:38 $
00024  * $Revision: 1.13 $
00025  * $Name: HEAD $
00026  */
00027 #ifndef SINFO_FUNCTIONS_H
00028 #define SINFO_FUNCTIONS_H
00029 
00030 #include <cpl.h>
00031 #include <sinfo_time.h>
00032 #include <sinfo_globals.h>
00033 #include <sinfo_skycor.h>
00034 
00035 int sinfo_print_rec_status(const int val);
00036 
00037 cpl_frameset *
00038 sinfo_frameset_extract(const cpl_frameset *frames,const char *tag);
00039 
00040 int 
00041 sinfo_propertylist_has(cpl_propertylist* plist,const char* key);
00042 
00043 cpl_vector* 
00044 sinfo_vector_clip(const cpl_vector* vinp, 
00045                   const double kappa, 
00046                   const int n, 
00047                   const int method);
00048 
00049 
00050 int
00051 sinfo_image_estimate_noise(cpl_image* img,
00052                             const int noise_fit, 
00053                             double* centre, 
00054                double* noise);
00055 
00056 
00057 cpl_table* sinfo_compute_gain(cpl_frameset* son, cpl_frameset* sof);
00058 cpl_table* sinfo_compute_linearity(cpl_frameset* son, cpl_frameset* sof);
00059 cpl_error_code sinfo_fit_lm(const cpl_matrix *x, 
00060                             const cpl_matrix *sigma_x,
00061                 const cpl_vector *y, 
00062                             const cpl_vector *sigma_y,
00063                       cpl_vector *a, 
00064                             const int ia[],
00065                 int    (*f)(const double x[], 
00066                                         const double a[], 
00067                           double *result),
00068                  int (*dfda)(const double x[], 
00069                                              const double a[], 
00070                          double result[]),
00071                  double *mse,
00072                  double *red_chisq,
00073                  cpl_matrix **covariance);
00074 
00075 void
00076 sinfo_fit_amoeba(double**p, 
00077        double y[], 
00078        int ndim, 
00079        double ftol, 
00080        double (*funk)(double[]),
00081        int* nfunk);
00082 
00083 int sinfo_vector_dindgen(cpl_vector** v);
00084 int sinfo_is_fits_file(const char *filename);
00085 cpl_error_code
00086 sinfo_extract_frames_group_type(const cpl_frameset * set, 
00087                                 cpl_frameset** ext, cpl_frame_group type);
00088 cpl_error_code sinfo_frameset_merge(cpl_frameset * set1, 
00089                                     cpl_frameset* set2);
00090 cpl_error_code
00091 sinfo_table_correl(cpl_table * t1, 
00092                    cpl_table* t2, 
00093                    cpl_table* range,
00094                    double* xcor);
00095 int 
00096 sinfo_get_pupil_shift(cpl_imagelist* iml,const int n,cpl_table** qclog_tbl);
00097 int sinfo_get_preoptic(const char* file,const char* val);
00098 int sinfo_get_keyvalue_int(cpl_frame * ref_frame, const char* key_name);
00099 float sinfo_get_keyvalue_float(cpl_frame * ref_frame, const char* key_name);
00100 double sinfo_get_keyvalue_double(cpl_frame * ref_frame, const char* key_name);
00101 char sinfo_get_keyvalue_bool(cpl_frame * ref_frame, const char* key_name);
00102 const char* 
00103 sinfo_get_keyvalue_string(cpl_frame * ref_frame, const char* key_name);
00104 int sinfo_get_strehl_type(cpl_frameset* sof);
00105 double sinfo_get_wave_cent(const char* band);
00106 void sinfo_memory_status(void);
00107 int sinfo_check_rec_status(const int val);
00108 void 
00109 sinfo_add_pro_fits_key(cpl_propertylist * plist,  
00110                        char* pro_catg, 
00111                        char* file_name, 
00112                        char* out_name);
00113 /* ---------------------------------------------------------------------- 
00114    group of frames
00115 ---------------------------------------------------------------------- */
00116 
00117 
00118 
00119 int 
00120 sinfoni_extract_raw_linearity_frames(cpl_frameset * sof, cpl_frameset** raw);
00121 int sinfoni_extract_raw_dark_frames(cpl_frameset * sof, cpl_frameset** raw);
00122 int sinfo_extract_raw_pinhole_frames(cpl_frameset * sof, cpl_frameset** raw);
00123 int sinfo_extract_raw_slit_frames(cpl_frameset * sof, cpl_frameset** raw);
00124 int sinfo_extract_raw_stack_frames(cpl_frameset * sof, cpl_frameset** pro);
00125 int sinfo_extract_on_frames(cpl_frameset * sof, cpl_frameset* on);
00126 int sinfo_extract_off_frames(cpl_frameset * sof, cpl_frameset* off);
00127 
00128 int sinfo_extract_raw_frames(cpl_frameset * sof, cpl_frameset** raw); 
00129 int sinfoni_extract_pro_frames(cpl_frameset * sof, cpl_frameset** pro); 
00130 int sinfo_extract_cdb_frames(cpl_frameset * sof, cpl_frameset** cdb);
00131  
00132 int sinfo_extract_obj_frames(cpl_frameset * sof, cpl_frameset* obj);
00133 int sinfo_extract_sky_frames(cpl_frameset * sof, cpl_frameset* sky);
00134 int sinfo_extract_mst_frames(cpl_frameset * sof, cpl_frameset* cdb); 
00135 int sinfo_extract_stk_frames(cpl_frameset * sof, cpl_frameset* res);
00136 int 
00137 sinfo_extract_preoptic_frames(cpl_frameset * sof, 
00138                               cpl_frameset** res, 
00139                               const char* pre_opt);
00140 
00141 double sinfo_get_cumoffsetx(cpl_frame * frame);
00142 double sinfo_get_cumoffsety(cpl_frame * frame);
00143 int sinfo_tag_is_objpro(char * tag);
00144 int sinfo_extract_obj_products(cpl_frameset * sof, cpl_frameset* obj);
00145 
00146 cpl_frameset* sinfo_frameset_join(cpl_frameset* fs1,cpl_frameset* fs2);
00147 
00148 const char* sinfo_get_pix_scale(float ps);
00149 int sinfo_pix_scale_isnot_const(float* pix_scale, int size);
00150 
00151 int sinfo_contains_frames_kind(cpl_frameset * sof, 
00152                                  cpl_frameset* raw,
00153                                  const char*         type);
00154 
00155 int sinfo_contains_frames_type(cpl_frameset * sof, 
00156                                     cpl_frameset** raw,
00157                                     const char*          type);
00158 
00159 
00160 int sinfo_extract_raw_frames_type(cpl_frameset * sof, 
00161                                     cpl_frameset** raw,
00162                                     const char*          type);
00163 
00164 int sinfo_extract_raw_frames_type2(cpl_frameset * sof, 
00165                                     cpl_frameset** raw,
00166                                     const char*          type);
00167 
00168 int sinfo_extract_raw_frames_type1(cpl_frameset * sof, 
00169                                     cpl_frameset* raw,
00170                                     const char*          type);
00171 
00172 int sinfo_extract_frames_type(cpl_frameset * sof, 
00173                                 cpl_frameset * raw,
00174                 const char*          type);
00175 
00176 int sinfo_remove_qc_frames(cpl_frameset* sof,cpl_frameset** raw);
00177 /* ---------------------------------------------------------------------- 
00178    single frames
00179 ---------------------------------------------------------------------- */
00180 double sinfo_get_mjd_obs(cpl_frame * frame);
00181 int sinfo_frame_is_raw(char * tag); 
00182 int sinfoni_frame_is_pro(char * tag); 
00183 int sinfo_frame_is_cdb(char * tag); 
00184 int sinfo_frame_is_stk(char * tag); 
00185 int sinfo_frame_is_preoptic(cpl_frame*, const char* val); 
00186 
00187 int sinfo_frame_is_pinhole_lamp(char * tag); 
00188 int sinfo_frame_is_raw_stack(char * tag); 
00189 int sinfo_frame_is_slit_lamp(char * tag); 
00190 
00191 
00192 int sinfo_is_flat_bp(char * tag);
00193 int sinfo_is_flat_lindet(char * tag);
00194 int sinfo_is_dark(char * tag);
00195 int sinfoni_is_pinhole_lamp(char * tag) ;
00196 int sinfoni_is_raw_stack(char * tag) ;
00197 
00198 int sinfoni_is_lamp_slit(char * tag) ;
00199 int sinfo_is_sky_flat(char * tag) ;
00200 
00201 int sinfo_is_mflat(char * tag) ;
00202 int sinfo_is_master_flat(char * tag) ;
00203 int sinfo_is_master_flat_dither(char * tag) ;
00204 
00205 int sinfo_is_stack(char * tag) ;
00206 int sinfo_is_lamp_wave_stacked(char * tag) ;
00207 int sinfo_is_lamp_flux_stacked(char * tag) ;
00208 int sinfo_is_psf_calibrator_stacked(char * tag) ;
00209 int sinfo_is_focus_stacked(char * tag) ;
00210 int sinfo_is_object_nodding_stacked(char * tag) ;
00211 int sinfo_is_sky_nodding_stacked(char * tag) ;
00212 int sinfo_is_object_skyspider_stacked(char * tag) ;
00213 
00214 
00215 int sinfo_blank2dot(const char * in, char* ou) ;
00216 int sinfo_is_bpmap(char *) ;
00217 int sinfo_is_slitpos(char * tag) ;
00218 int sinfo_is_wavemap(char * tag) ;
00219 int sinfo_is_halosp(char * tag) ;
00220 int sinfo_is_distlist(char * tag) ;
00221 int sinfo_is_firstcol(char * tag) ;
00222 int sinfo_is_fibres_on_off(cpl_frameset * sof, 
00223                  cpl_frameset* raw);
00224 /* ---------------------------------------------------------------------- 
00225    Extra functionalities
00226 ---------------------------------------------------------------------- */
00227 int
00228 sinfo_clean_nan(cpl_image** im);
00229 
00230 int  sinfo_get_clean_mean_window(cpl_image* img, 
00231                                  int llx, 
00232                                  int lly, 
00233                                  int urx, 
00234                                  int ury, 
00235                                  const int kappa, 
00236                                  const int nclip, 
00237                                  double* sinfo_clean_mean, 
00238                                  double* clean_stdev);
00239 
00240 int sinfo_get_obsname(cpl_frame * ref_frame, const char* ob_name);
00241 
00242 
00243  int sinfo_get_ron(cpl_frameset    *   framelist,
00244                 const int ron_xmin,
00245                 const int ron_xmax,
00246                 const int ron_ymin,
00247                 const int ron_ymax,
00248                 const int ron_hsize,
00249                 const int ron_nsamp,
00250              double** ron);
00251 int sinfo_stack_get_pro_tag(char * tag_in, char* tag_out) ; 
00252 int sinfo_compare_tags(const cpl_frame *, const cpl_frame *) ;
00253 
00254 int sinfo_get_spatial_res(cpl_frame * ref_frame,char * spat_res);
00255 int sinfo_frame_is_dither(cpl_frame * ref_frame);
00256 int sinfo_frame_is_sky(cpl_frame * ref_frame);
00257 int sinfo_tag_is_obj(char * ref_frame);
00258 int sinfo_tag_is_sky(char * ref_frame);
00259 
00260 int sinfo_frame_is_on(cpl_frame * ref_frame);
00261 int sinfo_get_band(cpl_frame * ref_frame,char * band);
00262 int sinfo_get_ins_set(char* band,int* ins_set);
00263 int sinfoni_get_ins_setting(cpl_frame * ref_file,char * set_id);
00264 int sinfo_pfits_add_qc(cpl_propertylist * plist,qc_log * qclog);
00265 
00266 
00267 
00268 
00269 
00270 
00271 CPL_END_DECLS
00272 
00273 #endif

Generated on 3 Mar 2013 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1