53#define MODULE_ID "CPL_IMAGE_FIT_GAUSSIAN"
69 cpl_propertylist* plist=NULL;
80 double um2angstrom=1.e4;
82 cpl_frame* frame=NULL;
84 sprintf(namei,
"/home/amodigli/pipelines/workspace/xshoop/xsh/tests/telluric_model_catalog_vis.fits");
85 sprintf(nameo,
"telluric_model_catalog_vis_new.fits");
86 frame=cpl_frame_new();
87 cpl_frame_set_filename(frame,namei);
88 cpl_frame_set_type(frame,CPL_FRAME_TYPE_TABLE);
89 cpl_frame_set_tag(frame,
"TEST");
90 cpl_frame_set_group(frame,CPL_FRAME_GROUP_CALIB);
91 next=cpl_frame_get_nextensions(frame);
95 tbl=cpl_table_load(namei, i+1, 1);
96 plist=cpl_propertylist_load(namei,i);
97 nrow=cpl_table_get_nrow(tbl);
99 wave=cpl_table_get_data_double(tbl,
"lam");
100 for(j=0;j<nrow;j++) {
105 lambda2=lambda*lambda;
106 lambda4=lambda2*lambda2;
108 lam_c=1.e-4*lambda/(1.0002735182+131.4182/lambda2+2.76249e8/lambda4);
113 cpl_table_save(tbl,plist,NULL,nameo,CPL_IO_DEFAULT);
115 cpl_table_save(tbl,plist,NULL,nameo,CPL_IO_EXTEND);
123 cpl_frame_delete(frame);
126 if (cpl_error_get_code() != CPL_ERROR_NONE) {
134int main(
int argc,
char* argv[])
137 cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING);
141 return cpl_test_end(0);
int main()
Unit test of xsh_bspline_interpol.
#define xsh_error_dump(level)
#define xsh_msg_warning(...)
Print an warning message.
#define xsh_msg(...)
Print a message on info level.
void xsh_free_table(cpl_table **t)
Deallocate a table and set the pointer to NULL.
void xsh_free_propertylist(cpl_propertylist **p)
Deallocate a property list and set the pointer to NULL.