CR2RE Pipeline Reference Manual 1.6.2
cr2res_dfs.c
1/*
2 * This file is part of the CR2RES Pipeline
3 * Copyright (C) 2002,2003 European Southern Observatory
4 *
5 * This program 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, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18 */
19
20#ifdef HAVE_CONFIG_H
21#include <config.h>
22#endif
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <locale.h>
29#include <string.h>
30#include <math.h>
31
32#include <cpl.h>
33
34#include "cr2res_dfs.h"
35#include "cr2res_io.h"
36#include "cr2res_utils.h"
37
38/*----------------------------------------------------------------------------*/
42/*----------------------------------------------------------------------------*/
43
46/*----------------------------------------------------------------------------*/
52/*----------------------------------------------------------------------------*/
53cpl_error_code cr2res_dfs_set_groups(cpl_frameset * set)
54{
55
56 int nframes, i ;
57
58 /* Check entries */
59 if (set == NULL) return CPL_ERROR_NULL_INPUT ;
60
61 /* Initialize */
62 nframes = cpl_frameset_get_size(set) ;
63
64 /* Loop on frames */
65 for (i = 0 ; i < nframes ; i++) {
66 cpl_frame *frame;
67 const char *tag;
68 frame = cpl_frameset_get_position(set, i);
69 tag = cpl_frame_get_tag(frame);
70
71 if (tag == NULL) {
72 cpl_msg_warning(cpl_func, "Frame %d has no tag", i);
73 /* DO.CATG Tags for the RAW files */
74 } else if (!strcmp(tag, CR2RES_DETLIN_DARK_RAW) ||
75 !strcmp(tag, CR2RES_DETLIN_LAMP_RAW) ||
76 !strcmp(tag, CR2RES_DARK_RAW) ||
77 !strcmp(tag, CR2RES_FLAT_RAW) ||
78 !strcmp(tag, CR2RES_WAVE_UNE_RAW) ||
79 !strcmp(tag, CR2RES_WAVE_FPET_RAW) ||
80 !strcmp(tag, CR2RES_METROLOGY_RAW) ||
81 !strcmp(tag, CR2RES_CAL_NODDING_OTHER_RAW) ||
82 !strcmp(tag, CR2RES_CAL_NODDING_JITTER_RAW) ||
83 !strcmp(tag, CR2RES_OBS_NODDING_OTHER_RAW) ||
84 !strcmp(tag, CR2RES_OBS_NODDING_JITTER_RAW) ||
85 !strcmp(tag, CR2RES_OBS_ASTROMETRY_OTHER_RAW) ||
86 !strcmp(tag, CR2RES_OBS_ASTROMETRY_JITTER_RAW) ||
87 !strcmp(tag, CR2RES_OBS_STARING_OTHER_RAW) ||
88 !strcmp(tag, CR2RES_OBS_STARING_JITTER_RAW) ||
89 !strcmp(tag, CR2RES_OBS_STARING_WAVE_SKY_RAW) ||
90 !strcmp(tag, CR2RES_OBS_POLARIMETRY_OTHER_RAW) ||
91 !strcmp(tag, CR2RES_OBS_2D_OBJECT_RAW) ||
92 !strcmp(tag, CR2RES_OBS_2D_SKY_RAW) ||
93 /* PRO.TYPE tags that can be used as input RAWs */
94 /* For cr2res_util_bpm_split */
95 !strcmp(tag, CR2RES_BPM_DRSTYPE) ||
96 /* For cr2res_util_extract */
97 /* For cr2res_util_trace */
98 /* For cr2res_util_normflat */
99 !strcmp(tag, CR2RES_CALIBRATED_DRSTYPE) ||
100 /* For cr2res_util_wave */
101 !strcmp(tag, CR2RES_EXTRACT_1D_DRSTYPE) ||
102 /* For cr2res_util_slit_curv */
103 /* cr2res_util_trace_map */
104 !strcmp(tag, CR2RES_TW_DRSTYPE)) {
105 /* RAW frames */
106 cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
107 } else if (!strcmp(tag, CR2RES_EMISSION_LINES_TXT_RAW) ||
108 !strcmp(tag, CR2RES_LINES_SELECTION_TXT_RAW) ||
109 !strcmp(tag, CR2RES_PHOTO_FLUX_TXT_RAW) ||
110 /* PIPE-11223 _TXT_RAW files must be declared as CALIB */
111 /* RAW need to refer to archive files, TXT files are not */
112 /* Produced by cr2res_cal_detlin */
113 !strcmp(tag, CR2RES_CAL_DETLIN_COEFFS_PROCATG) ||
114 !strcmp(tag, CR2RES_CAL_DETLIN_BPM_PROCATG) ||
115 /* Produced by cr2res_cal_dark */
116 !strcmp(tag, CR2RES_CAL_DARK_MASTER_PROCATG) ||
117 !strcmp(tag, CR2RES_CAL_DARK_BPM_PROCATG) ||
118 /* Produced by cr2res_cal_flat */
119 !strcmp(tag, CR2RES_CAL_FLAT_BPM_PROCATG) ||
120 !strcmp(tag, CR2RES_CAL_FLAT_EXTRACT_1D_PROCATG) ||
121 !strcmp(tag, CR2RES_CAL_FLAT_SLIT_MODEL_PROCATG) ||
122 !strcmp(tag, CR2RES_CAL_FLAT_SLIT_FUNC_PROCATG) ||
123 !strcmp(tag, CR2RES_CAL_FLAT_TW_PROCATG) ||
124 !strcmp(tag, CR2RES_CAL_FLAT_TW_MERGED_PROCATG) ||
125 !strcmp(tag, CR2RES_CAL_FLAT_MASTER_PROCATG) ||
126 /* Produced by cr2res_cal_wave */
127 !strcmp(tag, CR2RES_CAL_WAVE_TW_PROCATG) ||
128 !strcmp(tag, CR2RES_CAL_WAVE_MAP_PROCATG) ||
129 !strcmp(tag, CR2RES_CAL_WAVE_LINES_DIAGNOSTICS_PROCATG) ||
130 !strcmp(tag, CR2RES_CAL_WAVE_EXTRACT_1D_PROCATG) ||
131 /* Produced by cr2res_obs_nodding */
132 !strcmp(tag, CR2RES_OBS_NODDING_EXTRACTA_PROCATG) ||
133 !strcmp(tag, CR2RES_OBS_NODDING_COMBINEDA_PROCATG) ||
134 !strcmp(tag, CR2RES_OBS_NODDING_SLITFUNCA_PROCATG) ||
135 !strcmp(tag, CR2RES_OBS_NODDING_SLITMODELA_PROCATG) ||
136 !strcmp(tag, CR2RES_OBS_NODDING_TWA_PROCATG) ||
137 !strcmp(tag, CR2RES_OBS_NODDING_EXTRACTB_PROCATG) ||
138 !strcmp(tag, CR2RES_OBS_NODDING_COMBINEDB_PROCATG) ||
139 !strcmp(tag, CR2RES_OBS_NODDING_SLITFUNCB_PROCATG) ||
140 !strcmp(tag, CR2RES_OBS_NODDING_SLITMODELB_PROCATG) ||
141 !strcmp(tag, CR2RES_OBS_NODDING_TWB_PROCATG) ||
142 !strcmp(tag, CR2RES_OBS_NODDING_EXTRACTC_PROCATG) ||
143 !strcmp(tag, CR2RES_OBS_NODDING_THROUGHPUT_PROCATG) ||
144 /* Produced by cr2res_obs_staring */
145 !strcmp(tag, CR2RES_OBS_STARING_COMBINED_PROCATG) ||
146 !strcmp(tag, CR2RES_OBS_STARING_EXTRACT_PROCATG) ||
147 !strcmp(tag, CR2RES_OBS_STARING_SLITFUNC_PROCATG) ||
148 !strcmp(tag, CR2RES_OBS_STARING_SLITMODEL_PROCATG) ||
149 /* Produced by cr2res_obs_2d */
150 !strcmp(tag, CR2RES_OBS_2D_EXTRACT_PROCATG) ||
151 !strcmp(tag, CR2RES_OBS_2D_CALIBRATED_PROCATG) ||
152 /* Produced by cr2res_obs_pol */
153 !strcmp(tag, CR2RES_OBS_POL_EXTRACTA_PROCATG) ||
154 !strcmp(tag, CR2RES_OBS_POL_TWA_PROCATG) ||
155 !strcmp(tag, CR2RES_OBS_POL_SPECA_PROCATG) ||
156 !strcmp(tag, CR2RES_OBS_POL_EXTRACTB_PROCATG) ||
157 !strcmp(tag, CR2RES_OBS_POL_TWB_PROCATG) ||
158 !strcmp(tag, CR2RES_OBS_POL_SPECB_PROCATG) ||
159 !strcmp(tag, CR2RES_OBS_POL_CALIB_A_PROCATG) ||
160 !strcmp(tag, CR2RES_OBS_POL_CALIB_B_PROCATG) ||
161 /* Produced by cr2res_util_genlines */
162 !strcmp(tag, CR2RES_EMISSION_LINES_PROCATG) ||
163 /* Produced by cr2res_util_genstd */
164 !strcmp(tag, CR2RES_PHOTO_FLUX_PROCATG) ||
165 /* Produced by cr2res_util_calib */
166 !strcmp(tag, CR2RES_UTIL_CALIB_PROCATG) ||
167 /* Produced by cr2res_util_bpm_merge */
168 !strcmp(tag, CR2RES_UTIL_BPM_MERGE_PROCATG) ||
169 /* Produced by cr2res_util_bpm_split */
170 !strcmp(tag, CR2RES_UTIL_BPM_SPLIT_PROCATG) ||
171 /* Produced by cr2res_util_trace */
172 !strcmp(tag, CR2RES_UTIL_TRACE_TW_PROCATG) ||
173 /* Produced by cr2res_util_extract */
174 !strcmp(tag, CR2RES_UTIL_SLIT_FUNC_PROCATG) ||
175 !strcmp(tag, CR2RES_UTIL_SLIT_MODEL_PROCATG) ||
176 !strcmp(tag, CR2RES_UTIL_EXTRACT_1D_PROCATG) ||
177 /* Produced by cr2res_util_normflat */
178 !strcmp(tag, CR2RES_UTIL_MASTER_FLAT_PROCATG) ||
179 !strcmp(tag, CR2RES_UTIL_NORM_BPM_PROCATG) ||
180 /* Produced by cr2res_util_slit_curv */
181 !strcmp(tag, CR2RES_UTIL_SLIT_CURV_MAP_PROCATG) ||
182 !strcmp(tag, CR2RES_UTIL_SLIT_CURV_TW_PROCATG) ||
183 /* Produced by cr2res_util_wave */
184 !strcmp(tag, CR2RES_UTIL_WAVE_TW_PROCATG) ||
185 !strcmp(tag, CR2RES_UTIL_WAVE_MAP_PROCATG) ||
186 !strcmp(tag, CR2RES_UTIL_WAVE_LINES_DIAGNOSTICS_PROCATG) ||
187 !strcmp(tag, CR2RES_UTIL_WAVE_EXTRACT_1D_PROCATG) ||
188 /* Produced by cr2res_util_trace_maps */
189 !strcmp(tag, CR2RES_UTIL_TRACE_MAP_SLIT_CURVE_PROCATG) ||
190 !strcmp(tag, CR2RES_UTIL_TRACE_MAP_WL_PROCATG) ||
191 !strcmp(tag, CR2RES_UTIL_TRACE_MAP_TRACE_PROCATG) ||
192 /* Produced by cr2res_util_splice */
193 !strcmp(tag, CR2RES_UTIL_SPLICE_SPLICED_1D_PROCATG)) {
194 /* CALIB frames */
195 cpl_frame_set_group(frame, CPL_FRAME_GROUP_CALIB);
196 }
197 }
198 return CPL_ERROR_NONE;
199}
200
201/*----------------------------------------------------------------------------*/
208/*----------------------------------------------------------------------------*/
210{
211 int order_idxp ;
212 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
213 return NULL ;
214 return cpl_sprintf("%02d_%s", order_idxp, CR2RES_COL_WL_SUFFIX) ;
215}
216
217/*----------------------------------------------------------------------------*/
224/*----------------------------------------------------------------------------*/
225char * cr2res_dfs_POL_STOKES_colname(int order_idx)
226{
227 int order_idxp ;
228 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
229 return NULL ;
230 return cpl_sprintf("%02d_%s", order_idxp, CR2RES_COL_POL_STOKES_SUFFIX) ;
231}
232
233/*----------------------------------------------------------------------------*/
240/*----------------------------------------------------------------------------*/
242{
243 int order_idxp ;
244 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
245 return NULL ;
246 return cpl_sprintf("%02d_%s", order_idxp,
247 CR2RES_COL_POL_STOKES_ERROR_SUFFIX) ;
248}
249
250/*----------------------------------------------------------------------------*/
257/*----------------------------------------------------------------------------*/
258char * cr2res_dfs_POL_NULL_colname(int order_idx)
259{
260 int order_idxp ;
261 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
262 return NULL ;
263 return cpl_sprintf("%02d_%s", order_idxp, CR2RES_COL_POL_NULL_SUFFIX) ;
264}
265
266/*----------------------------------------------------------------------------*/
273/*----------------------------------------------------------------------------*/
275{
276 int order_idxp ;
277 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
278 return NULL ;
279 return cpl_sprintf("%02d_%s", order_idxp, CR2RES_COL_POL_NULL_ERROR_SUFFIX) ;
280}
281
282/*----------------------------------------------------------------------------*/
289/*----------------------------------------------------------------------------*/
290char * cr2res_dfs_POL_INTENS_colname(int order_idx)
291{
292 int order_idxp ;
293 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
294 return NULL ;
295 return cpl_sprintf("%02d_%s", order_idxp, CR2RES_COL_POL_INTENS_SUFFIX) ;
296}
297
298/*----------------------------------------------------------------------------*/
305/*----------------------------------------------------------------------------*/
307{
308 int order_idxp ;
309 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
310 return NULL ;
311 return cpl_sprintf("%02d_%s", order_idxp,
312 CR2RES_COL_POL_INTENS_ERROR_SUFFIX) ;
313}
314
315/*----------------------------------------------------------------------------*/
323/*----------------------------------------------------------------------------*/
324char * cr2res_dfs_CONVERSION_colname(int order_idx, int trace)
325{
326 int order_idxp ;
327 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
328 return NULL ;
329 return cpl_sprintf("%02d_%02d_%s", order_idxp, trace,
330 CR2RES_COL_CONVERSION_SUFFIX);
331}
332
333/*----------------------------------------------------------------------------*/
341/*----------------------------------------------------------------------------*/
342char * cr2res_dfs_SENSITIVITY_colname(int order_idx, int trace)
343{
344 int order_idxp ;
345 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
346 return NULL ;
347 return cpl_sprintf("%02d_%02d_%s", order_idxp, trace,
348 CR2RES_COL_SENSITIVITY_SUFFIX);
349}
350
351/*----------------------------------------------------------------------------*/
359/*----------------------------------------------------------------------------*/
360char * cr2res_dfs_THROUGHPUT_colname(int order_idx, int trace)
361{
362 int order_idxp ;
363 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
364 return NULL ;
365 return cpl_sprintf("%02d_%02d_%s", order_idxp, trace,
366 CR2RES_COL_THROUGHPUT_SUFFIX);
367}
368
369/*----------------------------------------------------------------------------*/
377/*----------------------------------------------------------------------------*/
378char * cr2res_dfs_SPEC_colname(int order_idx, int trace)
379{
380 int order_idxp ;
381 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
382 return NULL ;
383 return cpl_sprintf("%02d_%02d_%s", order_idxp, trace,
384 CR2RES_COL_SPEC_SUFFIX);
385}
386
387/*----------------------------------------------------------------------------*/
395/*----------------------------------------------------------------------------*/
396char * cr2res_dfs_WAVELENGTH_colname(int order_idx, int trace)
397{
398 int order_idxp ;
399 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
400 return NULL ;
401 return cpl_sprintf("%02d_%02d_%s", order_idxp, trace,
402 CR2RES_COL_WL_SUFFIX);
403}
404
405/*----------------------------------------------------------------------------*/
413/*----------------------------------------------------------------------------*/
414char * cr2res_dfs_SPEC_ERR_colname(int order_idx, int trace)
415{
416 int order_idxp ;
417 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
418 return NULL ;
419 return cpl_sprintf("%02d_%02d_%s", order_idxp, trace,
420 CR2RES_COL_ERROR_SUFFIX);
421}
422
423/*----------------------------------------------------------------------------*/
431/*----------------------------------------------------------------------------*/
432char * cr2res_dfs_SLIT_FUNC_colname(int order_idx, int trace)
433{
434 int order_idxp ;
435 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
436 return NULL ;
437 return cpl_sprintf("%02d_%02d_%s", order_idxp,trace,
438 CR2RES_COL_SLIT_FUNC_SUFFIX);
439}
440
441/*----------------------------------------------------------------------------*/
449/*----------------------------------------------------------------------------*/
450char * cr2res_dfs_POSITIONX_colname(int order_idx, int trace)
451{
452 int order_idxp ;
453 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
454 return NULL ;
455 return cpl_sprintf("%02d_%02d_%s", order_idxp,trace,
456 CR2RES_COL_POSITIONX_SUFFIX);
457}
458
459/*----------------------------------------------------------------------------*/
467/*----------------------------------------------------------------------------*/
468char * cr2res_dfs_POSITIONY_colname(int order_idx, int trace)
469{
470 int order_idxp ;
471 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
472 return NULL ;
473 return cpl_sprintf("%02d_%02d_%s", order_idxp,trace,
474 CR2RES_COL_POSITIONY_SUFFIX);
475}
476
477/*----------------------------------------------------------------------------*/
485/*----------------------------------------------------------------------------*/
486char * cr2res_dfs_SLIT_FRACTION_colname(int order_idx, int trace)
487{
488 int order_idxp ;
489 if ((order_idxp = cr2res_io_convert_order_idx_to_idxp(order_idx)) < 0)
490 return NULL ;
491 return cpl_sprintf("%02d_%02d_%s", order_idxp,trace,
492 CR2RES_COL_SLIT_FRACTION_SUFFIX);
493}
494
495/*----------------------------------------------------------------------------*/
504/*----------------------------------------------------------------------------*/
506 const char * colname,
507 int * order_idx,
508 int * trace)
509{
510 char col_type[1024] ;
511 if (colname == NULL || order_idx == NULL || trace == NULL) return NULL ;
512
513 /* Needed for sscanf() */
514 setlocale(LC_NUMERIC, "C");
515
516 if (sscanf(colname, "%02d_%02d_%s", order_idx, trace, col_type) != 3)
517 return NULL ;
518 return cpl_strdup(col_type) ;
519}
520
521/*----------------------------------------------------------------------------*/
530/*----------------------------------------------------------------------------*/
532 const char * colname,
533 int * order_idx)
534{
535 char col_type[1024] ;
536 if (colname == NULL || order_idx == NULL) return NULL ;
537
538 /* Needed for sscanf() */
539 setlocale(LC_NUMERIC, "C");
540
541 if (sscanf(colname, "%02d_%s", order_idx, col_type) != 2)
542 return NULL ;
543 return cpl_strdup(col_type) ;
544}
545
546/*----------------------------------------------------------------------------*/
552/*----------------------------------------------------------------------------*/
554{
555 cpl_table * out ;
556
557 /* Check entries */
558 if (nrows < 1) return NULL;
559
560 out = cpl_table_new(nrows) ;
561
562 cpl_table_new_column(out, CR2RES_COL_ORDER, CPL_TYPE_INT) ;
563 cpl_table_new_column(out, CR2RES_COL_TRACENB, CPL_TYPE_INT);
564 cpl_table_new_column(out, CR2RES_COL_MEASURED_LAMBDA, CPL_TYPE_DOUBLE);
565 cpl_table_new_column(out, CR2RES_COL_CATALOG_LAMBDA, CPL_TYPE_DOUBLE);
566 cpl_table_new_column(out, CR2RES_COL_DELTA_LAMBDA, CPL_TYPE_DOUBLE);
567 cpl_table_new_column(out, CR2RES_COL_MEASURED_PIXEL, CPL_TYPE_DOUBLE);
568 cpl_table_new_column(out, CR2RES_COL_LINE_WIDTH, CPL_TYPE_DOUBLE);
569 cpl_table_new_column(out, CR2RES_COL_FIT_QUALITY, CPL_TYPE_DOUBLE);
570 cpl_table_new_column(out, CR2RES_COL_INTENSITY, CPL_TYPE_DOUBLE);
571 cpl_table_new_column(out, CR2RES_COL_FPET_M, CPL_TYPE_DOUBLE);
572 return out ;
573}
574/*----------------------------------------------------------------------------*/
580/*----------------------------------------------------------------------------*/
581int cr2res_dfs_check_traces_table(const cpl_table * traces)
582{
583 /* Check entries */
584 if (traces == NULL) return -1 ;
585
586 /* Check completeness */
587 if (!cpl_table_has_column(traces, CR2RES_COL_UPPER) ||
588 !cpl_table_has_column(traces, CR2RES_COL_LOWER) ||
589 !cpl_table_has_column(traces, CR2RES_COL_ALL) ||
590 !cpl_table_has_column(traces, CR2RES_COL_WAVELENGTH) ||
591 !cpl_table_has_column(traces, CR2RES_COL_WAVELENGTH_ERROR) ||
592 !cpl_table_has_column(traces, CR2RES_COL_ORDER) ||
593 !cpl_table_has_column(traces, CR2RES_COL_TRACENB) ||
594 !cpl_table_has_column(traces, CR2RES_COL_SLIT_CURV_A) ||
595 !cpl_table_has_column(traces, CR2RES_COL_SLIT_CURV_B) ||
596 !cpl_table_has_column(traces, CR2RES_COL_SLIT_CURV_C) ||
597 !cpl_table_has_column(traces, CR2RES_COL_SLIT_FRACTION)) {
598 return 0 ;
599 }
600 return 1 ;
601}
602
char * cr2res_dfs_POL_colname_parse(const char *colname, int *order_idx)
Parse a column name ORDER_TYPE format.
Definition: cr2res_dfs.c:531
char * cr2res_dfs_SLIT_FUNC_colname(int order_idx, int trace)
Get the SLIT_FUNC table column name for a given order/trace.
Definition: cr2res_dfs.c:432
char * cr2res_dfs_POL_NULL_colname(int order_idx)
Get the POL_NULL column name for a given order.
Definition: cr2res_dfs.c:258
char * cr2res_dfs_POL_STOKES_ERROR_colname(int order_idx)
Get the POL_STOKES_ERROR column name for a given order.
Definition: cr2res_dfs.c:241
char * cr2res_dfs_CONVERSION_colname(int order_idx, int trace)
Get the CONVERSION column name for a given order/trace.
Definition: cr2res_dfs.c:324
char * cr2res_dfs_SPEC_ERR_colname(int order_idx, int trace)
Get the ERR column name for a given order/trace.
Definition: cr2res_dfs.c:414
char * cr2res_dfs_POL_INTENS_ERROR_colname(int order_idx)
Get the POL_INTENS_ERROR column name for a given order.
Definition: cr2res_dfs.c:306
char * cr2res_dfs_SENSITIVITY_colname(int order_idx, int trace)
Get the SENSITIVITY column name for a given order/trace.
Definition: cr2res_dfs.c:342
cpl_error_code cr2res_dfs_set_groups(cpl_frameset *set)
Set the group as RAW or CALIB in a frameset.
Definition: cr2res_dfs.c:53
int cr2res_dfs_check_traces_table(const cpl_table *traces)
Check completeness of trace table.
Definition: cr2res_dfs.c:581
char * cr2res_dfs_WAVELENGTH_colname(int order_idx, int trace)
Get the WAVELENGTH column name for a given order/trace.
Definition: cr2res_dfs.c:396
char * cr2res_dfs_POSITIONY_colname(int order_idx, int trace)
Get the POSITIONY table column name for a given order/trace.
Definition: cr2res_dfs.c:468
char * cr2res_dfs_SLIT_FRACTION_colname(int order_idx, int trace)
Get the SLIT_FRACTION table column name for a given order/trace.
Definition: cr2res_dfs.c:486
char * cr2res_dfs_POL_NULL_ERROR_colname(int order_idx)
Get the POL_NULL_ERROR column name for a given order.
Definition: cr2res_dfs.c:274
char * cr2res_dfs_POL_STOKES_colname(int order_idx)
Get the POL_STOKES column name for a given order.
Definition: cr2res_dfs.c:225
char * cr2res_dfs_SPEC_colname_parse(const char *colname, int *order_idx, int *trace)
Parse a column name ORDER_TRACE_TYPE format.
Definition: cr2res_dfs.c:505
char * cr2res_dfs_THROUGHPUT_colname(int order_idx, int trace)
Get the THROUGHPUT column name for a given order/trace.
Definition: cr2res_dfs.c:360
char * cr2res_dfs_POL_INTENS_colname(int order_idx)
Get the POL_INTENS column name for a given order.
Definition: cr2res_dfs.c:290
char * cr2res_dfs_SPEC_colname(int order_idx, int trace)
Get the SPEC column name for a given order/trace.
Definition: cr2res_dfs.c:378
char * cr2res_dfs_POL_WAVELENGTH_colname(int order_idx)
Get the POL_WAVELENGTH column name for a given order.
Definition: cr2res_dfs.c:209
char * cr2res_dfs_POSITIONX_colname(int order_idx, int trace)
Get the POSITIONX table column name for a given order/trace.
Definition: cr2res_dfs.c:450
cpl_table * cr2res_dfs_create_lines_diagnostics_table(int nrows)
Create an empty LINES DIAGNOSTICS table.
Definition: cr2res_dfs.c:553
int cr2res_io_convert_order_idx_to_idxp(int order_idx)
Convert the order_idx to the order_idxp.
Definition: cr2res_io.c:583