hawki_utils.h

00001 /* $Id: hawki_utils.h,v 1.38 2010/02/23 14:03:11 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: 2010/02/23 14:03:11 $
00024  * $Revision: 1.38 $
00025  * $Name: hawki-1_8_0 $
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 const char * hawki_get_license(void);
00085 void hawki_print_banner(void);
00086 const char * hawki_get_version(void);
00087 cpl_image * hawki_compute_lsbg
00088 (const cpl_image *     in);
00089 cpl_image * hawki_compute_darkbpm
00090 (const cpl_image *     in,
00091  double                sigma);
00092 cpl_image * hawki_compute_flatbpm
00093 (const cpl_image *   in,
00094  double              sigma,
00095  double              lowval,
00096  double              highval);
00097 cpl_error_code hawki_image_inverse_threshold
00098 (cpl_image *    image_in,
00099  double         lo_valid,
00100  double         hi_valid,
00101  double         assign_in_range,
00102  double         assign_out_range);
00103 int hawki_apply_harmonization
00104 (cpl_imagelist *       in,
00105  double                h1,
00106  double                h2,
00107  double                h3,
00108  double                h4);
00109 int hawki_compute_harmonization
00110 (const cpl_imagelist * in,
00111  double *              h1,
00112  double *              h2,
00113  double *              h3,
00114  double *              h4,
00115  double *              h);
00116 const char * hawki_extract_first_filename
00117 (const cpl_frameset *  in,
00118  const char *          tag);
00119 hawki_band hawki_get_band
00120 (const char *          band);
00121 const char * hawki_std_band_name
00122 (hawki_band            band);
00123 cpl_image * hawki_images_stitch
00124 (cpl_image **    ima,
00125  double    *     x,
00126  double    *     y);
00127 cpl_bivector * hawki_get_header_tel_offsets
00128 (const cpl_frameset *  frameset);
00129 double hawki_get_mean_airmass(cpl_frameset    *   set);
00130 int * hawki_detectors_labelise
00131 (const cpl_frameset *  frameset);
00132 int hawki_detectors_locate_star
00133 (const cpl_frameset * in,
00134  double               star_ra,
00135  double               star_dec,
00136  int                * labels);
00137 double hawki_vector_get_min_select
00138 (const cpl_vector * self, const cpl_vector * valid);
00139 double hawki_vector_get_max_select
00140 (const cpl_vector * self, const cpl_vector * valid);
00141 double hawki_vector_get_mode(cpl_vector * vec);
00142 #endif

Generated on Thu Feb 17 17:13:08 2011 for HAWKI Pipeline Reference Manual by  doxygen 1.4.7