51 const char* recipe_id,
const char* name,
int value,
const char* comment)
55 cpl_parameter* p =NULL;
58 sprintf(recipename,
"xsh.%s",recipe_id);
59 sprintf(paramname,
"%s.%s",recipename,name);
60 if(strstr(recipe_id,
"xsh_molecfit")){
61 sprintf(paramname,
"%s",name);
63 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
65 check(p = cpl_parameter_new_value(paramname,CPL_TYPE_INT,comment,
67 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
68 check(cpl_parameterlist_append(list,p));
76 const char* recipe_id,
const char* name,
int value,
const char* comment)
80 cpl_parameter* p =NULL;
83 sprintf(recipename,
"xsh.%s",recipe_id);
84 sprintf(paramname,
"%s.%s",recipename,name);
85 if(strstr(recipe_id,
"xsh_molecfit")){
86 sprintf(paramname,
"%s",name);
89 check(p = cpl_parameter_new_value(paramname,CPL_TYPE_BOOL,comment,
91 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
92 check(cpl_parameterlist_append(list,p));
99 const char* recipe_id,
104 char * paramname = NULL ;
105 char * recipename = NULL ;
106 cpl_parameter* p =NULL;
110 if(strstr(recipe_id,
"xsh_molecfit")){
111 sprintf(paramname,
"%s",name);
114 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
116 check(p = cpl_parameter_new_value(paramname,CPL_TYPE_STRING, comment,
118 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
119 check(cpl_parameterlist_append(list,p));
128 const char* recipe_id,
const char* name,
double value,
const char* comment)
131 char recipename[256];
132 cpl_parameter* p =NULL;
135 sprintf(recipename,
"xsh.%s",recipe_id);
136 sprintf(paramname,
"%s.%s",recipename,name);
137 if(strstr(recipe_id,
"xsh_molecfit")){
138 sprintf(paramname,
"%s",name);
140 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
142 check(p = cpl_parameter_new_value(paramname,CPL_TYPE_DOUBLE,comment,
144 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
145 check(cpl_parameterlist_append(list,p));
153 const char* recipe_id,
const char* name,
bool value,
const char* comment)
156 char recipename[256];
157 cpl_parameter* p =NULL;
160 sprintf(recipename,
"xsh.%s",recipe_id);
161 sprintf(paramname,
"%s.%s",recipename,name);
162 if(strstr(recipe_id,
"xsh_molecfit")){
163 sprintf(paramname,
"%s",name);
165 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
167 check(p = cpl_parameter_new_value(paramname,CPL_TYPE_BOOL,comment,
169 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
170 check(cpl_parameterlist_append(list,p));
178 const char* recipe_id,
const char* name,
float value,
const char* comment)
181 char recipename[256];
182 cpl_parameter* p =NULL;
185 sprintf(recipename,
"xsh.%s",recipe_id);
186 sprintf(paramname,
"%s.%s",recipename,name);
187 if(strstr(recipe_id,
"xsh_molecfit")){
188 sprintf(paramname,
"%s",name);
190 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
192 check(p = cpl_parameter_new_value(paramname,CPL_TYPE_FLOAT,comment,
194 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
195 check(cpl_parameterlist_append(list,p));
202 const char* recipe_id,
204 int def,
int min,
int max,
208 char recipename[256];
209 cpl_parameter* p =NULL;
212 sprintf(recipename,
"xsh.%s",recipe_id);
213 sprintf(paramname,
"%s.%s",recipename,name);
214 if(strstr(recipe_id,
"xsh_molecfit")){
215 sprintf(paramname,
"%s",name);
217 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
219 check(p = cpl_parameter_new_range( paramname,CPL_TYPE_INT, comment,
220 recipename, def, min,
max ));
221 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
222 check(cpl_parameterlist_append(list,p));
228 const char* recipe_id,
230 double def,
double min,
double max,
234 char recipename[256];
235 cpl_parameter* p =NULL;
238 sprintf(recipename,
"xsh.%s",recipe_id);
239 sprintf(paramname,
"%s.%s",recipename,name);
240 if(strstr(recipe_id,
"xsh_molecfit")){
241 sprintf(paramname,
"%s",name);
243 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
245 check(p = cpl_parameter_new_range( paramname,CPL_TYPE_DOUBLE, comment,
246 recipename, def, min,
max ));
247 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,name));
248 check(cpl_parameterlist_append(list,p));
257 const char* recipe_id,
const char* name)
260 cpl_parameter * p =NULL;
261 char * result = NULL ;
263 sprintf(paramname,
"xsh.%s.%s",recipe_id, name);
265 p = cpl_parameterlist_find( (cpl_parameterlist *)list, paramname);
266 if ( p == NULL )
goto cleanup ;
267 result = (
char *)cpl_parameter_get_string(p) ;
275 const char* recipe_id,
const char* name)
278 char recipename[256];
279 cpl_parameter* p =NULL;
282 sprintf(recipename,
"xsh.%s",recipe_id);
283 sprintf(paramname,
"%s.%s",recipename,name);
285 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
287 check(p = cpl_parameterlist_find( (cpl_parameterlist *)list,paramname));
288 check(result = cpl_parameter_get_bool( p));
296 const char* recipe_id,
const char* name)
299 char recipename[256];
300 cpl_parameter* p =NULL;
302 sprintf(recipename,
"xsh.%s",recipe_id);
303 sprintf(paramname,
"%s.%s",recipename,name);
305 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
306 check(p = cpl_parameterlist_find( (cpl_parameterlist *)list,paramname));
307 check(result = cpl_parameter_get_int(p));
314 const char* recipe_id,
const char* name)
317 char recipename[256];
318 const cpl_parameter* p =NULL;
321 sprintf(recipename,
"xsh.%s",recipe_id);
322 sprintf(paramname,
"%s.%s",recipename,name);
324 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
326 check(p = cpl_parameterlist_find_const(list,paramname));
327 check(result = cpl_parameter_get_double(p));
348 const char* recipe_id,
const char* name)
352 cpl_parameter * result = NULL ;
354 sprintf(paramname,
"xsh.%s.%s",recipe_id, name);
355 check(result = cpl_parameterlist_find( (cpl_parameterlist *)list, paramname));
364 cpl_parameterlist * plist )
366 cpl_parameter* p=NULL;
368 char recipename[256];
374 sprintf(recipename,
"xsh.%s",recipe_id);
375 sprintf(paramname,
"%s.%s",recipename,
"pre-overscan-corr");
377 check(p = cpl_parameter_new_enum(paramname,CPL_TYPE_INT,
378 "pre-overscan correction. "
380 "1: mean overscan correction "
381 "2: mean prescan correction "
382 "3: (mean pre+mean overscan)/2 correction "
389 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,
390 "pre-overscan-corr"));
391 check(cpl_parameterlist_append(plist,p));
398 cpl_parameterlist * plist )
404 "If 'no', temporary files are deleted." ) ) ;
407 "Additional xshooter debug level. One of 'none', 'low', 'medium', 'high'"));
415 "Add timestamp to product file name." )) ;
423 cpl_parameterlist * plist,
const int ival )
435 val, 0,mval,
"Integer representation of the bits to be considered bad when decoding the bad pixel mask pixel values. \n\
436 Most frequent codes relevant for the user: \n\
438 8: pick-up noise, \n\
439 16: cosmic-ray removed, \n\
440 32: cosmic-ray unremoved, \n\
441 128: calibration file defect, \n\
444 4096: A/D converted saturation, \n\
445 32768: non linear pixel, \n\
446 1048576: extrapolated flux in NIR, \n\
447 4194304: Interpolated flux during extraction."));
449 return cpl_error_get_code();
456 cpl_parameter* p = NULL;
457 const char* pname =
"decode-bp";
459 cpl_parameter_set_int(p, ival);
461 return cpl_error_get_code();
465 const cpl_parameterlist * list )
467 char * result = NULL ;
471 if ( result == NULL ) {
472 xsh_msg(
"Cant get parameter 'keep-temp'" ) ;
475 else if ( strcasecmp( result,
"yes" ) == 0 )
return 1 ;
481 const cpl_parameterlist * list )
483 char * slevel = NULL ;
488 if ( slevel == NULL ) {
489 xsh_msg(
"Cant get parameter 'debug-level'" ) ;
501 const cpl_parameterlist * list )
503 char * stest = NULL ;
511 const cpl_parameterlist * list )
523 const cpl_parameterlist * list )
544 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
552 "Kappa value in sigma clipping during CRH rejection using "\
556 "Number of iterations in sigma clipping during CRH rejection "\
557 "using multiple frames"));
560 "Minimal ratio of points accepted / total in sigma clipping "\
561 "during CRH rejection using multiple frames"));
582 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
586 "hot-cold-pix-search",
588 "If true hot and cold pixels are searched"));
591 "Kappa sigma value to clip low intensity pixels");
596 "Number of kappa-sigma clip iterations (cold pixels search)."));
600 "Kappa sigma value to clip high intensity pixels");
604 "Number of kappa-sigma clip iterations (hot pixels search)."));
624 "Reference X value to compute structure");
627 "Reference Y value to compute structure");
646 "Lower left X of reference region");
649 "Lower left Y of reference region");
652 "Upper right X of reference region");
655 "Upper right Y of reference region");
674 "Lower left X of reference region");
677 "Lower left Y of reference region");
680 "Upper right X of reference region");
683 "Upper right Y of reference region");
702 "Lower left X of reference region to measure RON");
705 "Lower left Y of reference region to measure RON");
708 "Upper right X of reference region to measure RON");
711 "Upper right Y of reference region to measure RON");
714 "Sampling area size");
718 "Number of random samples");
739 char * paramname = NULL ;
740 char * recipename = NULL ;
741 const char* aliasname=
"stack-method";
742 cpl_parameter* p =NULL;
747 p = cpl_parameter_new_enum(paramname,CPL_TYPE_STRING,
748 "Method used to build master frame.",
752 cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,
754 cpl_parameterlist_append(list,p);
757 "Kappa used to clip low level values, when method is set to 'mean'");
760 "Kappa used to clip high level values, when method is set to 'mean'");
785 "RON computation method");
788 "Region X size for random computation");
791 "Number of random samples");
799 "Lower value of kappa-sigma clip in stacking");
802 "Number of iterations in kappa-sigma clip in stacking");
821 "Determine Fixed Pattern Noise. "
822 "If TRUE the Fixed Pattern Noise power spectrum is determined.");
825 "x-size (pixel) of the mask starting at (x,y) = (1,1).");
828 "y-size (pixel) of the mask starting at (x,y) = (1,1).");
847 "Lower left reference area X coordinate for "
848 "Fixed Pattern Noise computation");
851 "Lower left reference area Y coordinate for "
852 "Fixed Pattern Noise computation");
855 "Upper right reference area X coordinate for "
856 "Fixed Pattern Noise computation");
859 "Upper right reference area Y coordinate for "
860 "Fixed Pattern Noise computation");
864 "Fixed Pattern Noise computation");
868 "Number of sampling points for "
869 "Fixed Pattern Noise computation");
883 cpl_parameterlist* list)
888 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
893 assure (result != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
894 "Memory allocation failed!");
909 if(cpl_error_get_code() != CPL_ERROR_NONE){
926 cpl_parameterlist* list,
930 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
936 "Multiple of sigma in sigma clipping"));
940 "Number of iterations in sigma clipping"));
944 "Minimal fractions of bad pixel allowed"));
948 "Minimum relative change in sigma for sigma clipping"));
963 cpl_parameterlist* list)
968 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
973 assure (result != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
974 "Memory allocation failed!");
978 "noise-clip-kappa"));
980 "noise-clip-niter"));
986 if(cpl_error_get_code() != CPL_ERROR_NONE){
1006 cpl_parameterlist* list)
1009 char paramname[256];
1010 char recipename[256];
1011 cpl_parameter* p =NULL;
1020 "detectorder-edges-search-win-hsize",
1022 "During extraction the local spatial profile (=cross-order) of the spectrum is determined by collapsing the 2-dimensional spectrum along the dispersion axis. This parameter defines the half size of the region across which the spectrum is collapsed. This parameter affects flagged pixels interpolation. In case of spectrum gaps the recommended optimal value is: (size_of_gap [nm]/(2*size_of_pixel [nm])+1)"));
1026 "detectorder-edges-flux-thresh",
1028 "Threshold in relative flux (compared to the central flux) "\
1029 "below which the order edges are defined"));
1032 "detectorder-min-sn",
1034 "Minimum signal-to-noise ratio at the centroid of the orders (60 for SLIT-UVB,VIS,NIR, 20 for IFU-UVB,VIS, 4 for IFU-NIR"));
1037 "detectorder-min-order-size-x",
1039 "Minimum order size in pixels along X direction [60 for UVB,VIS, 40 for NIR]"));
1041 "detectorder-chunk-half-size",
1043 "Half size in pixels of the chunks in Y direction"));
1047 "detectorder-slitlet-low-factor",
1049 "Factor for slitlet on lower edge slitlet (IFU)"));
1052 "detectorder-slitlet-up-factor",
1054 "Factor for slitlet on upper edge (IFU)"));
1056 "detectorder-fixed-slice",
1058 "If true the size of slitlet is fixed (IFU)"));
1062 sprintf(recipename,
"xsh.%s",recipe_id);
1063 sprintf(paramname,
"%s.%s",recipename,
"detectorder-slice-trace-method");
1065 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1067 check(p = cpl_parameter_new_enum(paramname,CPL_TYPE_STRING,
1068 "method adopted for IFU slice tracing ('fixed' for SLIT and 'sobel' for IFU):",
1070 4,
"auto",
"fixed",
"sobel",
"scharr"));
1072 check(cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,
1073 "detectorder-slice-trace-method"));
1074 check(cpl_parameterlist_append(list,p));
1077 "detectorder-qc-mode",
1079 "If true allows one to skip edge detection on orders below detectorder-min-sn (oly for QC mode, not to be set by normal users)"));
1100 cpl_parameterlist* list,cpl_parameterlist* drs)
1112 "detectorder-edges-search-win-hsize"));
1114 "detectorder-edges-flux-thresh"));
1116 "detectorder-min-sn"));
1118 "detectorder-min-order-size-x"));
1120 "detectorder-chunk-half-size"));
1122 "detectorder-slitlet-low-factor"));
1124 "detectorder-slitlet-up-factor"));
1126 "detectorder-fixed-slice"));
1129 "detectorder-slice-trace-method"));
1134 "detectorder-qc-mode"));
1137 if(cpl_error_get_code() != CPL_ERROR_NONE){
1155 cpl_parameterlist* list)
1165 "detectorder-d2-min-sn",
1167 "minimum signal noise ratio in D2 lamp frame in order"));
1187 const char* recipe_id, cpl_parameterlist* list)
1199 "detectorder-d2-min-sn"));
1202 if(cpl_error_get_code() != CPL_ERROR_NONE){
1218 cpl_parameterlist* list)
1230 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1233 "background-edges-margin",
1235 "X margin to order edge to define background sampling points"));
1238 "background-poly-deg-y",
1240 "Poly mode fit deg along Y."));
1243 "background-poly-deg-x",
1245 "Poly mode fit deg along X."));
1248 "background-poly-kappa",
1250 "Poly mode kappa value of kappa-sigma-clip outliers removal."));
1272 cpl_parameterlist* list)
1281 memset(result, 0x0,
sizeof(*result));
1285 "background-edges-margin"));
1288 "background-poly-deg-x"));
1291 "background-poly-deg-y"));
1294 "background-poly-kappa"));
1303 if(cpl_error_get_code() != CPL_ERROR_NONE){
1323 const char *method_string = NULL;
1329 "detectarclines-fit-win-hsize",
1331 "Half window size (HWS) in pixels for the line 2D fitting window"\
1332 " (total window size = 2*HWS+1)"));
1335 "detectarclines-search-win-hsize",
1337 "Half window size (HWS) in pixels for the line search box around "\
1338 "the expected position (total window size = 2*HWS+1) [bin units]"));
1341 "detectarclines-running-median-hsize",
1343 "Half window size in pixels (HWS) for the running median box"));
1346 "detectarclines-wavesol-deg-lambda",
1348 "Degree in lambda in the polynomial solution "\
1349 "X=f(lambda,order,slit) and Y=f(lambda,order,slit) (POLY mode)"));
1352 "detectarclines-wavesol-deg-order",
1354 "Degree in order in the polynomial solution "\
1355 "X=f(lambda,order,slit) and Y=f(lambda,order,slit) (POLY mode)"));
1356 if( strcmp(
"xsh_2dmap",recipe_id) == 0 ) {
1359 "detectarclines-wavesol-deg-slit",
1361 "Degree in slit in the polynomial solution "\
1362 "X=f(lambda,order,slit) and Y=f(lambda,order,slit) (POLY mode)"));
1367 if (strcmp(recipe_id,
"xsh_predict") == 0) {
1369 "detectarclines-ordertab-deg-y",
1371 "Degree in Y in the polynomial order tracing X=f(Y)"));
1375 "detectarclines-min-sn",
1377 "Minimum signal-to-noise ratio to filter lines [xsh_predict: UVB,VIS=5,NIR=4; xsh_2dmap: UVB=3, VIS=6, NIR=10]"));
1380 method_string=
"gaussian";
1383 method_string =
"barycenter";
1386 "detectarclines-find-lines-center", method_string,
1387 "Method used to find the center of the lines: gaussian, barycenter. Gaussian method applies a Gaussian fit to the line. Barycenter method computes the line centroid." ));
1410 const char* recipe_id, cpl_parameterlist* list)
1444 const char* recipe_id, cpl_parameterlist* list)
1447 const char *method_string = NULL;
1457 "detectarclines-fit-win-hsize"));
1459 recipe_id,
"detectarclines-search-win-hsize"));
1461 recipe_id,
"detectarclines-running-median-hsize"));
1463 "detectarclines-wavesol-deg-lambda"));
1464 if (strcmp(
"xsh_2dmap", recipe_id) == 0) {
1472 "detectarclines-wavesol-deg-order"));
1473 if (strcmp(
"xsh_predict", recipe_id) == 0) {
1475 "detectarclines-ordertab-deg-y"));
1478 "detectarclines-min-sn"));
1480 "detectarclines-find-lines-center"));
1481 if ( strcmp( method_string,
"gaussian") == 0){
1493 if(cpl_error_get_code() != CPL_ERROR_NONE){
1520 "detectarclines-clip-sigma",
1522 "Kappa value in sigma clipping during the polynomial solution "\
1523 "fit (POLY mode)"));
1525 "detectarclines-clip-niter",
1527 "Number of iterations in sigma clipping during the polynomial "\
1528 "solution fit (POLY mode)"));
1530 "detectarclines-clip-frac",
1532 "Minimal fractions of bad pixel allowed in sigma clipping during"\
1533 "the polynomial solution fit (POLY mode)"));
1552 const char* recipe_id, cpl_parameterlist* list)
1564 "detectarclines-clip-sigma"));
1566 "detectarclines-clip-niter"));
1568 "detectarclines-clip-frac"));
1571 if(cpl_error_get_code() != CPL_ERROR_NONE){
1587 cpl_parameterlist* list)
1595 "detectcontinuum-clip-res-max", 0.5, -1., 2.,
1596 "Maximum allowed residual (before kappa-sigma clip)"));
1600 "detectcontinuum-clip-sigma", 5,
1601 "Kappa value in sigma clipping during order trace polynomial fit"));
1604 "detectcontinuum-clip-niter", 5,
1605 "Number of iterations in sigma clipping during order trace "\
1609 "detectcontinuum-clip-frac", 0.4,
1610 "Minimal fractions of points accepted / total in sigma clipping"\
1611 "during order trace polynomial fit"));
1631 cpl_parameterlist* list)
1643 "detectcontinuum-clip-res-max"));
1645 "detectcontinuum-clip-sigma"));
1647 "detectcontinuum-clip-niter"));
1649 "detectcontinuum-clip-frac"));
1652 if( cpl_error_get_code() != CPL_ERROR_NONE){
1668 cpl_parameterlist* list,
1676 "detectcontinuum-search-win-hsize",
1678 "Half window size in pixels for the 1D box to search for the "\
1679 "maximum in the cross-dispersion profile"));
1682 "detectcontinuum-running-win-hsize",
1684 "Half window size for the running median box during the "\
1685 "search for the maximum in the cross-dispersion profile"));
1688 "detectcontinuum-fit-win-hsize",
1690 "Half window size for the fit of the cross-dispersion profile"));
1693 "detectcontinuum-center-thresh-fac",
1695 "Threshold factor applied to check that the flux at the fitted peak is "
1696 "higher than error."));
1699 "detectcontinuum-ordertab-step-y",
1701 "Step in Y for order centroid detection"));
1704 "detectcontinuum-ordertab-deg-y",
1706 "Degree in Y in the polynomial order tracing X=f(Y)")) ;
1755 const char* recipe_id, cpl_parameterlist* list)
1767 "detectcontinuum-search-win-hsize"));
1769 "detectcontinuum-fit-win-hsize"));
1771 "detectcontinuum-center-thresh-fac"));
1773 "detectcontinuum-running-win-hsize"));
1775 "detectcontinuum-ordertab-deg-y"));
1777 "detectcontinuum-ordertab-step-y"));
1791 if(cpl_error_get_code() != CPL_ERROR_NONE){
1807 cpl_parameterlist* list)
1816 "Multiple of sigma in sigma clipping for evaluate tilt"));
1820 "Number of iterations in sigma clipping for evaluate tilt"));
1824 "Minimal fractions of points accepted / total in sigma clipping for evaluate tilt"));
1839 cpl_parameterlist* list)
1844 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1849 assure (result != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
1850 "Memory allocation failed!");
1854 "tilt-clip-kappa"));
1856 "tilt-clip-niter"));
1861 if(cpl_error_get_code() != CPL_ERROR_NONE){
1878 cpl_parameterlist* list)
1885 "specres-clip-kappa",
1887 "Multiple of sigma in sigma clipping for evaluate spectral resolution"));
1889 "specres-clip-niter",
1891 "Number of iterations in sigma clipping for evaluate spectral resolution"));
1893 "specres-clip-frac",
1895 "Minimal fractions of points accepted / total in sigma clipping for evaluate spectral resolution"));
1910 cpl_parameterlist* list)
1915 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1920 assure (result != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
1921 "Memory allocation failed!");
1925 "specres-clip-kappa"));
1927 "specres-clip-niter"));
1929 "specres-clip-frac"));
1932 if(cpl_error_get_code() != CPL_ERROR_NONE){
1941 cpl_parameterlist* list)
1944 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1949 "followarclines-search-window-half-size",
1951 "Half window size (HWS) in pixels (Y axis) of search window for each line."
1959 cpl_parameterlist* list)
1963 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1966 "followarclines-search-window-half-size"));
1973 cpl_parameterlist* list)
1976 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1981 "followarclines-order-edges-mask",
1983 "Nb of pixels suppressed (X) from edges of search window."
1991 cpl_parameterlist* list)
1995 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
1998 "followarclines-order-edges-mask"));
2005 cpl_parameterlist* list)
2008 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
2013 "followarclines-min-sn",
2015 "Minimum Signal over Noise ratio at center to keep the line (6 for IFU, 15 for SLIT)."
2023 cpl_parameterlist* list)
2027 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
2030 "followarclines-min-sn"));
2039 cpl_parameterlist * plist )
2045 "If 'no', use wavecal solution, otherwise use model. Default is 'no'" ) ) ;
2053 const cpl_parameterlist * plist )
2055 char * yesno = NULL ;
2062 if ( strcmp( yesno,
"yes" ) == 0 )
return 1 ;
2074 cpl_parameterlist * plist,
2087 "removecrhsingle-sigmalim",
2089 "Poisson fluctuation threshold to flag CRHs (see van Dokkum, PASP,113,2001,p1420-27)"));
2091 "removecrhsingle-flim",
2093 "Minimum contrast between the Laplacian image and the fine structure image that a point must have to be flagged as CRH. (see van Dokkum, PASP,113,2001,p1420-27)"));
2095 "removecrhsingle-niter",
2097 "Max number of iterations. If value < 0 given, will use default value of 0 for NIR, and 4 for VIS and UVB."));
2104 const char* recipe_id,
2105 cpl_parameterlist* list)
2122 "removecrhsingle-sigmalim"));
2124 "removecrhsingle-flim"));
2126 "removecrhsingle-niter"));
2130 if(cpl_error_get_code() != CPL_ERROR_NONE){
2148 {
"tanh", CPL_KERNEL_TANH},
2149 {
"sinc", CPL_KERNEL_SINC},
2150 {
"sinc2", CPL_KERNEL_SINC2},
2151 {
"lanczos", CPL_KERNEL_LANCZOS},
2152 {
"hamming", CPL_KERNEL_HAMMING},
2153 {
"hann", CPL_KERNEL_HANN},
2161 for( ; pk->
name != NULL ; pk++ )
2185 cpl_parameterlist * plist,
2188 char ker_comment[256];
2193 sprintf( ker_comment,
2194 "Name of the Interpolation Kernel Used. Possible values are: "\
2195 " tanh, sinc, sinc2, lanczos, hamming, hann.");
2204 "Rectify Interpolation radius [bin units]."
2208 "rectify-bin-lambda",
2210 "Wavelength step in the output spectrum [nm]"));
2215 "Spatial step along the slit in the output spectrum [arcsec]"));
2247 cpl_parameterlist* list)
2252 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
2255 recipe_id,
"rectify-fast"));
2262 cpl_parameterlist* list)
2268 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
2273 assure (result != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
2274 "Memory allocation failed!");
2283 "rectify-bin-lambda"));
2285 "rectify-bin-slit"));
2306 if(cpl_error_get_code() != CPL_ERROR_NONE){
2315 cpl_parameterlist * plist,
2319 assure(plist != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
2322 "compute-response-lambda-step",
2324 "Compute Response Interpolation Lambda Step"));
2332 cpl_parameterlist * list)
2336 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
2341 assure (result != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
2342 "Memory allocation failed!");
2347 "compute-response-lambda-step"));
2350 if(cpl_error_get_code() != CPL_ERROR_NONE){
2370 "Localization method (MANUAL, MAXIMUM, GAUSSIAN) used to detect "\
2371 "the object centroid and height on the slit"));
2374 "localize-chunk-nb",
2376 "Number of chunks in the full spectrum to localize the object"));
2380 "Threshold relative to the peak intensity below which the edges "\
2381 "of the object are detected for MAXIMUM localization"));
2383 "localize-deg-lambda",
2385 "Degree in lambda in the localization polynomial expression "\
2386 "slit=f(lambda), used only for MAXIMUM and GAUSSIAN"));
2388 if (strcmp(recipe_id,
"xsh_scired_slit_nod")==0){
2390 "localize-slit-position",
2392 "Object position on the slit for MANUAL localization [arcsec]. It refers to the object position in the first frame of the nodding sequence"));
2396 "localize-slit-position",
2398 "Object position on the slit for MANUAL localization [arcsec]"));
2401 "localize-slit-hheight",
2403 "Object half height on the slit for MANUAL localization [arcsec]"));
2407 "Kappa value for sigma clipping in the localization "\
2412 "Number of iterations for sigma clipping in the localization "\
2417 "TRUE if we want to mask sky lines using SKY_LINE_LIST file."));
2424 const char* recipe_id, cpl_parameterlist* list)
2427 const char* par_method = NULL;
2437 "localize-chunk-nb"));
2439 "localize-thresh"));
2441 "localize-deg-lambda"));
2443 "localize-method"));
2454 xsh_error_msg(
"WRONG parameter localize-method %s",par_method);
2457 "localize-slit-position"));
2459 "localize-slit-hheight"));
2465 "localize-use-skymask"));
2468 if(cpl_error_get_code() != CPL_ERROR_NONE){
2486 "localizeifu-bckg-deg",
2488 "Degree (<=2) of the polynomial component in the cross-dispersion profile fit"));
2491 "localizeifu-smooth-hsize",
2493 "Half-size of the median filter for smoothing the cross-dispersion profile prior to localization"));
2496 "localizeifu-wavelet-nscales",
2498 "Number of scales used for wavelet a trous algorithm"));
2501 "localizeifu-wavelet-hf-skip",
2503 "Number of high frequency scales skipped from the wavelet decomposition"));
2506 "localizeifu-sigma-low",
2508 "Gaussian fits of the cross-dispersion profile whose FWHM is lower than this value are rejected"));
2511 "localizeifu-sigma-up",
2513 "Gaussian fits of the cross-dispersion profile whose FWHM is larger than this value are rejected"));
2516 "localizeifu-snr-low",
2518 "Gaussian fits of the cross-dispersion profile whose SNR is lower than this value are rejected"));
2521 "localizeifu-snr-up",
2523 "Gaussian fits of the cross-dispersion profile whose SNR is larger than this value are rejected"));
2526 "localizeifu-slitlow-edges-mask",
2531 "localizeifu-slitup-edges-mask",
2537 "TRUE if we want to mask sky lines using SKY_LINE_LIST file."));
2541 "Half size of chunk [bin]"));
2547 const char* recipe_id, cpl_parameterlist* list)
2558 "localizeifu-bckg-deg"));
2560 "localizeifu-smooth-hsize"));
2563 "localizeifu-wavelet-nscales"));
2566 "localizeifu-wavelet-hf-skip"));
2569 "localizeifu-sigma-low"));
2571 "localizeifu-sigma-up"));
2574 "localizeifu-snr-low"));
2576 "localizeifu-snr-up"));
2579 "localizeifu-slitlow-edges-mask"));
2581 "localizeifu-slitup-edges-mask"));
2584 "localizeifu-use-skymask"));
2587 "localizeifu-chunk-hsize"));
2590 if(cpl_error_get_code() != CPL_ERROR_NONE){
2603 cpl_parameterlist * plist,
2612 "Method used for extraction (LOCALIZATION, NOD)"));
2619 cpl_parameterlist * plist,
2626 "stdextract-interp-hsize",
2628 "Half size of mask used to define object cross order profile"));
2635 const char* recipe_id, cpl_parameterlist* list)
2638 const char *par_method = NULL;
2648 if(strstr(recipe_id,
"offset")!= NULL) {
2666 xsh_error_msg(
"WRONG parameter extract-method %s",par_method);
2671 if(cpl_error_get_code() != CPL_ERROR_NONE){
2679 const char* recipe_id, cpl_parameterlist* list)
2693 "stdextract-interp-hsize"));
2696 if(cpl_error_get_code() != CPL_ERROR_NONE){
2708 cpl_parameterlist * plist,
2715 "sky-subtract", TRUE,
2716 "TRUE to use subtract sky single."));
2719 "sky-bspline-nbkpts-first",
2721 "Nb of break points for Bezier curve fitting (without localization)"));
2723 "sky-bspline-nbkpts-second",
2725 "Nb of break points for Bezier curve fitting (with localization)"));
2728 "sky-bspline-order",
2730 "Bezier spline order"));
2733 "sky-bspline-niter",
2735 "Nb of iterations"));
2738 "sky-bspline-kappa",
2740 "Kappa value used to kappa-sigma-clip object"));
2744 SKY_METHOD_PRINT(p.
method),
"Sky subtract Method (BSPLINE, BSPLINE1, BSPLINE2 MEDIAN). BSPLINE is equivalent to BSPLINE1"));
2748 BSPLINE_SAMPLING_PRINT(p.
bspline_sampling),
"BSPLINE sampling. UNIFORM-uses the user defined nbkpts value, corrected for binning, for all orders. FINE: multiplies the user defined nbkpts value, corrected for binning, by a hard coded coefficient optimized on each arm-order)"));
2753 "Half size of the running median. If sky-method=MEDIAN ."
2758 "sky-slit-edges-mask",
2760 "Size of edges mask in arcsec"));
2765 "Central position of the sky window #1 [arcsec]"));
2770 "Half size of sky window #1 [arcsec]"));
2775 "Central position of the sky window #2 [arcsec]"));
2780 "Half size of the sky window #2 [arcsec]"));
2787 const char* recipe_id, cpl_parameterlist* list)
2790 const char* par_method = NULL;
2802 "sky-bspline-nbkpts-first"));
2804 "sky-bspline-nbkpts-second"));
2806 "sky-bspline-order"));
2808 "sky-bspline-niter"));
2810 "sky-bspline-kappa"));
2845 "bspline-sampling"));
2859 "sky-median-hsize"));
2862 "sky-slit-edges-mask"));
2878 if(cpl_error_get_code() != CPL_ERROR_NONE){
2886 cpl_parameterlist* list)
2888 bool result = FALSE;
2899 cpl_parameterlist *list,
2900 cpl_frame* wavemap_frame,
2901 cpl_frame* slitmap_frame,
2902 int *dosky,
int *domap)
2905 bool computemap=FALSE;
2919 if ( (sub_sky && !computemap) &&
2920 (wavemap_frame == NULL || slitmap_frame == NULL)
2922 xsh_msg_warning(
"Parameters sky-subtract and compute-map are not compatible, compute-map has been forced to TRUE");
2927 *domap = computemap;
2935 cpl_parameterlist* list)
2940 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
2944 "sky-bspline-nbkpts-first"));
2952 cpl_parameterlist* list)
2961 "sky-bspline-nbkpts-second"));
2969 cpl_parameterlist* list)
2978 "sky-bspline-niter"));
2987 cpl_parameterlist* list)
2996 "sky-bspline-kappa"));
3007 cpl_parameterlist * plist,
3015 p,
"Method for combining overlapping orders "\
3016 "(0 = WEIGHTED with the errors, 1 = MEAN)"));
3023 cpl_parameterlist* list)
3036 "mergeord-method"));
3039 if(cpl_error_get_code() != CPL_ERROR_NONE){
3050 cpl_parameterlist * plist,
3057 "optimal_extract_kappa",
3059 "Pixels with values > kappa*RMS are ignored. If negative no rejection."));
3066 cpl_parameterlist* list)
3071 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
3075 "optimal_extract_kappa"));
3103 p.
deg_x,
"Degree in X in the polynomial dispersion solution "\
3104 "lambda=f(X,Y) and slit=f(X,Y)"));
3107 p.
deg_y,
"Degree in Y in the polynomial dispersion solution "\
3108 "lambda=f(X,Y) and slit=f(X,Y)"));
3128 cpl_parameterlist* list)
3140 "dispersol-deg-x"));
3142 "dispersol-deg-y"));
3145 if(cpl_error_get_code() != CPL_ERROR_NONE){
3161 cpl_parameterlist * list,
3165 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
3168 if (strstr(recipe_id,
"nod") != NULL) {
3186 xsh_parameters_new_string( list, recipe_id,
"combinenod-throwlist", p.
throwname,
"Name of ascii file containing the list of throw shifts with respect to the first exposure"));
3191 "Combination method for nodded frames (MEDIAN, MEAN)"));
3207 cpl_parameterlist* list)
3210 const char *par_method = NULL;
3213 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
3218 assure (result != NULL, CPL_ERROR_ILLEGAL_OUTPUT,
3219 "Memory allocation failed!");
3222 if( strstr(recipe_id,
"nod") != NULL) {
3236 "combinenod-throwlist"));
3239 "combinenod-method"));
3247 xsh_error_msg(
"WRONG parameter combinenod-method %s",par_method);
3252 if(cpl_error_get_code() != CPL_ERROR_NONE){
3280 "Oversample factor for the science image"));
3282 "optextract-box-half-size", p.
box_hsize,
3283 "Extraction box [pixel]"));
3286 "Chunk size [bin]"));
3289 "Lambda step [nm]"));
3292 "Kappa for cosmics ray hits rejection" ) ) ;
3295 "Maximum bad pixels fraction for cosmics ray hits rejection"));
3298 "Maximum number of iterations for cosmics ray hits rejection"));
3300 "optextract-niter", p.
niter,
3301 "Number of iterations" ) ) ;
3304 "Extraction method GAUSSIAN | GENERAL"));
3323 cpl_parameterlist* list)
3326 const char *par_method = NULL;
3337 "optextract-oversample"));
3339 "optextract-box-half-size"));
3341 "optextract-chunk-size"));
3343 "optextract-step-lambda"));
3345 "optextract-clip-kappa"));
3347 "optextract-clip-frac"));
3349 "optextract-clip-niter"));
3351 "optextract-niter"));
3353 "optextract-method"));
3361 xsh_error_msg(
"WRONG parameter optextract-method %s",par_method);
3365 if(cpl_error_get_code() != CPL_ERROR_NONE){
3372 cpl_parameterlist* list,
3382 "Lower Slit Limit (localize and extract"));
3385 "Upper Slit Limit (localize and extract"));
3392 cpl_parameterlist* list )
3408 if(cpl_error_get_code() != CPL_ERROR_NONE){
3415 cpl_parameterlist* list )
3422 "geom-ifu-localize-single",
3424 "Use a concatenation of rectified to localize."));
3430 cpl_parameterlist* list)
3438 "geom-ifu-localize-single" ) ;
3449 cpl_parameterlist* result=NULL;
3452 const char* svalue=NULL;
3458 const char* rec_id=NULL;
3459 const char* pname=NULL;
3460 const char* ptype=NULL;
3461 const char* phelp=NULL;
3465 nrow=cpl_table_get_nrow(tab);
3466 result=cpl_parameterlist_new();
3467 for(i=0;i<nrow;i++) {
3468 check(rec_id=cpl_table_get_string(tab,
"recipe",i));
3469 check(pname=cpl_table_get_string(tab,
"param_name",i));
3470 check(ptype=cpl_table_get_string(tab,
"param_type",i));
3471 check(phelp=cpl_table_get_string(tab,
"param_help",i));
3473 if (strcmp(ptype,
"int") == 0) {
3474 check(ivalue=atoi(cpl_table_get_string(tab,
"param_value",i)));
3477 else if (strcmp(ptype,
"float") == 0) {
3478 fvalue=atof(cpl_table_get_string(tab,
"param_value",i));
3481 else if (strcmp(ptype,
"double") == 0) {
3482 dvalue=atof(cpl_table_get_string(tab,
"param_value",i));
3485 else if (strcmp(ptype,
"string") == 0) {
3486 svalue=cpl_table_get_string(tab,
"param_value",i);
3489 else if (strcmp(ptype,
"bool") == 0) {
3490 bvalue=atoi(cpl_table_get_string(tab,
"param_value",i));
3494 xsh_msg_error(
"DRS table parameter type %s not supported!",ptype);
3505static cpl_error_code
3509 cpl_parameter* p=NULL;
3510 const char* pname=NULL;
3511 pname=
"pre-overscan-corr";
3513 cpl_parameter_set_int(p,0);
3515 return cpl_error_get_code();
3521static cpl_error_code
3522xsh_parameter_check_int(cpl_parameterlist* parameters,
const char* rec_id,
const char* pname,
const int min,
const int max,
const int skip_val,
const char* spec)
3526 cpl_parameter* p=NULL;
3530 if(skip_val == -1) {
3531 if( (uval != skip_val && uval < min ) || uval >
max ) {
3533 pname,uval,min,spec,
max);
3535 ival=cpl_parameter_get_default_int(p);
3536 cpl_parameter_set_int(p,ival);
3539 if( uval < min || uval >
max ) {
3541 pname,uval,min,spec,
max);
3543 ival=cpl_parameter_get_default_int(p);
3544 cpl_parameter_set_int(p,ival);
3549 return cpl_error_get_code();
3553static cpl_error_code
3554xsh_parameter_check_double(cpl_parameterlist* parameters,
const char* rec_id,
const char* pname,
const double min,
const double max,
const double skip_val,
const char* spec)
3558 cpl_parameter* p=NULL;
3561 if(skip_val == -1) {
3562 if( (uval != skip_val && uval < min ) || uval >
max ) {
3564 pname,uval,min,spec,
max);
3566 dval=cpl_parameter_get_default_double(p);
3567 cpl_parameter_set_double(p,dval);
3570 if( uval < min || uval >
max ) {
3572 pname,uval,min,spec,
max);
3574 dval=cpl_parameter_get_default_double(p);
3575 cpl_parameter_set_double(p,dval);
3580 return cpl_error_get_code();
3584static cpl_error_code
3588 const char* pname=NULL;
3590 pname=
"crh-clip-frac";
3593 pname=
"crh-clip-kappa";
3596 pname=
"crh-clip-niter";
3599 return cpl_error_get_code();
3603static cpl_error_code
3607 const char* pname=NULL;
3609 pname=
"noise-clip-kappa";
3612 pname=
"noise-clip-niter";
3615 pname=
"noise-clip-frac";
3618 pname=
"noise-clip-diff";
3621 pname=
"noise-lower-rejection";
3624 pname=
"noise-higher-rejection";
3627 return cpl_error_get_code();
3633static cpl_error_code
3637 const char* pname=NULL;
3643 pname=
"removecrhsingle-sigmalim";
3646 pname=
"removecrhsingle-flim";
3649 pname=
"removecrhsingle-niter";
3652 return cpl_error_get_code();
3658static cpl_error_code
3659xsh_params_crhsingle_nod_check(cpl_parameterlist * parameters,
const char* rec_id,
XSH_ARM arm)
3662 const char* pname=NULL;
3668 double min_sigma_val=20;
3670 (strcmp(rec_id,
"xsh_respon_slit_nod") == 0) &&
3676 pname=
"removecrhsingle-sigmalim";
3678 double dval=cpl_parameter_get_default_double(p);
3679 if(dval< min_sigma_val) {
3680 cpl_parameter_set_default_double(p,min_sigma_val);
3682 double uval=cpl_parameter_get_double(p);
3683 if(uval< min_sigma_val) {
3684 cpl_parameter_set_double(p,min_sigma_val);
3688 return cpl_error_get_code();
3716static cpl_error_code
3721 const char* pname=NULL;
3723 pname=
"optextract-oversample";
3726 pname=
"optextract-box-half-size";
3729 pname=
"optextract-chunk-size";
3732 pname=
"optextract-step-lambda";
3735 pname=
"optextract-clip-kappa";
3738 pname=
"optextract-clip-frac";
3741 pname=
"optextract-clip-niter";
3744 pname=
"optextract-niter";
3747 return cpl_error_get_code();
3751static cpl_error_code
3755 const char* pname=NULL;
3757 pname=
"followarclines-search-window-half-size";
3760 pname=
"followarclines-order-edges-mask";
3763 pname=
"followarclines-min-sn";
3766 return cpl_error_get_code();
3770static cpl_error_code
3774 const char* pname=NULL;
3776 pname=
"stdextract-interp-hsize";
3781 return cpl_error_get_code();
3786static cpl_error_code
3790 const char* pname=NULL;
3792 pname=
"tilt-clip-kappa";
3795 pname=
"tilt-clip-niter";
3798 pname=
"tilt-clip-frac";
3801 return cpl_error_get_code();
3806static cpl_error_code
3810 const char* pname=NULL;
3812 pname=
"specres-clip-kappa";
3815 pname=
"specres-clip-niter";
3818 pname=
"specres-clip-frac";
3821 return cpl_error_get_code();
3826static cpl_error_code
3828 const int sizex,
const int sizey,
const int norder)
3833 const char* pname=NULL;
3835 pname=
"background-poly-deg-x";
3838 pname=
"background-poly-deg-y";
3842 pname=
"background-poly-kappa";
3846 return cpl_error_get_code();
3850static cpl_error_code
3854 const char* pname=NULL;
3856 pname=
"rectify-radius";
3859 pname=
"rectify-bin-slit";
3862 pname=
"rectify-bin-lambda";
3865 return cpl_error_get_code();
3869static cpl_error_code
3873 const char* pname=NULL;
3875 pname=
"localize-chunk-nb";
3878 pname=
"localize-thresh";
3881 pname=
"localize-deg-lambda";
3884 pname=
"localize-slit-position";
3887 pname=
"localize-slit-hheight";
3891 pname=
"localize-kappa";
3894 pname=
"localize-niter";
3897 return cpl_error_get_code();
3903static cpl_error_code
3908 int nbkpts_max=20000/(0.75 *
biny);
3910 const char* pname=NULL;
3912 pname=
"sky-bspline-nbkpts-first";
3915 pname=
"sky-bspline-nbkpts-second";
3918 pname=
"sky-bspline-order";
3921 pname=
"sky-bspline-niter";
3924 pname=
"sky-bspline-kappa";
3927 pname=
"sky-slit-edges-mask";
3930 pname=
"sky-hheight1";
3933 pname=
"sky-hheight2";
3936 return cpl_error_get_code();
3942static cpl_error_code
3946 const char* pname=NULL;
3948 pname=
"model-anneal-factor";
3951 pname=
"model-scenario";
3954 pname=
"model-maxit";
3957 return cpl_error_get_code();
3961static cpl_error_code
3965 const char* pname=NULL;
3967 pname=
"pre-overscan-corr";
3970 return cpl_error_get_code();
3976static cpl_error_code
3980 const char* pname=NULL;
3984 pname=
"detectarclines-fit-win-hsize";
3987 pname=
"detectarclines-search-win-hsize";
3990 pname=
"detectarclines-running-median-hsize";
3993 pname=
"detectarclines-wavesol-deg-lambda";
3996 pname=
"detectarclines-wavesol-deg-order";
3999 if(strcmp(rec_id,
"xsh_predict") == 0) {
4007 if (strcmp(
"xsh_2dmap", rec_id) == 0) {
4008 pname =
"detectarclines-wavesol-deg-slit";
4013 if(strcmp(rec_id,
"xsh_predict") == 0) {
4014 pname=
"detectarclines-ordertab-deg-y";
4017 pname=
"detectarclines-min-sn";
4020 pname=
"detectarclines-clip-sigma";
4023 pname=
"detectarclines-clip-niter";
4026 pname=
"detectarclines-clip-frac";
4029 return cpl_error_get_code();
4033static cpl_error_code
4037 const char* pname=NULL;
4039 pname=
"detectcontinuum-search-win-hsize";
4042 pname=
"detectcontinuum-running-win-hsize";
4045 pname=
"detectcontinuum-fit-win-hsize";
4048 pname=
"detectcontinuum-center-thresh-fac";
4051 pname=
"detectcontinuum-ordertab-step-y";
4054 pname=
"detectcontinuum-ordertab-deg-y";
4057 pname=
"detectcontinuum-clip-sigma";
4060 pname=
"detectcontinuum-clip-frac";
4063 pname=
"detectcontinuum-clip-res-max";
4066 pname=
"detectcontinuum-clip-niter";
4069 return cpl_error_get_code();
4073static cpl_error_code
4075 const char* rec_id,
const int sizex,
4076 const int sizey,
const int norders)
4079 const char* pname=NULL;
4081 pname=
"detectorder-edges-flux-thresh";
4084 pname=
"detectorder-edges-search-win-hsize";
4087 pname=
"detectorder-min-order-size-x";
4090 pname=
"detectorder-chunk-half-size";
4093 pname=
"detectorder-slitlet-low-factor";
4096 pname=
"detectorder-slitlet-up-factor";
4099 pname=
"detectorder-chunk-half-size";
4102 pname=
"detectorder-min-sn";
4105 pname=
"detectorder-d2-min-sn";
4108 return cpl_error_get_code();
4112static cpl_error_code
4116 const char* pname=NULL;
4118 pname=
"dispersol-deg-x";
4121 pname=
"dispersol-deg-y";
4124 return cpl_error_get_code();
4128static cpl_error_code
4135 cpl_parameter* p=NULL;
4136 const char* pname=NULL;
4151 pname=
"fpn_nsamples";
4155 if( nsamples<1 || nsamples > sizex || nsamples > sizey ) {
4156 xsh_msg_warning(
"%s (%d) < 1 or > detector X size (%d) or > detector Y size. Switch to defaults",pname,nsamples,sizex);
4158 ival=cpl_parameter_get_default_int(p);
4159 cpl_parameter_set_int(p,ival);
4164 if( hsize<1 || hsize > sizex || hsize > sizey ) {
4165 xsh_msg_warning(
"%s (%d) < 1 or > detector X size (%d) or > detector Y size (%d). Switch to defaults",pname,hsize,sizex,sizey);
4167 ival=cpl_parameter_get_default_int(p);
4168 cpl_parameter_set_int(p,ival);
4172 return cpl_error_get_code();
4176static cpl_error_code
4181 const char* pname=NULL;
4183 pname=
"stacking_ks_low";
4186 pname=
"stacking_ks_iter";
4189 return cpl_error_get_code();
4194static cpl_error_code
4199 const char* pname=NULL;
4208 return cpl_error_get_code();
4212static cpl_error_code
4215 const int sizex,
const int sizey)
4219 const char* pname=NULL;
4233 return cpl_error_get_code();
4237static cpl_error_code
4240 const int sizex,
const int sizey)
4243 const char* pname=NULL;
4257 return cpl_error_get_code();
4262static cpl_error_code
4265 const int sizex,
const int sizey)
4269 const char* pname=NULL;
4270 cpl_parameter* p=NULL;
4275 pname=
"random_nsamples";
4279 if( nsamples<1 || nsamples > sizex || nsamples > sizey ) {
4280 xsh_msg_warning(
"%s (%d) < 1 or > detector X size (%d) or > detector Y size. Switch to defaults",pname,nsamples,sizex);
4282 ival=cpl_parameter_get_default_int(p);
4283 cpl_parameter_set_int(p,ival);
4286 pname=
"random_sizex";
4288 if( hsize<1 || hsize > sizex || hsize > sizey ) {
4289 xsh_msg_warning(
"%s (%d) < 1 or > detector X size (%d) or > detector Y size (%d). Switch to defaults",pname,hsize,sizex,sizey);
4291 ival=cpl_parameter_get_default_int(p);
4292 cpl_parameter_set_int(p,ival);
4296 return cpl_error_get_code();
4301static cpl_error_code
4304 const int sizex,
const int sizey)
4310 cpl_parameter* p=NULL;
4311 const char* pname=NULL;
4326 pname=
"ron_nsamples";
4329 if( nsamples<1 || nsamples > sizex || nsamples > sizey ) {
4330 xsh_msg_warning(
"%s (%d) < 1 or > detector X size (%d) or > detector Y size. Switch to defaults",pname,nsamples,sizex);
4332 ival=cpl_parameter_get_default_int(p);
4333 cpl_parameter_set_int(p,ival);
4338 if( hsize<1 || hsize > sizex || hsize > sizey ) {
4339 xsh_msg_warning(
"%s (%d) < 1 or > detector X size (%d) or > detector Y size (%d). Switch to defaults",pname,hsize,sizex,sizey);
4341 ival=cpl_parameter_get_default_int(p);
4342 cpl_parameter_set_int(p,ival);
4346 return cpl_error_get_code();
4352static cpl_error_code
4355 const int sizex,
const int sizey)
4358 if(strcmp(rec_id,
"xsh_mbias") ==0 ) {
4362 }
else if(strcmp(rec_id,
"xsh_mdark") ==0 ) {
4368 return cpl_error_get_code();
4373static cpl_error_code
4377 cpl_parameter* p=NULL;
4378 const char* pname=NULL;
4381 pname=
"localizeifu-bckg-deg";
4384 pname=
"localizeifu-smooth-hsize";
4387 pname=
"localizeifu-wavelet-nscales";
4390 pname=
"localizeifu-wavelet-hf-skip";
4393 pname=
"localizeifu-sigma-low";
4396 pname=
"localizeifu-sigma-up";
4399 pname=
"localizeifu-snr-low";
4402 pname=
"localizeifu-snr-up";
4405 pname=
"localizeifu-slitlow-edges-mask";
4408 pname=
"localizeifu-slitup-edges-mask";
4411 pname=
"localizeifu-use-skymask";
4413 if( (use_skymask < 0) || use_skymask > 10 ) {
4417 ival=cpl_parameter_get_default_bool(p);
4418 cpl_parameter_set_bool(p,ival);
4422 pname=
"localizeifu-chunk-hsize";
4426 return cpl_error_get_code();
4430static cpl_error_code
4434 const char* pname=NULL;
4436 pname=
"correctifu-niter";
4439 pname=
"correctifu-lambdaref";
4442 pname=
"correctifu-lambdaref-hsize";
4445 return cpl_error_get_code();
4497 return CPL_ERROR_ILLEGAL_INPUT;
4500 if (strcmp(rec_id,
"xsh_cfg_recover") == 0) {
4502 }
else if (strcmp(rec_id,
"xsh_mbias") == 0) {
4506 }
else if (strcmp(rec_id,
"xsh_mdark") == 0) {
4514 }
else if (strcmp(rec_id,
"xsh_mflat") == 0) {
4517 }
else if (strcmp(rec_id,
"xsh_predict") == 0) {
4520 }
else if (strcmp(rec_id,
"xsh_orderpos") == 0) {
4522 }
else if (strcmp(rec_id,
"xsh_2dmap") == 0) {
4526 }
else if (strcmp(rec_id,
"xsh_flexcomp") == 0) {
4529 }
else if (strcmp(rec_id,
"xsh_wavecal") == 0) {
4533 }
else if (strcmp(rec_id,
"xsh_respon_slit_stare") == 0) {
4542 }
else if (strcmp(rec_id,
"xsh_respon_slit_offset") == 0) {
4548 }
else if (strcmp(rec_id,
"xsh_respon_slit_nod") == 0) {
4554 }
else if (strcmp(rec_id,
"xsh_scired_slit_stare") == 0) {
4563 }
else if (strcmp(rec_id,
"xsh_scired_slit_offset") == 0) {
4569 }
else if (strcmp(rec_id,
"xsh_scired_slit_nod") == 0) {
4573 }
else if (strcmp(rec_id,
"xsh_scired_ifu_offset") == 0) {
4578 }
else if (strcmp(rec_id,
"xsh_scired_ifu_stare") == 0) {
4582 }
else if (strcmp(rec_id,
"xsh_absorp") == 0) {
4593 }
else if (strcmp(rec_id,
"xsh_geom_ifu") == 0) {
4599 }
else if (strcmp(rec_id,
"xsh_scired_ifu_stare_drl") == 0) {
4605 }
else if (strcmp(rec_id,
"xsh_scired_ifu_offset_drl") == 0) {
4613 xsh_msg_error(
"Parameter checking for recipe %s not supported", rec_id);
4622 return cpl_error_get_code();
4675 return CPL_ERROR_ILLEGAL_INPUT;
4676 return CPL_ERROR_ILLEGAL_INPUT;
4679 if (strcmp(rec_id,
"xsh_cfg_recover") == 0) {
4681 }
else if (strcmp(rec_id,
"xsh_mbias") == 0) {
4684 }
else if (strcmp(rec_id,
"xsh_mdark") == 0) {
4689 }
else if (strcmp(rec_id,
"xsh_mflat") == 0) {
4690 }
else if (strcmp(rec_id,
"xsh_predict") == 0) {
4691 }
else if (strcmp(rec_id,
"xsh_orderpos") == 0) {
4692 }
else if (strcmp(rec_id,
"xsh_2dmap") == 0) {
4693 }
else if (strcmp(rec_id,
"xsh_geom_ifu") == 0) {
4694 }
else if (strcmp(rec_id,
"xsh_flexcomp") == 0) {
4695 }
else if (strcmp(rec_id,
"xsh_wavecal") == 0) {
4696 }
else if (strcmp(rec_id,
"xsh_respon_slit_stare") == 0) {
4697 }
else if (strcmp(rec_id,
"xsh_respon_slit_offset") == 0) {
4698 }
else if (strcmp(rec_id,
"xsh_respon_slit_nod") == 0) {
4699 }
else if (strcmp(rec_id,
"xsh_scired_slit_stare") == 0) {
4700 }
else if (strcmp(rec_id,
"xsh_scired_slit_offset") == 0) {
4701 }
else if (strcmp(rec_id,
"xsh_scired_slit_nod") == 0) {
4702 }
else if (strcmp(rec_id,
"xsh_scired_ifu_offset") == 0) {
4703 }
else if (strcmp(rec_id,
"xsh_scired_ifu_stare") == 0) {
4706 xsh_msg_error(
"Parameter checking for recipe %s not supported", rec_id);
4711 return cpl_error_get_code();
4727 cpl_parameterlist * list,
4731 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
4737 "Method of barycentric correction to be applied (none|bary|helio)"));
4753 cpl_parameterlist* list)
4759 assure(list != NULL,CPL_ERROR_NULL_INPUT,
"parameters list is NULL");
4766 list, recipe_id,
"apply-corr"));
4784 if(cpl_error_get_code() != CPL_ERROR_NONE){
static xsh_instrument * instrument
#define XSH_ASSURE_NOT_NULL_MSG(pointer, msg)
#define assure(CONDITION, ERROR_CODE,...)
#define xsh_error_msg(...)
#define XSH_ASSURE_NOT_NULL(pointer)
int xsh_instrument_get_binx(xsh_instrument *instrument)
int xsh_instrument_get_biny(xsh_instrument *instrument)
XSH_ARM xsh_instrument_get_arm(xsh_instrument *i)
Get an arm on instrument structure.
#define xsh_msg_warning(...)
Print an warning message.
#define xsh_msg_error(...)
Print an error message.
#define xsh_msg(...)
Print a message on info level.
int xsh_time_stamp_set(int ts)
set timestamp
const char * xsh_string_toupper(char *s)
Convert all lowercase characters in a string into uppercase characters.
int xsh_debug_level_set(int level)
set debug level
char * xsh_stringcat_any(const char *s,...)
Concatenate an arbitrary number of strings.
enum bary_corr_method corr_method
enum combine_method method
xsh_find_center_method find_center_method
double slitlet_low_factor
double slitlow_edges_mask
enum localize_method method
const char * stack_method
enum bspline_sampling bspline_sampling
int xsh_parameters_time_stamp_get(const char *recipe_id, const cpl_parameterlist *list)
int xsh_parameters_rectify_fast_get(const char *recipe_id, cpl_parameterlist *list)
double xsh_parameters_wavecal_s_n_get(const char *recipe_id, cpl_parameterlist *list)
cpl_parameter * xsh_parameters_find(cpl_parameterlist *list, const char *recipe_id, const char *name)
find a parameter
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.
static cpl_error_code xsh_params_localize_check(cpl_parameterlist *parameters, const char *rec_id)
int xsh_parameters_get_temporary(const char *recipe_id, const cpl_parameterlist *list)
static void xsh_parameters_new_float(cpl_parameterlist *list, const char *recipe_id, const char *name, float value, const char *comment)
void xsh_parameters_ron_create(const char *recipe_id, cpl_parameterlist *list, xsh_ron_param p)
create the RON determination parameters in a parameters list
static cpl_error_code xsh_params_sky_bspline_check(cpl_parameterlist *parameters, const char *rec_id, const int biny)
void xsh_parameters_subtract_sky_single_create(const char *recipe_id, cpl_parameterlist *plist, xsh_subtract_sky_single_param p)
cpl_error_code xsh_parameters_decode_bp_set(const char *rec_id, cpl_parameterlist *parameters, const int ival)
static cpl_error_code xsh_params_localizeifu_check(cpl_parameterlist *parameters, const char *rec_id)
double xsh_parameters_subtract_sky_single_get_kappa(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_geom_ifu_mode_create(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_pre_overscan(const char *recipe_id, cpl_parameterlist *plist)
int xsh_parameters_subtract_sky_single_get_true(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_new_boolean(cpl_parameterlist *list, const char *recipe_id, const char *name, int value, const char *comment)
static void xsh_parameters_new_bool(cpl_parameterlist *list, const char *recipe_id, const char *name, bool value, const char *comment)
void xsh_parameters_wavecal_s_n_create(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_clipping_detect_arclines_create(const char *recipe_id, cpl_parameterlist *list, xsh_clipping_param p)
Create the arclines clipping parameters in a parameters list.
void xsh_parameters_stack_create(const char *recipe_id, cpl_parameterlist *list, xsh_stack_param sp)
create the RON determination parameters in a parameters list
int xsh_parameters_get_boolean(const cpl_parameterlist *list, const char *recipe_id, const char *name)
static cpl_error_code xsh_params_stacking_check(cpl_parameterlist *parameters, const char *rec_id)
void xsh_parameters_clipping_tilt_create(const char *recipe_id, cpl_parameterlist *list)
create the xsh_wavecal (function follow_arclines) clipping parameters in a parameters list
xsh_stack_param * xsh_stack_frames_get(const char *recipe_id, cpl_parameterlist *list)
get the detect arclines parameters in a parameters list
static cpl_error_code xsh_params_background_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey, const int norder)
double xsh_parameters_get_double(const cpl_parameterlist *list, const char *recipe_id, const char *name)
static cpl_error_code xsh_parameter_check_int(cpl_parameterlist *parameters, const char *rec_id, const char *pname, const int min, const int max, const int skip_val, const char *spec)
cpl_error_code xsh_parameters_decode_bp(const char *recipe_id, cpl_parameterlist *plist, const int ival)
static cpl_error_code xsh_params_extract_mask_size_check(cpl_parameterlist *parameters, const char *rec_id)
xsh_slit_limit_param * xsh_parameters_slit_limit_get(const char *recipe_id, cpl_parameterlist *list)
int xsh_parameters_geom_ifu_mode_get(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_combine_nod_create(const char *recipe_id, cpl_parameterlist *list, xsh_combine_nod_param p)
create the crh clipping parameters in a parameters list
static void xsh_parameters_new_range_double(cpl_parameterlist *list, const char *recipe_id, const char *name, double def, double min, double max, const char *comment)
void xsh_parameters_hot_cold_pix_create(const char *recipe_id, cpl_parameterlist *list, xsh_hot_cold_pix_param p)
create the crh clipping parameters in a parameters list
xsh_localize_obj_param * xsh_parameters_localize_obj_get(const char *recipe_id, cpl_parameterlist *list)
xsh_clipping_param * xsh_parameters_clipping_tilt_get(const char *recipe_id, cpl_parameterlist *list)
get the xsh_wavecal (follow_arclines) clipping parameters in a parameters list
void xsh_parameters_wavecal_range_create(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_new_double(cpl_parameterlist *list, const char *recipe_id, const char *name, double value, const char *comment)
int xsh_parameters_subtract_sky_single_get_second(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_localize_obj_create(const char *recipe_id, cpl_parameterlist *plist, xsh_localize_obj_param p)
static cpl_error_code xsh_params_detect_continuum_check(cpl_parameterlist *parameters, const char *rec_id)
void xsh_parameters_localize_ifu_create(const char *recipe_id, cpl_parameterlist *plist, xsh_localize_ifu_param p)
static cpl_error_code xsh_params_compute_fpn_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey)
static cpl_error_code xsh_parameter_check_double(cpl_parameterlist *parameters, const char *rec_id, const char *pname, const double min, const double max, const double skip_val, const char *spec)
void xsh_parameters_clipping_crh_create(const char *recipe_id, cpl_parameterlist *list, xsh_clipping_param p)
create the crh clipping parameters in a parameters list
static cpl_error_code xsh_params_optextract_check(cpl_parameterlist *parameters, const char *rec_id, const int sizey)
static cpl_error_code xsh_params_compute_ron_region2_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey)
xsh_extract_param * xsh_parameters_extract_get(const char *recipe_id, cpl_parameterlist *list)
xsh_clipping_param * xsh_parameters_clipping_specres_get(const char *recipe_id, cpl_parameterlist *list)
get the xsh_wavecal (follow_arclines) clipping parameters in a parameters list
void xsh_parameters_merge_ord_create(const char *recipe_id, cpl_parameterlist *plist, int p)
void xsh_parameters_slit_limit_create(const char *recipe_id, cpl_parameterlist *list, xsh_slit_limit_param p)
static cpl_error_code xsh_params_dispersol_check(cpl_parameterlist *parameters, const char *rec_id)
xsh_detect_arclines_param * xsh_parameters_detect_arclines_get(const char *recipe_id, cpl_parameterlist *list)
get the detect arclines parameters in a parameters list
void xsh_parameters_clipping_noise_create(const char *recipe_id, cpl_parameterlist *list, xsh_clipping_param noise_param)
create the crh noise clipping parameters in a parameters list
xsh_interpolate_bp_param * xsh_parameters_interpolate_bp_get(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_d2_detect_order_create(const char *recipe_id, cpl_parameterlist *list)
Create the d2 detect order parameters in a parameters list.
double xsh_parameters_optimal_extract_get_kappa(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_rectify_create(const char *recipe_id, cpl_parameterlist *plist, xsh_rectify_param p)
void xsh_parameters_ref2_create(const char *recipe_id, cpl_parameterlist *list, xsh_ref_param p)
create the reference region definition parameters in a parameters list
void xsh_parameters_background_create(const char *recipe_id, cpl_parameterlist *list)
create the subtract background parameters in a parameters list
static cpl_error_code xsh_params_detectorder_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey, const int norders)
void xsh_parameters_fpn_create(const char *recipe_id, cpl_parameterlist *list, xsh_fpn_param p)
create the FPN parameters in a parameters list
xsh_clipping_param * xsh_parameters_clipping_dcn_get(const char *recipe_id, cpl_parameterlist *list)
Get the detectcontinuum clipping parameters in a parameters list.
void xsh_parameters_dispersol_create(const char *recipe_id, cpl_parameterlist *list, xsh_dispersol_param p)
Create the dispersol compute parameters in a parameters list.
static cpl_error_code xsh_params_stack_check(cpl_parameterlist *parameters, const char *rec_id)
static cpl_error_code xsh_params_compute_ron_region1_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey)
xsh_opt_extract_param * xsh_parameters_opt_extract_get(const char *recipe_id, cpl_parameterlist *list)
Get the optimal extraction parameters in a parameters list.
static cpl_error_code xsh_params_model_anneal_check(cpl_parameterlist *parameters, const char *rec_id)
void xsh_parameters_interpolate_bp_create(const char *recipe_id, cpl_parameterlist *plist, xsh_interpolate_bp_param p)
static cpl_error_code xsh_params_overscan_nir_check(cpl_parameterlist *parameters, const char *rec_id)
static cpl_error_code xsh_params_spec_res_check(cpl_parameterlist *parameters, const char *rec_id)
void xsh_parameters_extract_create(const char *recipe_id, cpl_parameterlist *plist, xsh_extract_param p, enum extract_method method)
void xsh_parameters_ron_dark_create(const char *recipe_id, cpl_parameterlist *list, xsh_ron_dark_param p)
create the RON determination parameters in a parameters list
int xsh_parameters_debug_level_get(const char *recipe_id, const cpl_parameterlist *list)
static cpl_error_code xsh_params_compute_ron_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey)
void xsh_parameters_ref1_create(const char *recipe_id, cpl_parameterlist *list, xsh_ref_param p)
create the reference region definition parameters in a parameters list
xsh_bary_corr_param * xsh_parameters_bary_corr_get(const char *recipe_id, cpl_parameterlist *list)
get the barycentric correction parameters in a parameters list
xsh_rectify_param * xsh_parameters_rectify_get(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_use_model_create(const char *recipe_id, cpl_parameterlist *plist)
void xsh_parameters_bary_corr_create(const char *recipe_id, cpl_parameterlist *list, xsh_bary_corr_param p)
create the barycentric correction parameters in a parameters list
static cpl_error_code xsh_params_compute_ron_mbias_set3_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey)
static const XSH_KERNEL_TYPE xsh_ker_type[]
static cpl_error_code xsh_params_crhsingle_check(cpl_parameterlist *parameters, const char *rec_id)
void xsh_parameters_pd_noise_create(const char *recipe_id, cpl_parameterlist *list, xsh_pd_noise_param p)
create the FPN parameters in a parameters list
static cpl_error_code xsh_params_detect_arclines_check(cpl_parameterlist *parameters, const char *rec_id)
char * xsh_parameters_test_mode_get(const char *recipe_id, const cpl_parameterlist *list)
static cpl_error_code xsh_params_overscan_check(cpl_parameterlist *parameters, const char *rec_id)
xsh_clipping_param * xsh_parameters_clipping_detect_arclines_get(const char *recipe_id, cpl_parameterlist *list)
Get the arclines clipping parameters in a parameters list.
cpl_error_code xsh_recipe_params_drs_check(cpl_parameterlist *parameters, xsh_instrument *instrument, const char *rec_id)
void xsh_parameters_remove_crh_single_create(const char *recipe_id, cpl_parameterlist *plist, xsh_remove_crh_single_param p)
int xsh_parameters_subtract_sky_single_get_niter(const char *recipe_id, cpl_parameterlist *list)
int xsh_parameters_wavecal_range_get(const char *recipe_id, cpl_parameterlist *list)
int xsh_parameters_wavecal_margin_get(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_clipping_specres_create(const char *recipe_id, cpl_parameterlist *list)
create the xsh_wavecal (function follow_arclines) clipping parameters in a parameters list
int xsh_parameters_cut_uvb_spectrum_get(const char *recipe_id, const cpl_parameterlist *list)
static cpl_error_code xsh_params_compute_ron_mdark_check(cpl_parameterlist *parameters, const char *rec_id, const int sizex, const int sizey)
xsh_remove_crh_single_param * xsh_parameters_remove_crh_single_get(const char *recipe_id, cpl_parameterlist *list)
int xsh_parameters_get_int(const cpl_parameterlist *list, const char *recipe_id, const char *name)
static cpl_error_code xsh_params_correctifu_check(cpl_parameterlist *parameters, const char *rec_id)
xsh_localize_ifu_param * xsh_parameters_localize_ifu_get(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_struct_create(const char *recipe_id, cpl_parameterlist *list, xsh_struct_param p)
create the structX/Y region definition parameters in a parameters list
xsh_clipping_param * xsh_parameters_clipping_noise_get(const char *recipe_id, cpl_parameterlist *list)
get the noise clipping parameters in a parameters list
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
xsh_combine_nod_param * xsh_parameters_combine_nod_get(const char *recipe_id, cpl_parameterlist *list)
get the combine nod parameters in a parameters list
static cpl_error_code xsh_params_rectify_check(cpl_parameterlist *parameters, const char *rec_id)
xsh_clipping_param * xsh_parameters_clipping_crh_get(const char *recipe_id, cpl_parameterlist *list)
get the crh clipping parameters in a parameters list
xsh_subtract_sky_single_param * xsh_parameters_subtract_sky_single_get(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_optimal_extract_create(const char *recipe_id, cpl_parameterlist *plist, int p)
cpl_parameterlist * xsh_parameters_create_from_drs_table(const cpl_table *tab)
void xsh_parameters_generic(const char *recipe_id, cpl_parameterlist *plist)
static void set_rectify_kernel_type(xsh_rectify_param *recpar)
void xsh_parameters_detect_arclines_create(const char *recipe_id, cpl_parameterlist *list, xsh_detect_arclines_param p)
create the detect arclines parameters in a parameters list
static void xsh_parameters_new_range_int(cpl_parameterlist *list, const char *recipe_id, const char *name, int def, int min, int max, const char *comment)
cpl_error_code xsh_recipe_params_check(cpl_parameterlist *parameters, xsh_instrument *instrument, const char *rec_id)
int xsh_parameters_subtract_sky_single_get_first(const char *recipe_id, cpl_parameterlist *list)
void xsh_parameters_new_string(cpl_parameterlist *list, const char *recipe_id, const char *name, const char *value, const char *comment)
void xsh_parameters_new_int(cpl_parameterlist *list, const char *recipe_id, const char *name, int value, const char *comment)
xsh_detect_order_param * xsh_parameters_detect_order_get(const char *recipe_id, cpl_parameterlist *list, cpl_parameterlist *drs)
Get the detect orders parameters in a parameters list.
void xsh_parameters_dosky_domap_get(const char *recipe_id, cpl_parameterlist *list, cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, int *dosky, int *domap)
xsh_d2_detect_order_param * xsh_parameters_d2_detect_order_get(const char *recipe_id, cpl_parameterlist *list)
Get the d2 detect orders parameters in a parameters list.
xsh_compute_response_param * xsh_parameters_compute_response_get(const char *recipe_id, cpl_parameterlist *list)
int xsh_parameters_use_model_get(const char *recipe_id, const cpl_parameterlist *plist)
xsh_merge_param * xsh_parameters_merge_ord_get(const char *recipe_id, cpl_parameterlist *list)
static cpl_error_code xsh_params_noise_clip_check(cpl_parameterlist *parameters, const char *rec_id)
xsh_dispersol_param * xsh_parameters_dispersol_get(const char *recipe_id, cpl_parameterlist *list)
Get the dispersion solution compute parameters in a parameters list.
void xsh_parameters_compute_response_create(const char *recipe_id, cpl_parameterlist *plist, xsh_compute_response_param p)
void xsh_parameters_detect_order_create(const char *recipe_id, cpl_parameterlist *list)
Create the detect order parameters in a parameters list.
xsh_background_param * xsh_parameters_background_get(const char *recipe_id, cpl_parameterlist *list)
get the background parameters in a parameters list
void xsh_parameters_opt_extract_create(const char *recipe_id, cpl_parameterlist *list, xsh_opt_extract_param p)
Create the optimal extraction parameters in a parameters list.
void xsh_parameters_clipping_dcn_create(const char *recipe_id, cpl_parameterlist *list)
create the DetectContiNuum clipping parameters in a parameters list
void xsh_parameters_wavecal_margin_create(const char *recipe_id, cpl_parameterlist *list)
char * xsh_parameters_get_string(const cpl_parameterlist *list, const char *recipe_id, const char *name)
static cpl_error_code xsh_params_tilt_clip_check(cpl_parameterlist *parameters, const char *rec_id)
static cpl_error_code xsh_params_follow_arclines_check(cpl_parameterlist *parameters, const char *rec_id)
static cpl_error_code xsh_params_crhclip_check(cpl_parameterlist *parameters, const char *rec_id)
#define LOCALIZE_METHOD_PRINT(method)
#define SKY_METHOD_PRINT(method)
#define DECODE_BP_FLAG_DEF
#define EXTRACT_METHOD_PRINT(method)
#define OPTEXTRACT_METHOD_PRINT(method)
#define WAVECAL_MARGIN_DEFAULT
#define DECODE_BP_FLAG_MAX
#define COMBINE_METHOD_PRINT(method)
#define BARY_CORR_METHOD_PRINT(corr_method)
#define WAVECAL_RANGE_DEFAULT
#define BSPLINE_SAMPLING_PRINT(method)
#define XSH_FREE(POINTER)
#define XSH_MALLOC(POINTER, TYPE, SIZE)