naco_dfs.c

00001 /* $Id: naco_dfs.c,v 1.22 2008-04-18 00:25:30 llundin Exp $
00002  *
00003  * This file is part of the NACO 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., 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: llundin $
00023  * $Date: 2008-04-18 00:25:30 $
00024  * $Revision: 1.22 $
00025  * $Name: not supported by cvs2svn $
00026  */
00027 
00028 #ifdef HAVE_CONFIG_H
00029 #include <config.h>
00030 #endif
00031 
00032 /*-----------------------------------------------------------------------------
00033                                    Includes
00034  -----------------------------------------------------------------------------*/
00035 
00036 #include <stdarg.h>
00037 #include <string.h>
00038 #include <math.h>
00039 
00040 #include <cpl.h>
00041 
00042 #include "naco_dfs.h"
00043 
00044 
00045 /*----------------------------------------------------------------------------*/
00051 /*----------------------------------------------------------------------------*/
00052 
00055 /*----------------------------------------------------------------------------*/
00061 /*----------------------------------------------------------------------------*/
00062 int naco_dfs_set_groups(cpl_frameset * set)
00063 {
00064     cpl_frame   *   cur_frame;
00065     const char  *   tag;
00066     int             nframes;
00067     int             i;
00068 
00069     /* Check entries */
00070     if (set == NULL) return -1;
00071     
00072     /* Initialize */
00073     nframes = cpl_frameset_get_size(set);
00074 
00075     /* Loop on frames */
00076     for (i=0 ; i<nframes ; i++) {
00077         cur_frame = cpl_frameset_get_frame(set, i);
00078         tag = cpl_frame_get_tag(cur_frame);
00079     
00080         /* RAW frames */
00081         if (!strcmp(tag, NACO_IMG_DARK_RAW) ||
00082                 !strcmp(tag, NACO_IMG_DETLIN_LAMP) ||
00083                 !strcmp(tag, NACO_IMG_DETLIN_DARK) ||
00084                 !strcmp(tag, NACO_IMG_JITTER_OBJ) ||
00085                 !strcmp(tag, NACO_IMG_JITTER_SKY) ||
00086                 !strcmp(tag, NACO_IMG_JITTER_OBJ_POL) ||
00087                 !strcmp(tag, NACO_IMG_JITTER_SKY_POL) ||
00088                 !strcmp(tag, NACO_IMG_LAMPFLAT_RAW) ||
00089                 !strcmp(tag, NACO_IMG_TWFLAT_RAW) ||
00090                 !strcmp(tag, NACO_IMG_STREHL_CAL) ||
00091                 !strcmp(tag, NACO_IMG_STREHL_TECH) ||
00092                 !strcmp(tag, NACO_IMG_CHECKFOCUS_RAW) ||
00093                 !strcmp(tag, NACO_IMG_SLITPOS_RAW) ||
00094                 !strcmp(tag, NACO_IMG_ZPOINT_JITTER) ||
00095                 !strcmp(tag, NACO_IMG_ZPOINT_CHOP) ||
00096                 !strcmp(tag, NACO_IMG_STD_ASCII) ||
00097                 !strcmp(tag, NACO_SPC_MODEL_ASCII) ||
00098                 !strcmp(tag, NACO_SPC_ARGON_ASCII) ||
00099                 !strcmp(tag, NACO_SPC_LAMPWAVE_RAW) ||
00100                 !strcmp(tag, NACO_SPC_LAMPFLAT_RAW) ||
00101                 !strcmp(tag, NACO_SPC_NOD_RAW) ||
00102                 !strcmp(tag, NACO_SPC_JITTER_RAW) ||
00103                 !strcmp(tag, NACO_SPC_JITTER_SKY))
00104             cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_RAW);
00105         /* CALIB frames */
00106         else if (!strcmp(tag, NACO_CALIB_FLAT) ||
00107                 !strcmp(tag, NACO_CALIB_BPM) ||
00108                 !strcmp(tag, NACO_CALIB_SPCFLAT) ||
00109                 !strcmp(tag, NACO_CALIB_ARC) ||
00110                 !strcmp(tag, NACO_IMG_STD_CAT) ||
00111                 !strcmp(tag, NACO_SPC_MODEL) ||
00112                 !strcmp(tag, NACO_SPC_ARGON) ||
00113                 !strcmp(tag, NACO_CALIB_ARC_WL))
00114             cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_CALIB);
00115 
00116     }
00117     return 0;
00118 }
00119 
Generated on Mon Feb 17 15:01:44 2014 for NACO Pipeline Reference Manual by  doxygen 1.6.3