HAWKI Pipeline Reference Manual 1.8.12
|
00001 /* $Id: hawki_utils.h,v 1.43 2012/12/06 16:55:32 cgarcia Exp $ 00002 * 00003 * This file is part of the HAWKI Pipeline 00004 * Copyright (C) 2002,2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00021 /* 00022 * $Author: cgarcia $ 00023 * $Date: 2012/12/06 16:55:32 $ 00024 * $Revision: 1.43 $ 00025 * $Name: hawki-1_8_12 $ 00026 */ 00027 00028 #ifndef HAWKI_UTILS_H 00029 #define HAWKI_UTILS_H 00030 00031 /*----------------------------------------------------------------------------- 00032 Includes 00033 -----------------------------------------------------------------------------*/ 00034 00035 #include <cpl.h> 00036 00037 /*----------------------------------------------------------------------------- 00038 New types 00039 -----------------------------------------------------------------------------*/ 00040 00041 typedef enum _HAWKI_BAND_ { 00042 HAWKI_BAND_J, 00043 HAWKI_BAND_H, 00044 HAWKI_BAND_K, 00045 HAWKI_BAND_Y, 00046 HAWKI_BAND_UNKNOWN 00047 } hawki_band ; 00048 00049 /*----------------------------------------------------------------------------- 00050 Define 00051 -----------------------------------------------------------------------------*/ 00052 00053 #define HAWKI_NB_DETECTORS 4 00054 #define HAWKI_PHOT_STAR_RADIUS 30.0 00055 #define HAWKI_DET_NPIX_X 2048 00056 #define HAWKI_DET_NPIX_Y 2048 00057 00058 /* Input from commissionning 1 report */ 00059 #define HAWKI_DET1_POSX 0 00060 #define HAWKI_DET1_POSY 0 00061 #define HAWKI_DET2_POSX 2048 + 153 00062 #define HAWKI_DET2_POSY 0 + 3 00063 #define HAWKI_DET3_POSX 2048 + 157 00064 #define HAWKI_DET3_POSY 2048 + 144 00065 #define HAWKI_DET4_POSX 0 + 5 00066 #define HAWKI_DET4_POSY 2048 + 142 00067 00068 #define HAWKI_NB_VC 32 00069 00070 #define HAWKI_HEADER_EXT_FORWARD "DET CHIP|DET WIN NX|DET WIN NY|DET WIN STARTX|DET WIN STARTY" 00071 00072 #define HAWKI_HEADER_WCS "CTYPE1|CTYPE2|CRVAL1|CRVAL2|CRPIX1|CRPIX2|CD1_1|CD1_2|CD2_1|CD2_2" 00073 00074 #define HAWKI_HEADER_COMB_OFFSETS "ESO QC COMBINED" 00075 00076 #define HAWKI_HEADER_PRI_TOPAF "^(ARCFILE|MJD-OBS|INSTRUME|ESO TPL ID|ESO TPL NEXP|ESO DPR CATG|ESO DPR TECH|ESO DPR TYPE|DATE-OBS|ESO INS GRAT NAME|ESO INS GRAT WLEN|ESO INS OPTI1 ID|ESO OBS ID|ESO DET MINDIT|ESO DET RSPEED|ESO DET DIT|ESO DET NDIT|ESO DET NCORRS NAME|ESO INS FILT1 NAME|ESO INS FILT2 NAME|ESO MODE NAME|ESO NDSAMPLES)$" 00077 00078 #define HAWKI_HEADER_EXT_TOPAF "ESO DET CHIP ID|ESO DET CHIP NO|ESO DET CHIP LIVE" 00079 00080 /*----------------------------------------------------------------------------- 00081 Prototypes 00082 -----------------------------------------------------------------------------*/ 00083 00084 CPL_BEGIN_DECLS 00085 void hawki_print_banner(void); 00086 const char * hawki_get_license(void); 00087 const char * hawki_get_version(void); 00088 00089 cpl_image * hawki_compute_lsbg 00090 (const cpl_image * in); 00091 cpl_image * hawki_compute_darkbpm 00092 (const cpl_image * in, 00093 double sigma); 00094 cpl_image * hawki_compute_flatbpm 00095 (const cpl_image * in, 00096 double sigma, 00097 double lowval, 00098 double highval); 00099 cpl_error_code hawki_image_inverse_threshold 00100 (cpl_image * image_in, 00101 double lo_valid, 00102 double hi_valid, 00103 double assign_in_range, 00104 double assign_out_range); 00105 int hawki_apply_harmonization 00106 (cpl_imagelist * in, 00107 double h1, 00108 double h2, 00109 double h3, 00110 double h4); 00111 int hawki_compute_harmonization 00112 (const cpl_imagelist * in, 00113 double * h1, 00114 double * h2, 00115 double * h3, 00116 double * h4, 00117 double * h); 00118 const char * hawki_extract_first_filename 00119 (const cpl_frameset * in, 00120 const char * tag); 00121 hawki_band hawki_get_band 00122 (const char * band); 00123 const char * hawki_std_band_name 00124 (hawki_band band); 00125 cpl_image * hawki_images_stitch 00126 (cpl_image ** ima, 00127 double * x, 00128 double * y); 00129 cpl_bivector * hawki_get_header_tel_offsets 00130 (const cpl_frameset * frameset); 00131 double hawki_get_mean_airmass(cpl_frameset * set); 00132 int * hawki_detectors_labelise 00133 (const cpl_frameset * frameset); 00134 int hawki_detectors_locate_star 00135 (const cpl_frameset * in, 00136 double star_ra, 00137 double star_dec, 00138 int * labels); 00139 double hawki_vector_get_min_select 00140 (const cpl_vector * self, const cpl_vector * valid); 00141 double hawki_vector_get_max_select 00142 (const cpl_vector * self, const cpl_vector * valid); 00143 double hawki_vector_get_mode(cpl_vector * vec); 00144 int hawki_utils_check_equal_double_keys 00145 (cpl_frameset * frames, double (*func)(const cpl_propertylist *)); 00146 int hawki_utils_check_equal_int_keys 00147 (cpl_frameset * frames, int (*func)(const cpl_propertylist *)); 00148 void hawki_utils_ra2str(char * str, int length_str, double ra); 00149 void hawki_utils_dec2str(char * str, int length_str, double dec); 00150 cpl_error_code hawki_frameset_append 00151 (cpl_frameset *self, const cpl_frameset *other); 00152 CPL_END_DECLS 00153 00154 #endif