irplib_pfits.h

00001 /* $Id: irplib_pfits.h,v 1.11 2006/11/15 08:27:10 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: 2006/11/15 08:27:10 $
00024  * $Revision: 1.11 $
00025  * $Name: visir-3_5_0 $
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_double(LIST, KEY) \
00048   irplib_pfits_get_double_macro(LIST, KEY, cpl_func, __FILE__, __LINE__)
00049 
00050 #define irplib_pfits_get_int(LIST, KEY) \
00051   irplib_pfits_get_int_macro(LIST, KEY, cpl_func, __FILE__, __LINE__)
00052 
00053 #define irplib_pfits_get_string(LIST, KEY) \
00054   irplib_pfits_get_string_macro(LIST, KEY, cpl_func, __FILE__, __LINE__)
00055 
00056 #define IRPLIB_PFITS_STRING_DPR_CATG          "ESO DPR CATG"
00057 #define IRPLIB_PFITS_STRING_DPR_TECH          "ESO DPR TECH"
00058 #define IRPLIB_PFITS_STRING_DPR_TYPE          "ESO DPR TYPE"
00059 
00060 #define IRPLIB_PFITS_REGEXP_DPR      \
00061     IRPLIB_PFITS_STRING_DPR_CATG "|" \
00062     IRPLIB_PFITS_STRING_DPR_TECH "|" \
00063     IRPLIB_PFITS_STRING_DPR_TYPE
00064 
00065 #define IRPLIB_PFITS_WCS_REGEXP "WCSAXES|WCSNAME|(PC|CD|PV|PS)[0-9]+_[0-9]+|" \
00066                                 "C(RVAL|RPIX|DELT|TYPE|UNIT|RDER|SYER)[0-9]+"
00067 
00068 #define IRPLIB_PFITS_REGEXP_PAF "DATE-OBS|MJD-OBS|ARCFILE|ESO TPL ID"
00069 
00070 /* DATE + EXTEND are already done, WCS needs handling elsewhere */
00071 #define IRPLIB_PFITS_REGEXP_RECAL "EXPTIME|AIRMASS"
00072 
00073 /*-----------------------------------------------------------------------------
00074                                    Defines
00075  -----------------------------------------------------------------------------*/
00076 
00077 #define IRPLIB_DFS_DOCATG_FROM_DPR(DOCATG, MATCH_CATG,                         \
00078                                            MATCH_TYPE,                         \
00079                                            MATCH_TECH)                         \
00080     if ((docatg == NULL) && ((irplib_dfs_find_words MATCH_CATG) == 0)          \
00081                          && ((irplib_dfs_find_words MATCH_TYPE) == 0)          \
00082                          && ((irplib_dfs_find_words MATCH_TECH) == 0))         \
00083         docatg = (DOCATG);
00084 
00085 /*-----------------------------------------------------------------------------
00086                             Function prototypes
00087   -----------------------------------------------------------------------------*/
00088 
00089 const char * irplib_pfits_get_dpr_catg(const cpl_propertylist *);
00090 const char * irplib_pfits_get_dpr_tech(const cpl_propertylist *);
00091 const char * irplib_pfits_get_dpr_type(const cpl_propertylist *);
00092 
00093 double irplib_pfits_get_double_macro(const cpl_propertylist *,
00094                                      const char *, const char *,
00095                                      const char *, unsigned);
00096 
00097 int irplib_pfits_get_int_macro(const cpl_propertylist * ,
00098                                const char *, const char *,
00099                                const char *, unsigned);
00100 
00101 const char * irplib_pfits_get_string_macro(const cpl_propertylist * ,
00102                                            const char *, const char *,
00103                                            const char *, unsigned);
00104 
00105 /* Other functions */
00106 
00107 cpl_error_code irplib_pfits_set_airmass(cpl_propertylist *,
00108                                         const irplib_framelist *);
00109 
00110 int irplib_dfs_find_words(const char *, const char *, ...)
00111 #ifdef __GNUC__
00112     __attribute__((format (printf, 2, 3)))
00113 #endif
00114 ;
00115 
00116 cpl_error_code irplib_dfs_check_framelist_tag(const irplib_framelist *,
00117                                               const char * (*)(const char*,
00118                                                                const char*,
00119                                                                const char*));
00120 #endif

Generated on Mon Feb 6 15:23:48 2012 for VISIR Pipeline Reference Manual by  doxygen 1.5.8