giutils.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 GIUTILS_H
00029 #define GIUTILS_H
00030
00031 #include <cxtypes.h>
00032
00033 #include <cpl_macros.h>
00034 #include <cpl_image.h>
00035 #include <cpl_propertylist.h>
00036 #include <cpl_frameset.h>
00037
00038
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042
00043 enum GiInstrumentMode {
00044 GIMODE_NONE = 0,
00045 GIMODE_MEDUSA = 1,
00046 GIMODE_IFU = 2,
00047 GIMODE_ARGUS = 3
00048 };
00049
00050 typedef enum GiInstrumentMode GiInstrumentMode;
00051
00052
00053 enum GiBadPixelFlags {
00054
00055 GI_BPIX_OK = 0x00000,
00056
00057
00058 GI_BPIX_CCD = 0x00001,
00059
00060
00061 GI_BPIX_HOT = 0x00003,
00062
00063
00064 GI_BPIX_COLD = 0x00005,
00065
00066
00067 GI_RPIX_DARK = 0x00100,
00068
00069
00070 GI_RPIX_BIAS = 0x00200,
00071
00072
00073 GI_RPIX_CRHM = 0x00400,
00074
00075
00076 GI_RPIX_CRHS = 0x00800,
00077
00078
00079 GI_RPIX_ESTM = 0x01000,
00080
00081
00082 GI_RPIX_EXTO = 0x02000,
00083
00084
00085 GI_APIX_ESTM = 0x10000
00086 };
00087
00088 typedef enum GiBadPixelFlags GiBadPixelFlags;
00089
00090
00091 enum GiBadPixelMasks {
00092
00093 GI_M_PIX_BAD = 0x000ff,
00094
00095
00096 GI_M_PIX_REJECT = 0x0ff00,
00097
00098
00099 GI_M_PIX_SET = 0x0ffff
00100 };
00101
00102 typedef enum GiBadPixelMasks GiBadPixelMasks;
00103
00104
00105 struct GiRecipeInfo {
00106 cxchar* recipe;
00107 cxint sequence;
00108 cxchar* start;
00109 };
00110
00111 typedef struct GiRecipeInfo GiRecipeInfo;
00112
00113
00114 struct GiGroupInfo {
00115 const cxchar* tag;
00116 cpl_frame_group group;
00117 };
00118
00119 typedef struct GiGroupInfo GiGroupInfo;
00120
00121
00122
00123
00124
00125
00126 const cxchar* giraffe_get_license(void);
00127
00128
00129
00130
00131
00132
00133 GiInstrumentMode giraffe_get_mode(cpl_propertylist* properties);
00134
00135 cxchar* giraffe_path_get_basename(const cxchar* path);
00136
00137 cxchar* giraffe_localtime_iso8601(void);
00138
00139 cxint giraffe_add_recipe_info(cpl_propertylist* plist,
00140 const GiRecipeInfo* info);
00141 cxint giraffe_add_frameset_info(cpl_propertylist* plist,
00142 const cpl_frameset* set,
00143 cxint sequence);
00144
00145 cxint giraffe_propertylist_update(cpl_propertylist* self,
00146 cpl_propertylist* properties,
00147 const cxchar* hint);
00148 cxint giraffe_propertylist_copy(cpl_propertylist* self,
00149 const cxchar* name,
00150 const cpl_propertylist* other,
00151 const cxchar* othername);
00152
00153 cxint giraffe_frameset_set_groups(cpl_frameset* set, GiGroupInfo* groups);
00154
00155 cxint giraffe_propertylist_update_wcs(cpl_propertylist* properties,
00156 cxsize naxis,
00157 const cxdouble* crpix,
00158 const cxdouble* crval,
00159 const cxchar** ctype,
00160 const cxchar** cunit,
00161 const cpl_matrix* cd);
00162
00163 cxdouble giraffe_propertylist_get_ron(const cpl_propertylist* properties);
00164
00165 #ifdef __cplusplus
00166 }
00167 #endif
00168
00169 #endif