hawki_dfs.c

00001 /* $Id: hawki_dfs.c,v 1.28 2010/11/29 03:32:41 cgarcia Exp $
00002  *
00003  * This file is part of the HAWKI 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: cgarcia $
00023  * $Date: 2010/11/29 03:32:41 $
00024  * $Revision: 1.28 $
00025  * $Name: hawki-1_8_0 $
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 "hawki_dfs.h"
00042 
00043 /*----------------------------------------------------------------------------*/
00049 /*----------------------------------------------------------------------------*/
00050 
00053 /*----------------------------------------------------------------------------*/
00059 /*----------------------------------------------------------------------------*/
00060 int hawki_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, HAWKI_COMMAND_LINE)                   ||
00080                 !strcmp(tag, HAWKI_CAL_DARK_RAW)               ||
00081                 !strcmp(tag, HAWKI_TEC_FLAT_RAW)               ||
00082                 !strcmp(tag, HAWKI_CAL_FLAT_RAW)               ||
00083                 !strcmp(tag, HAWKI_CAL_ZPOINT_RAW)             ||
00084                 !strcmp(tag, HAWKI_CAL_ILLUM_RAW)              ||
00085                 !strcmp(tag, HAWKI_CAL_DISTOR_RAW)             ||
00086                 !strcmp(tag, HAWKI_IMG_JITTER_SKY_RAW)         ||
00087                 !strcmp(tag, HAWKI_IMG_JITTER_RAW)             ||
00088                 !strcmp(tag, HAWKI_CAL_LINGAIN_LAMP_RAW)       ||
00089                 !strcmp(tag, HAWKI_CAL_LINGAIN_DARK_RAW)       ||
00090                 !strcmp(tag, HAWKI_CALPRO_BASICCALIBRATED)     ||
00091                 !strcmp(tag, HAWKI_CALPRO_SKY_BASICCALIBRATED) ||
00092                 !strcmp(tag, HAWKI_CALPRO_BKGIMAGE)            ||
00093                 !strcmp(tag, HAWKI_CALPRO_BKG_SUBTRACTED)      ||
00094                 !strcmp(tag, HAWKI_CALPRO_DIST_CORRECTED)      ||
00095                 !strcmp(tag, HAWKI_CALPRO_COMBINED)            ||
00096                 !strcmp(tag, HAWKI_CALPRO_ZPOINT_TAB))
00097             cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_RAW) ;
00098         /* CALIB frames */
00099         else if (!strcmp(tag, HAWKI_CALPRO_BPM)       ||
00100                 !strcmp(tag, HAWKI_UTIL_STDSTARS_RAW) ||
00101                 !strcmp(tag, HAWKI_UTIL_DISTMAP_RAW)  ||
00102                 !strcmp(tag, HAWKI_CALPRO_BPM_HOT)    ||
00103                 !strcmp(tag, HAWKI_CALPRO_BPM_COLD)   ||
00104                 !strcmp(tag, HAWKI_CALPRO_FLAT)       ||
00105                 !strcmp(tag, HAWKI_CALPRO_DARK)       ||
00106                 !strcmp(tag, HAWKI_CALPRO_STDSTARS)   ||
00107                 !strcmp(tag, HAWKI_CALPRO_DISTORTION))
00108             cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_CALIB) ;
00109     }
00110     return 0 ;
00111 }
00112 

Generated on Thu Feb 17 17:13:07 2011 for HAWKI Pipeline Reference Manual by  doxygen 1.4.7