39#include "eris_utils.h"
59 cpl_errorstate prestate = cpl_errorstate_get();
60 const cpl_size n = cpl_frameset_get_size(self);
64 for (cpl_size i = 0; i < n; i++) {
65 cpl_frame* frame = cpl_frameset_get_position(self, i);
66 const char * tag = cpl_frame_get_tag(frame);
69 cpl_msg_warning(cpl_func,
"Frame %d of %d has no tag",
71 }
else if (!strcmp(tag, ERIS_RECIPE_RAW)
72 || !strcmp(tag,
"OBJECT_CUBE" )) {
74 cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
75 }
else if (!strcmp(tag, ERIS_CALIB_FLAT)) {
77 cpl_frame_set_group(frame, CPL_FRAME_GROUP_CALIB);
78 }
else if (!strcmp(tag, ERIS_RECIPE_CALIB_RAW)) {
80 cpl_frame_set_group(frame, CPL_FRAME_GROUP_CALIB);
84 if (!cpl_errorstate_is_equal(prestate)) {
85 return cpl_error_set_message(cpl_func, cpl_error_get_code(),
86 "Could not identify RAW and CALIB "
90 return CPL_ERROR_NONE;
cpl_error_code eris_dfs_set_groups(cpl_frameset *self)
Set the group as RAW or CALIB in a frameset.
cpl_error_code eris_check_error_code(const char *func_id)
handle CPL errors