irplib_pfits.h

00001 /* $Id: irplib_pfits.h,v 1.12 2008/04/11 22:46:00 llundin Exp $
00002  *
00003  * This file is part of the irplib package 
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., 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: llundin $
00023  * $Date: 2008/04/11 22:46:00 $
00024  * $Revision: 1.12 $
00025  * $Name: naco-4_3_3 $
00026  */
00027 
00028 #ifndef IRPLIB_PFITS_H
00029 #define IRPLIB_PFITS_H
00030 
00031 /*-----------------------------------------------------------------------------
00032                                    Includes
00033  -----------------------------------------------------------------------------*/
00034 
00035 #include <cpl.h>
00036 
00037 #include "irplib_utils.h"
00038 #include "irplib_framelist.h"
00039 
00040 /*-----------------------------------------------------------------------------
00041                                    Define
00042  -----------------------------------------------------------------------------*/
00043 
00044 /* Maximum size of FITS string value */
00045 #define IRPLIB_FITS_STRLEN 68
00046 
00047 #define irplib_pfits_get_bool(LIST, KEY) \
00048   irplib_pfits_get_bool_macro(LIST, KEY, cpl_func, __FILE__, __LINE__)
00049 
00050 #define irplib_pfits_get_double(LIST, KEY) \
00051   irplib_pfits_get_double_macro(LIST, KEY, cpl_func, __FILE__, __LINE__)
00052 
00053 #define irplib_pfits_get_int(LIST, KEY) \
00054   irplib_pfits_get_int_macro(LIST, KEY, cpl_func, __FILE__, __LINE__)
00055 
00056 #define irplib_pfits_get_string(LIST, KEY) \
00057   irplib_pfits_get_string_macro(LIST, KEY, cpl_func, __FILE__, __LINE__)
00058 
00059 #define IRPLIB_PFITS_STRING_DPR_CATG          "ESO DPR CATG"
00060 #define IRPLIB_PFITS_STRING_DPR_TECH          "ESO DPR TECH"
00061 #define IRPLIB_PFITS_STRING_DPR_TYPE          "ESO DPR TYPE"
00062 
00063 #define IRPLIB_PFITS_REGEXP_DPR      \
00064     IRPLIB_PFITS_STRING_DPR_CATG "|" \
00065     IRPLIB_PFITS_STRING_DPR_TECH "|" \
00066     IRPLIB_PFITS_STRING_DPR_TYPE
00067 
00068 #define IRPLIB_PFITS_WCS_REGEXP "WCSAXES|WCSNAME|(PC|CD|PV|PS)[0-9]+_[0-9]+|" \
00069                                 "C(RVAL|RPIX|DELT|TYPE|UNIT|RDER|SYER)[0-9]+"
00070 
00071 #define IRPLIB_PFITS_REGEXP_PAF "DATE-OBS|MJD-OBS|ARCFILE|ESO TPL ID"
00072 
00073 /* DATE + EXTEND are already done, WCS needs handling elsewhere */
00074 #define IRPLIB_PFITS_REGEXP_RECAL_LAMP "EXPTIME"
00075 /* DATE + EXTEND are already done, WCS needs handling elsewhere */
00076 #define IRPLIB_PFITS_REGEXP_RECAL IRPLIB_PFITS_REGEXP_RECAL_LAMP "|AIRMASS"
00077 
00078 /*-----------------------------------------------------------------------------
00079                                    Defines
00080  -----------------------------------------------------------------------------*/
00081 
00082 #define IRPLIB_DFS_DOCATG_FROM_DPR(DOCATG, MATCH_CATG,                         \
00083                                            MATCH_TYPE,                         \
00084                                            MATCH_TECH)                         \
00085     if ((docatg == NULL) && ((irplib_dfs_find_words MATCH_CATG) == 0)          \
00086                          && ((irplib_dfs_find_words MATCH_TYPE) == 0)          \
00087                          && ((irplib_dfs_find_words MATCH_TECH) == 0))         \
00088         docatg = (DOCATG);
00089 
00090 /*-----------------------------------------------------------------------------
00091                             Function prototypes
00092   -----------------------------------------------------------------------------*/
00093 
00094 const char * irplib_pfits_get_dpr_catg(const cpl_propertylist *);
00095 const char * irplib_pfits_get_dpr_tech(const cpl_propertylist *);
00096 const char * irplib_pfits_get_dpr_type(const cpl_propertylist *);
00097 
00098 cpl_boolean irplib_pfits_get_bool_macro(const cpl_propertylist * ,
00099                     const char *, const char *,
00100                     const char *, unsigned);
00101 
00102 double irplib_pfits_get_double_macro(const cpl_propertylist *,
00103                                      const char *, const char *,
00104                                      const char *, unsigned);
00105 
00106 int irplib_pfits_get_int_macro(const cpl_propertylist * ,
00107                                const char *, const char *,
00108                                const char *, unsigned);
00109 
00110 const char * irplib_pfits_get_string_macro(const cpl_propertylist * ,
00111                                            const char *, const char *,
00112                                            const char *, unsigned);
00113 
00114 /* Other functions */
00115 
00116 cpl_error_code irplib_pfits_set_airmass(cpl_propertylist *,
00117                                         const irplib_framelist *);
00118 
00119 int irplib_dfs_find_words(const char *, const char *, ...)
00120 #ifdef __GNUC__
00121     __attribute__((format (printf, 2, 3)))
00122 #endif
00123 ;
00124 
00125 cpl_error_code irplib_dfs_check_framelist_tag(const irplib_framelist *,
00126                                               const char * (*)(const char*,
00127                                                                const char*,
00128                                                                const char*));
00129 #endif

Generated on Tue Mar 12 15:19:52 2013 for NACO Pipeline Reference Manual by  doxygen 1.4.7