00001 /* $Id: detmon_dfs.c,v 1.1.1.1 2007/04/17 13:40:30 lbilbao Exp $ 00002 * 00003 * This file is part of the IIINSTRUMENT Pipeline 00004 * Copyright (C) 2002,2003 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00021 /* 00022 * $Author: lbilbao $ 00023 * $Date: 2007/04/17 13:40:30 $ 00024 * $Revision: 1.1.1.1 $ 00025 * $Name: HEAD $ 00026 */ 00027 00028 #ifdef HAVE_CONFIG_H 00029 #include <config.h> 00030 #endif 00031 00032 /*----------------------------------------------------------------------------- 00033 Includes 00034 -----------------------------------------------------------------------------*/ 00035 00036 #include <string.h> 00037 #include <math.h> 00038 00039 #include <cpl.h> 00040 00041 #include "detmon_dfs.h" 00042 00043 /*----------------------------------------------------------------------------*/ 00049 /*----------------------------------------------------------------------------*/ 00050 00053 /*----------------------------------------------------------------------------*/ 00059 /*----------------------------------------------------------------------------*/ 00060 int detmon_dfs_set_groups(cpl_frameset * set) 00061 { 00062 cpl_frame * cur_frame ; 00063 const char * tag ; 00064 int nframes ; 00065 int i ; 00066 00067 /* Check entries */ 00068 if (set == NULL) return -1 ; 00069 00070 /* Initialize */ 00071 nframes = cpl_frameset_get_size(set) ; 00072 00073 /* Loop on frames */ 00074 for (i=0 ; i<nframes ; i++) { 00075 cur_frame = cpl_frameset_get_frame(set, i) ; 00076 tag = cpl_frame_get_tag(cur_frame) ; 00077 00078 /* RAW frames */ 00079 if (!strcmp(tag, DETMON_IR_LG_ON_RAW) || !strcmp(tag, DETMON_IR_LG_OFF_RAW)) 00080 cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_RAW) ; 00081 /* CALIB frames */ 00082 /* else if (!strcmp(tag, IIINSTRUMENT_CALIB_FLAT)) 00083 cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_CALIB) ; 00084 */ 00085 } 00086 return 0 ; 00087 } 00088