GIRAFFE Pipeline Reference Manual

giutils.h

00001 /* $Id: giutils.h,v 1.23 2010/06/21 08:56:20 rpalsa Exp $
00002  *
00003  * This file is part of the GIRAFFE Pipeline
00004  * Copyright (C) 2002-2006 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: rpalsa $
00023  * $Date: 2010/06/21 08:56:20 $
00024  * $Revision: 1.23 $
00025  * $Name: giraffe-2_10 $
00026  */
00027 
00028 #ifndef GIUTILS_H
00029 #define GIUTILS_H
00030 
00031 #include <cxtypes.h>
00032 
00033 #include <cpl_macros.h>
00034 #include <cpl_image.h>
00035 #include <cpl_propertylist.h>
00036 #include <cpl_frameset.h>
00037 
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043     enum GiInstrumentMode {
00044         GIMODE_NONE   = 0,
00045         GIMODE_MEDUSA = 1,
00046         GIMODE_IFU    = 2,
00047         GIMODE_ARGUS  = 3
00048     };
00049 
00050     typedef enum GiInstrumentMode GiInstrumentMode;
00051 
00052 
00053     enum GiBadPixelFlags {
00054         /* Good pixel */
00055         GI_BPIX_OK   = 0x00000,
00056 
00057         /* CCD bad pixel */
00058         GI_BPIX_CCD  = 0x00001,
00059 
00060         /* CCD hot pixel */
00061         GI_BPIX_HOT  = 0x00003,
00062 
00063         /* CCD dark pixel */
00064         GI_BPIX_COLD = 0x00005,
00065 
00066         /* Pixel rejected by dark processing */
00067         GI_RPIX_DARK = 0x00100,
00068 
00069         /* Pixel rejected by bias processing */
00070         GI_RPIX_BIAS = 0x00200,
00071 
00072         /* Pixel rejected by multiple CR detection */
00073         GI_RPIX_CRHM = 0x00400,
00074 
00075         /* Pixel rejected by single CR detection */
00076         GI_RPIX_CRHS = 0x00800,
00077 
00078         /* Pixel rejected by estimation */
00079         GI_RPIX_ESTM = 0x01000,
00080 
00081         /* Pixel rejected by optimal extraction */
00082         GI_RPIX_EXTO = 0x02000,
00083 
00084         /* 2D growing in both directions */
00085         GI_APIX_ESTM = 0x10000
00086     };
00087 
00088     typedef enum GiBadPixelFlags GiBadPixelFlags;
00089 
00090 
00091     enum GiBadPixelMasks {
00092         /* CCD bad pixels */
00093         GI_M_PIX_BAD    = 0x000ff,
00094 
00095         /* Pixels rejected by processing */
00096         GI_M_PIX_REJECT = 0x0ff00,
00097 
00098         /* Any bad pixel */
00099         GI_M_PIX_SET    = 0x0ffff
00100     };
00101 
00102     typedef enum GiBadPixelMasks GiBadPixelMasks;
00103 
00104 
00105     struct GiRecipeInfo {
00106         cxchar* recipe;
00107         cxint sequence;
00108         cxchar* start;
00109     };
00110 
00111     typedef struct GiRecipeInfo GiRecipeInfo;
00112 
00113 
00114     struct GiGroupInfo {
00115         const cxchar* tag;
00116         cpl_frame_group group;
00117     };
00118 
00119     typedef struct GiGroupInfo GiGroupInfo;
00120 
00121 
00122     /*
00123      * Static information retrieval
00124      */
00125 
00126     const cxchar* giraffe_get_license(void);
00127 
00128 
00129     /*
00130      * Miscellaneous
00131      */
00132 
00133     GiInstrumentMode giraffe_get_mode(cpl_propertylist* properties);
00134 
00135     cxchar* giraffe_path_get_basename(const cxchar* path);
00136 
00137     cxchar* giraffe_localtime_iso8601(void);
00138 
00139     cxint giraffe_add_recipe_info(cpl_propertylist* plist,
00140                                 const GiRecipeInfo* info);
00141     cxint giraffe_add_frameset_info(cpl_propertylist* plist,
00142                                     const cpl_frameset* set,
00143                                     cxint sequence);
00144 
00145     cxint giraffe_propertylist_update(cpl_propertylist* self,
00146                                     cpl_propertylist* properties,
00147                                     const cxchar* hint);
00148     cxint giraffe_propertylist_copy(cpl_propertylist* self,
00149                                     const cxchar* name,
00150                                     const cpl_propertylist* other,
00151                                     const cxchar* othername);
00152 
00153     cxint giraffe_frameset_set_groups(cpl_frameset* set, GiGroupInfo* groups);
00154 
00155     cxint giraffe_propertylist_update_wcs(cpl_propertylist* properties,
00156                                           cxsize naxis,
00157                                           const cxdouble* crpix,
00158                                           const cxdouble* crval,
00159                                           const cxchar** ctype,
00160                                           const cxchar** cunit,
00161                                           const cpl_matrix* cd);
00162 
00163     cxdouble giraffe_propertylist_get_ron(const cpl_propertylist* properties);
00164 
00165 #ifdef __cplusplus
00166 }
00167 #endif
00168 
00169 #endif /* GIUTILS_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.10.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Mar 7 14:11:03 2013 by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2004