00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifdef HAVE_CONFIG_H
00029 #include <config.h>
00030 #endif
00031
00032
00033
00034
00035
00036 #include <string.h>
00037 #include <math.h>
00038
00039 #include "omega_dfs.h"
00040
00041
00044
00050
00051
00052
00058
00059 int oc_dfs_set_groups(cpl_frameset * set)
00060 {
00061 cpl_frame * cur_frame ;
00062 const char * tag ;
00063 int nframes ;
00064 int i ;
00065
00066
00067 if (set == NULL) return -1 ;
00068
00069
00070 nframes = cpl_frameset_get_size(set) ;
00071
00072
00073 for (i=0 ; i<nframes ; i++) {
00074 cur_frame = cpl_frameset_get_frame(set, i) ;
00075 tag = cpl_frame_get_tag(cur_frame) ;
00076
00077
00078 if (!strcmp(tag, DARK_RAW) ||
00079 !strcmp(tag, FRINGES_RAW) ||
00080 !strcmp(tag, GAIN_FLAT) ||
00081 !strcmp(tag, GAIN_DARK) ||
00082 !strcmp(tag, MBIAS_RAW) ||
00083 !strcmp(tag, LIFETEST_RAW) ||
00084 !strcmp(tag, MDOME_RAW) ||
00085 !strcmp(tag, DITHER_RAW) ||
00086 !strcmp(tag, OFFSET_RAW) ||
00087 !strcmp(tag, MTWIL_RAW) ||
00088 !strcmp(tag, RNOISE_RAW) ||
00089 !strcmp(tag, STARE_RAW) ||
00090 !strcmp(tag, JITTER_RAW) ||
00091 !strcmp(tag, SHUTTER_RAW) ||
00092 !strcmp(tag, STD_RAW)) {
00093 cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_RAW) ;
00094 }
00095
00096 else if (!strcmp(tag,OMEGA_CALIB_BIAS) ||
00097 !strcmp(tag, OMEGA_CALIB_BPM) ||
00098 !strcmp(tag, OMEGA_CALIB_CPM ) ||
00099 !strcmp(tag, OMEGA_CALIB_DARK) ||
00100 !strcmp(tag, OMEGA_CALIB_DOME) ||
00101 !strcmp(tag, OMEGA_CALIB_EXTCUR) ||
00102 !strcmp(tag, OMEGA_CALIB_FLAT) ||
00103 !strcmp(tag, OMEGA_CALIB_FRINGE) ||
00104 !strcmp(tag, OMEGA_CALIB_HPM) ||
00105 !strcmp(tag, OMEGA_CALIB_ILLFIT) ||
00106 !strcmp(tag, OMEGA_CALIB_ILLUM) ||
00107 !strcmp(tag, OMEGA_CALIB_MONIT) ||
00108 !strcmp(tag, OMEGA_CALIB_NSKY) ||
00109 !strcmp(tag, OMEGA_CALIB_RDNOISE) ||
00110 !strcmp(tag, OMEGA_CALIB_REFSTAR) ||
00111 !strcmp(tag, OMEGA_CALIB_TWIL) ||
00112 !strcmp(tag, OMEGA_CALIB_COLTERMS) ||
00113 !strcmp(tag, OMEGA_USNOA2) ||
00114 !strcmp(tag, OMEGA_CALIB_EXTCUR) ||
00115 !strcmp(tag, REFMFLAT) ||
00116 !strcmp(tag, OMEGA_CALIB_ZP)) {
00117 cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_CALIB);
00118 }
00119
00120 }
00121
00122 return 0 ;
00123 }
00124