55#define RECIPE_ID "xsh_util_bpmap_nl_raw2pre"
56#define RECIPE_AUTHOR "A.Modigliani"
57#define RECIPE_CONTACT "Andrea.Modigliani@eso.org"
58#define PRO_IMA "PRO_IMA"
59#define KEY_VALUE_HPRO_DID "PRO-1.15"
76 "This recipe converts RAW_BP_MAP_NL to BP_MAP_NL.\n"
77 "Information on relevant parameters can be found with\n"
78 "esorex --params xsh_util_bpmap_nl_raw2pre\n"
79 "esorex --help xsh_util_bpmap_nl_raw2pre\n"
104 cpl_recipe * recipe = cpl_calloc(1,
sizeof *recipe ) ;
105 cpl_plugin * plugin = &recipe->interface ;
107 cpl_plugin_init(plugin,
110 CPL_PLUGIN_TYPE_RECIPE,
121 cpl_pluginlist_append(list, plugin) ;
138 cpl_recipe * recipe ;
145 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
146 recipe = (cpl_recipe *)plugin ;
152 recipe->parameters = cpl_parameterlist_new() ;
172 cpl_recipe * recipe ;
174 cpl_errorstate initial_errorstate = cpl_errorstate_get();
177 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
178 recipe = (cpl_recipe *)plugin ;
185 if (!cpl_errorstate_is_equal(initial_errorstate)) {
188 cpl_errorstate_dump(initial_errorstate, CPL_FALSE, NULL);
203 cpl_recipe * recipe ;
206 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
207 recipe = (cpl_recipe *)plugin ;
210 cpl_parameterlist_delete(recipe->parameters) ;
224 cpl_frameset * framelist)
229 cpl_frame* bpmap_nl=NULL;
231 cpl_frame* bp_nl_frame=NULL;
232 char* bp_nl_tag=NULL;
233 char* bp_nl_name=NULL;
234 const char* pro_catg=NULL;
236 int recipe_tags_size = 1;
237 cpl_frameset* raws=NULL;
238 cpl_frameset* calib=NULL;
241 xsh_msg(
"Welcome to XSHOOTER Pipeline release %d.%d.%d",
242 XSH_MAJOR_VERSION,XSH_MINOR_VERSION,XSH_MICRO_VERSION);
245 recipe_tags, recipe_tags_size,
254 bp_nl_name=cpl_sprintf(
"%s.fits",bp_nl_tag);
256 cpl_frameset_insert(framelist, bp_nl_frame);
276 if (cpl_error_get_code()) {
static xsh_instrument * instrument
void xsh_pre_free(xsh_pre **pre)
Free a xsh_pre structure.
xsh_pre * xsh_pre_create(cpl_frame *raw, cpl_frame *bpmap, cpl_image *bias_data, xsh_instrument *instr, const int pre_overscan_corr, const bool flag_neg_and_thresh_pix)
Create a XSH_PRE from a raw frame.
cpl_frame * xsh_pre_save(const xsh_pre *pre, const char *filename, const char *tag, int temp)
Save PRE on disk.
const char * xsh_instrument_arm_tostring(xsh_instrument *i)
Get the string associated with an arm.
void xsh_instrument_free(xsh_instrument **instrument)
free an instrument structure
#define xsh_msg(...)
Print a message on info level.
static int xsh_util_bpmap_nl_raw2pre_exec(cpl_plugin *)
Execute the plugin instance given by the interface.
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.
static int xsh_util_bpmap_nl_raw2pre(cpl_parameterlist *, cpl_frameset *)
Get the command line options and execute the data reduction.
static int xsh_util_bpmap_nl_raw2pre_destroy(cpl_plugin *)
Destroy what has been created by the 'create' function.
static int xsh_util_bpmap_nl_raw2pre_create(cpl_plugin *)
Setup the recipe options
void xsh_free_frameset(cpl_frameset **f)
Deallocate a frame set 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.
cpl_error_code xsh_begin(cpl_frameset *frames, const cpl_parameterlist *parameters, xsh_instrument **instrument, cpl_frameset **raws, cpl_frameset **calib, const char *tag_list[], int tag_list_size, const char *recipe_id, unsigned int binary_version, const char *short_descr)
Recipe initialization.
void xsh_free(const void *mem)
Deallocate memory.
void xsh_add_product_bpmap(cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix)
cpl_frame * xsh_find_frame_with_tag(cpl_frameset *frames, const char *tag, xsh_instrument *instr)
Find frame with a given tag.
#define XSH_MASTER_BP_MAP
#define XSH_GET_TAG_FROM_ARM(TAG, instr)
#define XSH_RAW_BP_MAP_NL
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)
static char xsh_util_bpmap_nl_raw2pre_description[]
static char xsh_util_bpmap_nl_raw2pre_description_short[]