HAWKI Pipeline Reference Manual 1.8.6
|
00001 /* $Id: hawki_utils.h,v 1.41 2011/09/16 15:18:04 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: 2011/09/16 15:18:04 $ 00024 * $Revision: 1.41 $ 00025 * $Name: hawki-1_8_6 $ 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 void hawki_print_banner(void); 00085 const char * hawki_get_license(void); 00086 const char * hawki_get_version(void); 00087 00088 cpl_image * hawki_compute_lsbg 00089 (const cpl_image * in); 00090 cpl_image * hawki_compute_darkbpm 00091 (const cpl_image * in, 00092 double sigma); 00093 cpl_image * hawki_compute_flatbpm 00094 (const cpl_image * in, 00095 double sigma, 00096 double lowval, 00097 double highval); 00098 cpl_error_code hawki_image_inverse_threshold 00099 (cpl_image * image_in, 00100 double lo_valid, 00101 double hi_valid, 00102 double assign_in_range, 00103 double assign_out_range); 00104 int hawki_apply_harmonization 00105 (cpl_imagelist * in, 00106 double h1, 00107 double h2, 00108 double h3, 00109 double h4); 00110 int hawki_compute_harmonization 00111 (const cpl_imagelist * in, 00112 double * h1, 00113 double * h2, 00114 double * h3, 00115 double * h4, 00116 double * h); 00117 const char * hawki_extract_first_filename 00118 (const cpl_frameset * in, 00119 const char * tag); 00120 hawki_band hawki_get_band 00121 (const char * band); 00122 const char * hawki_std_band_name 00123 (hawki_band band); 00124 cpl_image * hawki_images_stitch 00125 (cpl_image ** ima, 00126 double * x, 00127 double * y); 00128 cpl_bivector * hawki_get_header_tel_offsets 00129 (const cpl_frameset * frameset); 00130 double hawki_get_mean_airmass(cpl_frameset * set); 00131 int * hawki_detectors_labelise 00132 (const cpl_frameset * frameset); 00133 int hawki_detectors_locate_star 00134 (const cpl_frameset * in, 00135 double star_ra, 00136 double star_dec, 00137 int * labels); 00138 double hawki_vector_get_min_select 00139 (const cpl_vector * self, const cpl_vector * valid); 00140 double hawki_vector_get_max_select 00141 (const cpl_vector * self, const cpl_vector * valid); 00142 double hawki_vector_get_mode(cpl_vector * vec); 00143 int hawki_utils_check_equal_double_keys 00144 (cpl_frameset * frames, double (*func)(const cpl_propertylist *)); 00145 int hawki_utils_check_equal_int_keys 00146 (cpl_frameset * frames, int (*func)(const cpl_propertylist *)); 00147 void hawki_utils_ra2str(char * str, int length_str, double ra); 00148 void hawki_utils_dec2str(char * str, int length_str, double dec); 00149 #endif