38 #include "visir_recipe.h"
44 #define RECIPE_STRING "visir_img_psf"
50 static cpl_error_code visir_img_psf_save(cpl_frameset *,
51 const cpl_parameterlist *,
54 VISIR_RECIPE_DEFINE(visir_img_psf,
55 VISIR_PARAM_NODPOS | VISIR_PARAM_AUTOBPM |
56 VISIR_PARAM_STRIPITE | VISIR_PARAM_STRIPMOR |
57 VISIR_PARAM_STRIPNON |
58 VISIR_PARAM_GLITCH | VISIR_PARAM_PURGE,
60 "This recipe simply computes the FWHM of a bright object.\n"
61 "The files listed in the Set Of Frames (sof-file) "
63 "VISIR-psf-file.fits " VISIR_IMG_PSF_RAW
"\n"
64 MAN_VISIR_CALIB_BPM_IMG);
84 static int visir_img_psf(cpl_frameset * framelist,
85 const cpl_parameterlist * parlist)
87 irplib_framelist * allframes = NULL;
88 irplib_framelist * rawframes = NULL;
91 cpl_imagelist * nodded = NULL;
92 cpl_table * tab = NULL;
101 skip_if(allframes == NULL);
103 skip_if (rawframes == NULL);
106 visir_property_regexp,
118 cpl_msg_info(cpl_func,
"Construct the nodded images");
120 NULL, CPL_FALSE, 0.0, 0);
121 if (nodded == NULL) {
122 cpl_msg_error(cpl_func,
"Cannot combine the input frames");
126 nfiles = cpl_imagelist_get_size(nodded);
129 tab = visir_table_new_xypos(nodded,
"FWHM");
131 skip_if (tab == NULL);
134 cpl_msg_info(cpl_func,
"Save the produced combined image");
135 skip_if (visir_img_psf_save(framelist, parlist, tab));
141 cpl_imagelist_delete(nodded);
143 cpl_table_delete(tab);
145 return cpl_error_get_code();
157 static cpl_error_code visir_img_psf_save(cpl_frameset * set,
158 const cpl_parameterlist * parlist,
159 const cpl_table * tab)
163 VISIR_IMG_PSF_TAB_PROCATG, NULL, NULL,
164 visir_pipe_id, RECIPE_STRING CPL_DFS_FITS));
168 return cpl_error_get_code();
cpl_error_code visir_dfs_check_framelist_tag(const irplib_framelist *self)
Check the tags in a frameset (group raw only)
cpl_error_code irplib_dfs_save_table(cpl_frameset *allframes, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const cpl_table *table, const cpl_propertylist *tablelist, const char *recipe, const char *procat, const cpl_propertylist *applist, const char *remregexp, const char *pipe_id, const char *filename)
Save a table as a DFS-compliant pipeline product.
cpl_error_code irplib_framelist_load_propertylist_all(irplib_framelist *self, int ind, const char *regexp, cpl_boolean invert)
Load the propertylists of all frames in the framelist.
irplib_framelist * irplib_framelist_extract(const irplib_framelist *self, const char *tag)
Extract the frames with the given tag from a framelist.
int visir_dfs_set_groups(cpl_frameset *set)
Set the group as RAW or CALIB in a frameset.
void irplib_framelist_delete(irplib_framelist *self)
Deallocate an irplib_framelist with its frames and properties.
const char * irplib_frameset_find_file(const cpl_frameset *self, const char *tag)
Find the filename with the given tag in a frame set.
irplib_framelist * irplib_framelist_cast(const cpl_frameset *frameset)
Create an irplib_framelist from a cpl_framelist.