irplib_pfits.h
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_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
00071 #define IRPLIB_PFITS_REGEXP_RECAL "EXPTIME|AIRMASS"
00072
00073
00074
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
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
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