62 cpl_errorstate prestate = cpl_errorstate_get();
63 cpl_frame * frame = NULL;
68 for (frame = cpl_frameset_get_first(
set); frame != NULL;
69 frame = cpl_frameset_get_next(
set), i++) {
71 const char * tag = cpl_frame_get_tag(frame);
74 cpl_msg_warning(cpl_func,
"Frame %d has no tag", i);
75 }
else if (!strcmp(tag, MIDI_HIGH_SENS_CALIB ) ||
76 !strcmp(tag, MIDI_HIGH_SENS_SCIENCE ) ||
77 !strcmp(tag, MIDI_SCI_PHOT_CALIB ) ||
78 !strcmp(tag, MIDI_SCI_PHOT_SCIENCE ) ||
79 !strcmp(tag, MIDI_KAPPA_SP_CALIB ) ||
80 !strcmp(tag, MIDI_KAPPA_SP_SCIENCE ) ||
81 !strcmp(tag, MIDI_ACQ ) ||
82 !strcmp(tag, MIDI_DETLIN ) ||
83 !strcmp(tag, MIDI_DETRON ) ||
84 !strcmp(tag, MIDI_DSPTRN ) ||
85 !strcmp(tag, MIDI_REFPIX ) ||
86 !strcmp(tag, MIDI_WAVECAL ) ||
87 !strcmp(tag, MIDI_PHOTOM_SP_CALIB ) ||
88 !strcmp(tag, MIDI_PHOTOM_SP_SCIENCE ) ||
89 !strcmp(tag, MIDI_PHOTOM_HS_CALIB ) ||
90 !strcmp(tag, MIDI_PHOTOM_HS_SCIENCE ) ||
91 !strcmp(tag, MIDI_OTHER_DETLIN ) ||
92 !strcmp(tag, MIDI_OTHER_DETRON ) ||
93 !strcmp(tag, MIDI_OTHER_DSPTRN ) ||
94 !strcmp(tag, MIDI_OTHER_GENERIC ) ||
95 !strcmp(tag, MIDI_OTHER_REFPIX ) ||
96 !strcmp(tag, MIDI_OTHER_WAVECAL ) ||
97 !strcmp(tag, MIDI_OTHER_ACQ ) ||
98 !strcmp(tag, MIDI_DOME_AOPEN ) ||
99 !strcmp(tag, MIDI_DOME_BOPEN ) ||
100 !strcmp(tag, MIDI_INTERNAL_OPD ) ||
101 !strcmp(tag, MIDI_CAL_SEARCH ) ||
102 !strcmp(tag, MIDI_OTHER_FRINGE ))
105 cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
106 }
else if (!strcmp(tag, MIDI_CALIB_FLAT) ||
107 !strcmp(tag, MIDI_KAPPA_SP_MASK_PRISM) ||
108 !strcmp(tag, MIDI_KAPPA_SP_MASK_GRISM) ||
109 !strcmp(tag, MIDI_KAPPA_HS_MASK_PRISM) ||
110 !strcmp(tag, MIDI_KAPPA_HS_MASK_GRISM) ||
111 !strcmp(tag, MIDI_KAPPAMATRIX_PRISM) ||
112 !strcmp(tag, MIDI_KAPPAMATRIX_GRISM) ||
113 !strcmp(tag, MIDI_TRF_GRISM) ||
114 !strcmp(tag, MIDI_TRF_PRISM) ||
115 !strcmp(tag, MIDI_CALIB_DATABASE))
118 cpl_frame_set_group(frame, CPL_FRAME_GROUP_CALIB);
129 if (!cpl_errorstate_is_equal(prestate)) {
130 return cpl_error_set_message(cpl_func, cpl_error_get_code(),
131 "Could not identify RAW and CALIB "
135 return CPL_ERROR_NONE;