36 #include "omega_dfs.h"
37 #include "omega_fits.h"
43 #if defined CPL_VERSION_CODE && CPL_VERSION_CODE <= CPL_VERSION(5, 5, 0)
45 #define CPL_SIZE_FORMAT "d"
50 #define freespace(_p) if (_p != NULL) {cpl_free(_p); _p = NULL;}
51 #define freeframe(_p) if (_p != NULL) {cpl_frame_delete(_p); _p = NULL;}
52 #define freeimage(_p) if (_p != NULL) {cpl_image_delete(_p); _p = NULL;}
53 #define freeilist(_p) if (_p != NULL) {cpl_imagelist_delete(_p); _p = NULL;}
54 #define freeframeset(_p) if (_p != NULL) {cpl_frameset_delete(_p); _p = NULL;}
55 #define freetable(_p) if (_p != NULL) {cpl_table_delete(_p); _p = NULL;}
56 #define freeplist(_p) if (_p != NULL) {cpl_propertylist_delete(_p); _p = NULL;}
57 #define freestats(_p) if (_p != NULL) {cpl_stats_delete(_p); _p = NULL;}
58 #define freefits(_p) if (_p != NULL) {omega_fits_delete(_p); _p = NULL;}
59 #define freelfits(_p,_n) if (_p != NULL) {omega_fits_delete_list(_p,_n); _p = NULL;}
60 #define freetfits(_p) if (_p != NULL) {omega_tfits_delete(_p); _p = NULL;}
61 #define freemask(_p) if (_p != NULL) {cpl_mask_delete(_p); _p = NULL;}
62 #define freematrix(_p) if (_p != NULL) {cpl_matrix_delete(_p); _p = NULL;}
63 #define freevector(_p) if (_p != NULL) {cpl_vector_delete(_p); _p = NULL;}
64 #define freebivector(_p) if (_p != NULL) {cpl_bivector_delete(_p); _p = NULL;}
65 #define freematrix(_p) if (_p != NULL) {cpl_matrix_delete(_p); _p = NULL;}
66 #define freewcs(_p) if (_p != NULL) {cpl_wcs_delete(_p); _p = NULL;}
67 #define freearray(_p) if (_p != NULL) {cpl_array_delete(_p); _p = NULL;}
79 extern void omega_extensions(
const cpl_frame *frame,
int inexten,
int *out1,
int *out2);
81 cpl_size *labels, cpl_size nlab,
84 int ext, cpl_stats **diffstats);
89 int omega_save_dummy(cpl_frameset *
set, cpl_parameterlist *parlist,cpl_frame_type type,
90 cpl_type_bpp bitpix,
const char *outfile,
const cpl_propertylist *plist,
91 const char *recipe, cpl_frame *product_frame);
94 const char *outfile,
const char *recipe,
const cpl_propertylist *plist,
95 cpl_frame *product_frame,
const cpl_frame *inherit);
98 char *
omega_create_name(
const char *instrument,
const char *name,
const char *suffix);
102 int omega_save_image(
const cpl_image *img,cpl_frameset *
set,
const cpl_parameterlist *pars,
103 cpl_propertylist *alist,
const cpl_propertylist *qclist,cpl_type_bpp bpp,
104 const char *name,
const char *recipe, cpl_frame *frame,
105 const cpl_frame *inherit,
int isfirst);
107 int omega_save_table(
const cpl_table *tbl,cpl_frameset *
set,
const cpl_parameterlist *pars,
108 cpl_propertylist *alist,
const cpl_propertylist *qclist,
const char *name,
109 const char *recipe, cpl_frame *frame,
const cpl_frame *inherit,
int isfirst);
111 int omega_save_fits(omega_fits *scifits,cpl_frameset *
set,
const cpl_parameterlist *pars,
112 const cpl_propertylist *qclist, cpl_type_bpp bpp,
const char *name,
113 const char *recipe,cpl_frame *product_frame,
const cpl_frame *inherit,
115 cpl_error_code omega_get_pixelscale(cpl_propertylist *plist,
116 double * pixscale_x,
double * pixscale_y);
119 cpl_propertylist * wcslist2,
double * xshift,
double * yshift);