X-shooter Pipeline Reference Manual 3.8.15
xsh_orderpos.c
Go to the documentation of this file.
1/* *
2 * This file is part of the ESO X-shooter Pipeline *
3 * Copyright (C) 2006 European Southern Observatory *
4 * *
5 * This library is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA *
18 * */
19
20/*
21 * $Author: amodigli $
22 * $Date: 2013-03-18 11:40:35 $
23 * $Revision: 1.98 $
24*/
25
26#ifdef HAVE_CONFIG_H
27#include <config.h>
28#endif
29
30/*----------------------------------------------------------------------------*/
38/*----------------------------------------------------------------------------*/
41/*-----------------------------------------------------------------------------
42 Includes
43 ----------------------------------------------------------------------------*/
44
45
46/* DRL steps */
47/* Error handling */
48#include <xsh_error.h>
49/* Utility fonctions */
50#include <xsh_pfits_qc.h>
51#include <xsh_utils.h>
52#include <xsh_msg.h>
53/* DFS functions */
54#include <xsh_dfs.h>
55/* DRL functions */
56#include <xsh_drl.h>
57#include <xsh_drl_check.h>
58#include <xsh_data_instrument.h>
60
61/* Library */
62#include <cpl.h>
63
64/*-----------------------------------------------------------------------------
65 Defines
66 ----------------------------------------------------------------------------*/
67
68#define RECIPE_ID "xsh_orderpos"
69#define RECIPE_AUTHOR "L.Guglielmi,R.Haigron,P.Goldoni,F.Royer, A. Modigliani"
70#define RECIPE_CONTACT "amodigli@eso.org"
71
72/*-----------------------------------------------------------------------------
73 Functions prototypes
74 ----------------------------------------------------------------------------*/
75
76/*
77 * Plugin initalization, execute and cleanup handlers
78 */
79
80static int xsh_orderpos_create(cpl_plugin *);
81static int xsh_orderpos_exec(cpl_plugin *);
82static int xsh_orderpos_destroy(cpl_plugin *);
83
84/* The actual executor function */
85static void xsh_orderpos(cpl_parameterlist *, cpl_frameset *);
86
87/*-----------------------------------------------------------------------------
88 Static variables
89 ----------------------------------------------------------------------------*/
91"Create the orders centre traces table file";
92
94"This recipe creates the orders centre traces table.\n\
95Input Frames for UVB and VIS:\n\
96 Raw file (Tag = ORDERDEF_arm_D2)\n\
97 Master Dark (Tag = MASTER_DARK_arm)\n\
98 Master Bias (Tag = MASTER_BIAS_arm)\n\
99Input Frames for NIR:\n\
100 Raw file ON(Tag = ORDERDEF_NIR_ON)\n\
101 Raw file OFF(Tag = ORDERDEF_NIR_OFF)\n\
102Input Frames for all arms\n\
103 Guess order table (Tag = ORDER_TAB_GUESS_arm)\n\
104 Spectral format table (Tag = SPECTRAL_FORMAT_TAB_arm)\n\
105 - [OPTIONAL] A map of non linear bad pixels (Format=QUP, Tag = BP_MAP_NL_arm)\n\
106 - [OPTIONAL] A map of reference bad pixels (Format = QUP,RAW, Tag = BP_MAP_RP_arm)\n\
107Prepare PRE structures.\n\
108For NIR, subtract NIR-OFF from NIR-ON.\n\
109For UVB and NIR, Substract the master Bias and master dark.\n\
110Detect Orders and calculate the order table.\n\
111The final products are:\n\
112 An updated Order Table, PRO.CATG=ORDER_TABLE_CENTR_arm.\n\
113 A order trace residuals Table, PRO.CATG=ORDERPOS_RESID_TAB_arm.\n\
114 The order pos frame bias subtracted, PRO.CATG=ORDERDEF_ON_arm.\n";
115
116
117/*-----------------------------------------------------------------------------
118 Functions code
119 ----------------------------------------------------------------------------*/
120/*----------------------------------------------------------------------------*/
129/*----------------------------------------------------------------------------*/
130
131int cpl_plugin_get_info(cpl_pluginlist *list) {
132 cpl_recipe *recipe = NULL;
133 cpl_plugin *plugin = NULL;
134
135 recipe = cpl_calloc(1, sizeof(*recipe));
136 if ( recipe == NULL ){
137 return -1;
138 }
139
140 plugin = &recipe->interface ;
141
142 cpl_plugin_init(plugin,
143 CPL_PLUGIN_API, /* Plugin API */
144 XSH_BINARY_VERSION, /* Plugin version */
145 CPL_PLUGIN_TYPE_RECIPE, /* Plugin type */
146 RECIPE_ID, /* Plugin name */
147 xsh_orderpos_description_short, /* Short help */
148 xsh_orderpos_description, /* Detailed help */
149 RECIPE_AUTHOR, /* Author name */
150 RECIPE_CONTACT, /* Contact address */
151 xsh_get_license(), /* Copyright */
155
156 cpl_pluginlist_append(list, plugin);
157
158 return (cpl_error_get_code() != CPL_ERROR_NONE);
159}
160
161/*----------------------------------------------------------------------------*/
171/*----------------------------------------------------------------------------*/
172
173static int xsh_orderpos_create(cpl_plugin *plugin){
174 cpl_recipe *recipe = NULL;
175 xsh_detect_continuum_param param = { 5, 0, 5,
177 1, 0.,
178 /* fmtchk*/ 20, 50, 140., 2., 0 } ;
179
180 /* Reset library state */
181 xsh_init();
182
183 /* Check input */
184 assure( plugin != NULL, CPL_ERROR_NULL_INPUT, "Null plugin");
185
186 /* Get the recipe out of the plugin */
187 assure( cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE,
188 CPL_ERROR_TYPE_MISMATCH,
189 "Plugin is not a recipe");
190
191 recipe = (cpl_recipe *)plugin;
192
193 /* Create the parameter list in the cpl_recipe object */
194 recipe->parameters = cpl_parameterlist_new();
195 assure( recipe->parameters != NULL,
196 CPL_ERROR_ILLEGAL_OUTPUT,
197 "Memory allocation failed!");
198
199 /* Set generic parameters (common to all recipes) */
200 check( xsh_parameters_generic( RECIPE_ID, recipe->parameters ) ) ;
201 xsh_parameters_decode_bp(RECIPE_ID,recipe->parameters,-1);
202 check( xsh_parameters_pre_overscan( RECIPE_ID, recipe->parameters ) ) ;
203
205 recipe->parameters,
206 param));
208 recipe->parameters ) ) ;
209 cleanup:
210 if ( cpl_error_get_code() != CPL_ERROR_NONE ){
211 xsh_error_dump(CPL_MSG_ERROR);
212 return 1;
213 }
214 else {
215 return 0;
216 }
217}
218
219/*----------------------------------------------------------------------------*/
225/*----------------------------------------------------------------------------*/
226
227static int xsh_orderpos_exec(cpl_plugin *plugin) {
228 cpl_recipe *recipe = NULL;
229
230 /* Check parameter */
231 assure( plugin != NULL, CPL_ERROR_NULL_INPUT, "Null plugin" );
232
233 /* Get the recipe out of the plugin */
234 assure( cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE,
235 CPL_ERROR_TYPE_MISMATCH, "Plugin is not a recipe");
236
237 recipe = (cpl_recipe *)plugin;
238
239 /* Check recipe */
240 xsh_orderpos(recipe->parameters, recipe->frames);
241
242
243 cleanup:
244 if ( cpl_error_get_code() != CPL_ERROR_NONE ) {
245 xsh_error_dump(CPL_MSG_ERROR);
246 /* RESTORE the error context */
247 cpl_error_reset();
248 return 1;
249 }
250 else {
251 return 0;
252 }
253}
254
255/*----------------------------------------------------------------------------*/
261/*----------------------------------------------------------------------------*/
262static int xsh_orderpos_destroy(cpl_plugin *plugin)
263{
264 cpl_recipe *recipe = NULL;
265
266 /* Check parameter */
267 assure( plugin != NULL, CPL_ERROR_NULL_INPUT, "Null plugin" );
268
269 /* Get the recipe out of the plugin */
270 assure( cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE,
271 CPL_ERROR_TYPE_MISMATCH, "Plugin is not a recipe");
272
273 recipe = (cpl_recipe *)plugin;
274
275 xsh_free_parameterlist(&recipe->parameters);
276
277 cleanup:
278 if (cpl_error_get_code() != CPL_ERROR_NONE)
279 {
280 return 1;
281 }
282 else
283 {
284 return 0;
285 }
286}
287
288/*----------------------------------------------------------------------------*/
296/*----------------------------------------------------------------------------*/
297static void xsh_orderpos(cpl_parameterlist* parameters,
298 cpl_frameset* frameset)
299{
300 const char* recipe_tags[1] = {XSH_ORDERDEF};
301 int recipe_tags_size = 1;
302
303 /* Intermediate frames */
304 cpl_frameset* raws = NULL;
305 cpl_frameset* calib = NULL;
306 cpl_frame* bpmap = NULL;
307 cpl_frame* master_bias = NULL;
308 cpl_frame* master_dark = NULL;
309 cpl_frame * order_tab_guess = NULL ;
310 cpl_frame * orderframe = NULL ;
311 cpl_frame * spectralformat_frame = NULL ;
312 cpl_frame * rmbias = NULL ;
313 cpl_frame * intFrame = NULL ;
314 cpl_frame * nir_on = NULL ;
315 cpl_frame * nir_off = NULL ;
317 /* Product frames */
318 cpl_frame * resFrame = NULL ;
319
320 /* Other */
321 xsh_detect_continuum_param * detect_param = NULL ;
323 xsh_clipping_param * dcn_clipping_param = NULL;
324 cpl_frame* resid_tab=NULL;
325 char tag[128];
326 char fname[128] ;
327 int pre_overscan_corr=0;
328
329 /**************************************************************************/
330 /* DFS management */
331 /**************************************************************************/
332 check( xsh_begin( frameset, parameters, &instrument, &raws, &calib,
333 recipe_tags, recipe_tags_size,
334 RECIPE_ID, XSH_BINARY_VERSION,
336
337 /* Why */
339
341 /**************************************************************************/
342 /* Recipe frames */
343 /**************************************************************************/
344 check( spectralformat_frame = xsh_find_frame_with_tag( calib,
346
349 check( nir_on = xsh_find_raw_orderdef_nir ( raws ) ) ;
350 check( nir_off = xsh_find_raw_orderdef_nir_off ( raws ) ) ;
351 }
352 else {
353 check( orderframe = xsh_find_raw_orderdef_vis_uvb( raws ) ) ;
354 if((master_bias = xsh_find_frame_with_tag(calib,XSH_MASTER_BIAS,
355 instrument)) == NULL) {
356
357 xsh_msg_warning("Frame %s not provided",XSH_MASTER_BIAS);
359 }
360
361 if((master_dark = xsh_find_frame_with_tag(calib,XSH_MASTER_DARK,
362 instrument)) == NULL){
363 xsh_msg_warning("Frame %s not provided",XSH_MASTER_DARK);
365 }
366 }
367
368 if(NULL== (order_tab_guess = xsh_find_frame_with_tag(calib,
370 instrument)) ) {
371 xsh_msg_error("you must provide an input %s_%s table",XSH_ORDER_TAB_GUESS,
373 goto cleanup;
374 }
375
376
378 spectralformat_frame));
379
380 /**************************************************************************/
381 /* Recipe parameters */
382 /**************************************************************************/
383 check( pre_overscan_corr = xsh_parameters_get_int( parameters, RECIPE_ID,
384 "pre-overscan-corr"));
385
387 parameters)) ;
388
389
390 xsh_msg_dbg_low("Search Window: %d, Running Window: %d, Fit Window: %d",
391 detect_param->search_window, detect_param->running_window,
392 detect_param->fit_window ) ;
393 xsh_msg_dbg_low( "Polynomial degree: %d, Step: %d", detect_param->poly_degree,
394 detect_param->poly_step ) ;
395
396 check( dcn_clipping_param = xsh_parameters_clipping_dcn_get( RECIPE_ID,
397 parameters ));
398
399 /* not needed as Daniel says current defaults are robust for any arm
400 check(xsh_params_set_defaults(parameters,instrument,detect_param,
401 dcn_clipping_param));
402 */
403
404
405 /**************************************************************************/
406 /* Recipe code */
407 /**************************************************************************/
408 xsh_msg( "Working on Arm %s", xsh_instrument_arm_tostring(instrument ) ) ;
409
410 check(xsh_prepare(raws, bpmap, master_bias, XSH_ORDERDEF, instrument,pre_overscan_corr,CPL_TRUE));
411 /*
412 from raws frameset one should use only the single (or the 2 in case of
413 NIR) flat frames "ORDERDEF_arm_D2"
414 */
415
417
418 /* subtract Off frame */
419 check(intFrame=xsh_pre_frame_subtract( nir_on, nir_off,
420 "ON-OFF_NIR.fits",instrument,1 ) ) ;
421 }
422 else {
423 /* UVB and VIS */
424 if(master_bias!= NULL) {
425 /* correct bias level */
426 xsh_msg( "Substract bias" ) ;
427 check(rmbias = xsh_subtract_bias( orderframe, master_bias, instrument,"ORDERDEF_",pre_overscan_corr,0));
428 } else {
429 rmbias=cpl_frame_duplicate(orderframe);
430 }
431
432 /* correct dark level */
433 if(master_dark!= NULL) {
434 xsh_msg( "Substract dark" ) ;
435 sprintf( fname, "ORDERPOS_%s_DARK.fits",
437 check(intFrame = xsh_subtract_dark(rmbias, master_dark,
438 fname, instrument));
439 } else {
440 intFrame=cpl_frame_duplicate(rmbias);
441 }
442 }
443 /* check on binning: operations takes orderdef frames also in bin mode but the pipeline supports only
444 * unbinned orderdef frame input */
447 }
448
449 /*
450 TODO:
451 Add an option "--recover" using a function "xsh_find_order" instead
452 of detect_continuum to create an order table.
453 xsh_find_order does NOT use any order table, but seraches for
454 maximum along Y for x = nx/2, x = nx/2 - step, ... x = nx/2 + step ...
455 */
456 /* Detect Continuum */
457 xsh_msg("Calling detect continuum" ) ;
458 /* the following generate a leak */
459 check_msg( resFrame = xsh_detect_continuum( intFrame, order_tab_guess,
460 spectralformat_frame,
461 detect_param,
462 dcn_clipping_param,
463 instrument, &resid_tab ),
464 "Error in xsh_detect_continuum, try to increase detectcontinuum-fit-win-hsize or detectcontinuum-ordertab-deg-y or detectcontinuum-clip-sigma or detectcontinuum-search-win-hsize" ) ;
465 /* monitor input frame flux */
466 check(xsh_monitor_flux( intFrame, resFrame, instrument, XSH_QC_FLUX));
467 /**************************************************************************/
468 /* Products */
469 /**************************************************************************/
470 xsh_msg( "Save Order Table product" ) ;
471 check(xsh_add_product_table( resFrame, frameset, parameters, RECIPE_ID,
472 instrument,NULL));
473
474 check(xsh_add_product_table(resid_tab, frameset, parameters, RECIPE_ID,
475 instrument,NULL));
476
478 sprintf(tag,"ORDERDEF_ON");
479 check(xsh_add_product_image(intFrame,frameset,parameters,RECIPE_ID,instrument,tag));
480 } else {
481 sprintf(tag,"ORDERDEF_ON");
482 check(xsh_add_product_image(rmbias,frameset,parameters,RECIPE_ID,instrument,tag));
483 }
484 cleanup:
485 xsh_end( RECIPE_ID, frameset, parameters );
486 XSH_FREE( dcn_clipping_param );
487 XSH_FREE( detect_param );
489 xsh_free_frameset(&raws);
490 xsh_free_frameset(&calib);
491 xsh_free_frame( &resFrame) ;
492 xsh_free_frame( &resid_tab) ;
493 xsh_free_frame(&rmbias);
494 xsh_free_frame(&bpmap);
495 xsh_free_frame(&intFrame);
496 return;
497}
498
static xsh_instrument * instrument
cpl_frame * xsh_pre_frame_subtract(cpl_frame *one, cpl_frame *two, const char *filename, xsh_instrument *instr, const int clean_tmp)
Subtract 2 frames (in XSH_PRE format) Just loads the 2 frames, subtract (xsh_pre_subtract) and save r...
cpl_frame * xsh_detect_continuum(cpl_frame *frame, cpl_frame *order_table, cpl_frame *spectral_frame, xsh_detect_continuum_param *detect_param, xsh_clipping_param *dcn_clipping, xsh_instrument *instr, cpl_frame **resid_frame)
Detect order and compute polynomial description of ordermin and order max. Uses a guess order table i...
void xsh_prepare(cpl_frameset *frames, cpl_frame *bpmap, cpl_frame *mbias, const char *prefix, xsh_instrument *instr, const int pre_overscan_corr, const bool flag_neg_and_thresh_pix)
This function transform RAW frames dataset in PRE frames dataset attaching the default bad pixel map ...
Definition: xsh_prepare.c:122
#define assure(CONDITION, ERROR_CODE,...)
Definition: xsh_error.h:54
#define check(COMMAND)
Definition: xsh_error.h:71
#define xsh_error_dump(level)
Definition: xsh_error.h:92
#define check_msg(COMMAND,...)
Definition: xsh_error.h:62
#define xsh_error_reset()
Definition: xsh_error.h:87
void xsh_instrument_update_from_spectralformat(xsh_instrument *i, cpl_frame *spectralformat_frame)
const char * xsh_instrument_arm_tostring(xsh_instrument *i)
Get the string associated with an arm.
void xsh_instrument_update_lamp(xsh_instrument *i, XSH_LAMP lamp)
XSH_ARM xsh_instrument_get_arm(xsh_instrument *i)
Get an arm on instrument structure.
void xsh_instrument_free(xsh_instrument **instrument)
free an instrument structure
#define xsh_msg_warning(...)
Print an warning message.
Definition: xsh_msg.h:88
#define xsh_msg_error(...)
Print an error message.
Definition: xsh_msg.h:62
#define xsh_msg(...)
Print a message on info level.
Definition: xsh_msg.h:121
#define xsh_msg_dbg_low(...)
Definition: xsh_msg.h:48
#define RECIPE_CONTACT
Definition: xsh_orderpos.c:70
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.
Definition: xsh_orderpos.c:131
static char xsh_orderpos_description_short[]
Definition: xsh_orderpos.c:90
static char xsh_orderpos_description[]
Definition: xsh_orderpos.c:93
static int xsh_orderpos_destroy(cpl_plugin *)
Destroy what has been created by the 'create' function.
Definition: xsh_orderpos.c:262
static int xsh_orderpos_create(cpl_plugin *)
Setup the recipe options.
Definition: xsh_orderpos.c:173
static int xsh_orderpos_exec(cpl_plugin *)
Execute the plugin instance given by the interface.
Definition: xsh_orderpos.c:227
static void xsh_orderpos(cpl_parameterlist *, cpl_frameset *)
Interpret the command line options and execute the data processing.
Definition: xsh_orderpos.c:297
#define RECIPE_ID
Definition: xsh_orderpos.c:68
#define RECIPE_AUTHOR
Definition: xsh_orderpos.c:69
cpl_frame * xsh_subtract_bias(cpl_frame *frame, cpl_frame *bias, xsh_instrument *instr, const char *type, const int pre_overscan_corr, const int save_tmp)
Subtract the master bias frame from PRE frame.
Definition: xsh_subtract.c:120
cpl_frame * xsh_subtract_dark(cpl_frame *frame, cpl_frame *dark, const char *filename, xsh_instrument *instr)
subtract the master dark frame from PRE frame
Definition: xsh_subtract.c:247
void xsh_free_parameterlist(cpl_parameterlist **p)
Deallocate a parameter list and set the pointer to NULL.
Definition: xsh_utils.c:2224
cpl_error_code xsh_check_input_is_unbinned(cpl_frame *in)
Check if an input frame is not binned.
Definition: xsh_utils.c:375
void xsh_free_frame(cpl_frame **f)
Deallocate a frame and set the pointer to NULL.
Definition: xsh_utils.c:2269
void xsh_free_frameset(cpl_frameset **f)
Deallocate a frame set and set the pointer to NULL.
Definition: xsh_utils.c:2254
cpl_error_code xsh_monitor_flux(cpl_frame *frm_ima, const cpl_frame *frm_tab, xsh_instrument *instrument, const char *qc_key_prefix)
Monitor Flux level along the orders traces given by an input table
Definition: xsh_utils.c:4107
const char * xsh_get_license(void)
Get the pipeline copyright and license.
Definition: xsh_utils.c:1193
void xsh_init(void)
Reset library state.
Definition: xsh_utils.c:1160
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.
Definition: xsh_utils.c:1244
cpl_error_code xsh_end(const char *recipe_id, cpl_frameset *frames, cpl_parameterlist *parameters)
Recipe termination.
Definition: xsh_utils.c:1519
@ XSH_LAMP_UNDEFINED
@ XSH_ARM_NIR
cpl_frame * xsh_find_raw_orderdef_vis_uvb(cpl_frameset *frames)
Find orderdef raw frame for UVB or VIS.
Definition: xsh_dfs.c:4005
cpl_frame * xsh_find_raw_orderdef_nir(cpl_frameset *frames)
Find orderdef raw frame for NIR.
Definition: xsh_dfs.c:4043
void xsh_add_product_image(cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix)
Definition: xsh_dfs.c:2965
void xsh_add_product_table(cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix)
Save Table product (input frame has several extensions, 1 table per extension)
Definition: xsh_dfs.c:3146
cpl_frame * xsh_find_raw_orderdef_nir_off(cpl_frameset *frames)
Find orderdef raw frame for NIR OFF.
Definition: xsh_dfs.c:4098
cpl_frame * xsh_find_frame_with_tag(cpl_frameset *frames, const char *tag, xsh_instrument *instr)
Find frame with a given tag.
Definition: xsh_dfs.c:3347
#define XSH_ORDERDEF
Definition: xsh_dfs.h:223
#define XSH_MASTER_BIAS
Definition: xsh_dfs.h:549
#define XSH_MASTER_DARK
Definition: xsh_dfs.h:550
#define XSH_ORDER_TAB_GUESS
Definition: xsh_dfs.h:552
#define XSH_SPECTRAL_FORMAT
Definition: xsh_dfs.h:1196
cpl_frame * xsh_check_load_master_bpmap(cpl_frameset *calib, xsh_instrument *inst, const char *rec_id)
Definition: xsh_drl_check.c:51
xsh_detect_continuum_param * xsh_parameters_detect_continuum_get(const char *recipe_id, cpl_parameterlist *list)
Get the detect continuum parameters in a parameters list.
void xsh_parameters_pre_overscan(const char *recipe_id, cpl_parameterlist *plist)
cpl_error_code xsh_parameters_decode_bp(const char *recipe_id, cpl_parameterlist *plist, const int ival)
xsh_clipping_param * xsh_parameters_clipping_dcn_get(const char *recipe_id, cpl_parameterlist *list)
Get the detectcontinuum clipping parameters in a parameters list.
int xsh_parameters_get_int(const cpl_parameterlist *list, const char *recipe_id, const char *name)
void xsh_parameters_detect_continuum_create(const char *recipe_id, cpl_parameterlist *list, xsh_detect_continuum_param par)
create the detect continuum parameter "window" in a parameters list
void xsh_parameters_generic(const char *recipe_id, cpl_parameterlist *plist)
cpl_error_code xsh_recipe_params_check(cpl_parameterlist *parameters, xsh_instrument *instrument, const char *rec_id)
void xsh_parameters_clipping_dcn_create(const char *recipe_id, cpl_parameterlist *list)
create the DetectContiNuum clipping parameters in a parameters list
#define DETECT_CONTINUUM_POLYNOMIAL_DEGREE
#define XSH_QC_FLUX
Definition: xsh_pfits_qc.h:112
#define XSH_FREE(POINTER)
Definition: xsh_utils.h:92