00001
00002
00003 #ifndef _FITSEXPORT_H
00004 #define _FITSEXPORT_H
00005
00006 #include "drms.h"
00007 #include "cfitsio.h"
00008 #if USE_FITS_STRUCTS
00009 #include "fitsio.h"
00010 #endif
00011
00012 enum FE_Keyword_ExtType_enum
00013 {
00014 kFE_Keyword_ExtType_None = 0,
00015 kFE_Keyword_ExtType_Integer,
00016 kFE_Keyword_ExtType_Float,
00017 kFE_Keyword_ExtType_String,
00018 kFE_Keyword_ExtType_Logical,
00019 kFE_Keyword_ExtType_End
00020 };
00021
00022 typedef enum FE_Keyword_ExtType_enum FE_Keyword_ExtType_t;
00023
00024
00025
00026
00027
00028
00029
00030 int fitsexport_export_tofile(DRMS_Segment_t *seg, const char *cparms, const char *fileout, char **actualfname, unsigned long long *expsize);
00031
00032
00033
00034
00035
00036
00037
00038
00039 int fitsexport_mapexport_tofile(DRMS_Segment_t *seg,
00040 const char *cparms,
00041 const char *clname,
00042 const char *mapfile,
00043 const char *fileout,
00044 char **actualfname,
00045 unsigned long long *expsize);
00046
00047 int fitsexport_mapexport_tofile2(DRMS_Segment_t *seg,
00048 const char *cparms,
00049 const char *clname,
00050 const char *mapfile,
00051 const char *fileout,
00052 char **actualfname,
00053 unsigned long long *expsize,
00054 export_callback_func_t callback);
00055
00056 #if USE_FITS_STRUCTS
00057 int fitsexport_mapexport_tostdout(fitsfile *fitsPtr, DRMS_Segment_t *seg, const char *clname, const char *mapfile);
00058 #endif
00059
00060 CFITSIO_KEYWORD *fitsexport_mapkeys(DRMS_Segment_t *seg,
00061 const char *clname,
00062 const char *mapfile,
00063 int *status);
00064
00065
00066 int fitsexport_exportkey(DRMS_Keyword_t *key, CFITSIO_KEYWORD **fitskeys);
00067 int fitsexport_mapexportkey(DRMS_Keyword_t *key,
00068 const char *clname,
00069 Exputl_KeyMap_t *map,
00070 CFITSIO_KEYWORD **fitskeys);
00071
00072
00073
00074
00075
00076
00077 int fitsexport_getextkeyname(DRMS_Keyword_t *key, char *nameOut, int size);
00078
00079
00080
00081
00082
00083
00084
00085
00086 int fitsexport_getmappedextkeyname(DRMS_Keyword_t *key,
00087 const char *class,
00088 Exputl_KeyMap_t *map,
00089 char *nameOut,
00090 int size);
00091
00092 int fitsexport_getmappedextkeyvalue(DRMS_Keyword_t *key, char **fitsKwString);
00093
00094 int fitsexport_fitskeycheck(const char *fitsName);
00095
00096
00097
00098
00099
00100 int fitsexport_getintkeyname(const char *keyname, char *nameOut, int size);
00101
00102
00103
00104
00105
00106
00107
00108 int fitsexport_getmappedintkeyname(const char *keyname,
00109 const char *class,
00110 Exputl_KeyMap_t *map,
00111 char *nameOut,
00112 int size);
00113
00114 int fitsexport_importkey(CFITSIO_KEYWORD *fitskey, HContainer_t *keys, int verbose);
00115 int fitsexport_mapimportkey(CFITSIO_KEYWORD *fitskey,
00116 const char *clname,
00117 const char *mapfile,
00118 HContainer_t *keys,
00119 int verbose);
00120
00121 FE_Keyword_ExtType_t fitsexport_keyword_getcast(DRMS_Keyword_t *key);
00122
00123 int fitsexport_fitskeycheck(const char *fitsName);
00124
00125 int fitsexport_getextname(const char *strin, char **extname, char **cast);
00126
00146 #endif // _FITSEXPORT_H