63#define XSH_UTL_BPMAP2RP_RECIPE_ID "xsh_util_bpmap2rp"
64#define XSH_UTL_BPMAP2RP_RECIPE_AUTHOR "A.Modigliani"
65#define XSH_UTL_BPMAP2RP_RECIPE_CONTACT "Andrea.Modigliani@eso.org"
66#define PRO_IMA "PRO_IMA_UVB"
67#define KEY_VALUE_HPRO_DID "PRO-1.15"
84"This recipe performs image computation.\n"
85"Information on relevant parameters can be found with\n"
86"esorex --params xsh_util_bpmap2rp\n"
87"esorex --help xsh_util_bpmap2rp\n"
112 cpl_recipe * recipe = cpl_calloc(1,
sizeof *recipe ) ;
113 cpl_plugin * plugin = &recipe->interface ;
115 cpl_plugin_init(plugin,
118 CPL_PLUGIN_TYPE_RECIPE,
129 cpl_pluginlist_append(list, plugin) ;
146 cpl_recipe * recipe ;
153 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
154 recipe = (cpl_recipe *)plugin ;
160 recipe->parameters = cpl_parameterlist_new() ;
165 recipe->parameters ) ) ;
169 p = cpl_parameter_new_value(
"xsh.xsh_util_bpmap2rp.op",
171 "A possible operation",
172 "xsh.xsh_util_bpmap2rp",
"+");
173 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"op") ;
174 cpl_parameterlist_append(recipe->parameters, p) ;
177 p = cpl_parameter_new_value(
"xsh.xsh_util_bpmap2rp.value",
178 CPL_TYPE_DOUBLE,
"a value",
"xsh.xsh_util_bpmap2rp", 9999.) ;
179 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"value") ;
180 cpl_parameterlist_append(recipe->parameters, p) ;
196 cpl_recipe * recipe ;
198 cpl_errorstate initial_errorstate = cpl_errorstate_get();
201 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
202 recipe = (cpl_recipe *)plugin ;
209 if (!cpl_errorstate_is_equal(initial_errorstate)) {
212 cpl_errorstate_dump(initial_errorstate, CPL_FALSE, NULL);
227 cpl_recipe * recipe ;
230 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
231 recipe = (cpl_recipe *)plugin ;
234 cpl_parameterlist_delete(recipe->parameters) ;
248 cpl_frameset * framelist)
250 cpl_image * ima=NULL ;
251 cpl_propertylist * head=NULL ;
254 const char* name=NULL;
257 xsh_msg(
"Welcome to XSHOOTER Pipeline release %d.%d.%d",
258 XSH_MAJOR_VERSION,XSH_MINOR_VERSION,XSH_MICRO_VERSION);
260 n=cpl_frameset_get_size(framelist);
268 frm=cpl_frameset_get_frame(framelist,i);
269 name=cpl_frame_get_filename(frm);
270 ima=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
271 head=cpl_propertylist_load(name,0);
273 cpl_image_save(ima,name,CPL_BPP_IEEE_FLOAT,head,CPL_IO_DEFAULT);
283 if (cpl_error_get_code()) {
void xsh_bpmap_bitwise_to_flag(cpl_image *bpmap, int flag)
#define xsh_msg_error(...)
Print an error message.
#define xsh_msg(...)
Print a message on info level.
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.
static int xsh_util_bpmap2rp_create(cpl_plugin *)
Setup the recipe options
static int xsh_util_bpmap2rp_destroy(cpl_plugin *)
Destroy what has been created by the 'create' function.
static int xsh_util_bpmap2rp_exec(cpl_plugin *)
Execute the plugin instance given by the interface.
static int xsh_util_bpmap2rp(cpl_parameterlist *, cpl_frameset *)
Get the command line options and execute the data reduction.
void xsh_free_image(cpl_image **i)
Deallocate an image and set the pointer to NULL.
const char * xsh_get_license(void)
Get the pipeline copyright and license.
void xsh_init(void)
Reset library state.
void xsh_free_propertylist(cpl_propertylist **p)
Deallocate a property list and set the pointer to NULL.
#define QFLAG_CALIB_FILE_DEFECT
cpl_error_code xsh_parameters_decode_bp(const char *recipe_id, cpl_parameterlist *plist, const int ival)
void xsh_parameters_generic(const char *recipe_id, cpl_parameterlist *plist)
#define XSH_UTL_BPMAP2RP_RECIPE_ID
#define XSH_UTL_BPMAP2RP_RECIPE_AUTHOR
static char xsh_util_bpmap2rp_description[]
static char xsh_util_bpmap2rp_description_short[]
#define XSH_UTL_BPMAP2RP_RECIPE_CONTACT