00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef IRPLIB_PFITS_H
00029 #define IRPLIB_PFITS_H
00030
00031
00032
00033
00034
00035 #include <cpl.h>
00036
00037 #include "irplib_utils.h"
00038 #include "irplib_framelist.h"
00039
00040
00041
00042
00043
00044
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
00074 #define IRPLIB_PFITS_REGEXP_RECAL_LAMP "EXPTIME"
00075
00076 #define IRPLIB_PFITS_REGEXP_RECAL IRPLIB_PFITS_REGEXP_RECAL_LAMP "|AIRMASS"
00077
00078
00079
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
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
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