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: naco-4_3_3 $
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 "irplib_tools.h"
00043 #include "naco_dfs.h"
00044 
00045 
00046 /*----------------------------------------------------------------------------*/
00052 /*----------------------------------------------------------------------------*/
00053 
00056 /*----------------------------------------------------------------------------*/
00062 /*----------------------------------------------------------------------------*/
00063 int naco_dfs_set_groups(cpl_frameset * set)
00064 {
00065     cpl_frame   *   cur_frame;
00066     const char  *   tag;
00067     int             nframes;
00068     int             i;
00069 
00070     /* Check entries */
00071     if (set == NULL) return -1;
00072     
00073     /* Initialize */
00074     nframes = cpl_frameset_get_size(set);
00075 
00076     /* Loop on frames */
00077     for (i=0 ; i<nframes ; i++) {
00078         cur_frame = cpl_frameset_get_frame(set, i);
00079         tag = cpl_frame_get_tag(cur_frame);
00080     
00081         /* RAW frames */
00082         if (!strcmp(tag, NACO_IMG_DARK_RAW) ||
00083                 !strcmp(tag, NACO_IMG_DETLIN_LAMP) ||
00084                 !strcmp(tag, NACO_IMG_DETLIN_DARK) ||
00085                 !strcmp(tag, NACO_IMG_JITTER_OBJ) ||
00086                 !strcmp(tag, NACO_IMG_JITTER_SKY) ||
00087                 !strcmp(tag, NACO_IMG_JITTER_OBJ_POL) ||
00088                 !strcmp(tag, NACO_IMG_JITTER_SKY_POL) ||
00089                 !strcmp(tag, NACO_IMG_LAMPFLAT_RAW) ||
00090                 !strcmp(tag, NACO_IMG_TWFLAT_RAW) ||
00091                 !strcmp(tag, NACO_IMG_STREHL_CAL) ||
00092                 !strcmp(tag, NACO_IMG_STREHL_TECH) ||
00093                 !strcmp(tag, NACO_IMG_CHECKFOCUS_RAW) ||
00094                 !strcmp(tag, NACO_IMG_SLITPOS_RAW) ||
00095                 !strcmp(tag, NACO_IMG_ZPOINT_JITTER) ||
00096                 !strcmp(tag, NACO_IMG_ZPOINT_CHOP) ||
00097                 !strcmp(tag, NACO_IMG_STD_ASCII) ||
00098                 !strcmp(tag, NACO_SPC_MODEL_ASCII) ||
00099                 !strcmp(tag, NACO_SPC_ARGON_ASCII) ||
00100                 !strcmp(tag, NACO_SPC_LAMPWAVE_RAW) ||
00101                 !strcmp(tag, NACO_SPC_LAMPFLAT_RAW) ||
00102                 !strcmp(tag, NACO_SPC_NOD_RAW) ||
00103                 !strcmp(tag, NACO_SPC_JITTER_RAW) ||
00104                 !strcmp(tag, NACO_SPC_JITTER_SKY))
00105             cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_RAW);
00106         /* CALIB frames */
00107         else if (!strcmp(tag, NACO_CALIB_FLAT) ||
00108                 !strcmp(tag, NACO_CALIB_BPM) ||
00109                 !strcmp(tag, NACO_CALIB_SPCFLAT) ||
00110                 !strcmp(tag, NACO_CALIB_ARC) ||
00111                 !strcmp(tag, NACO_IMG_STD_CAT) ||
00112                 !strcmp(tag, NACO_SPC_MODEL) ||
00113                 !strcmp(tag, NACO_SPC_ARGON) ||
00114                 !strcmp(tag, NACO_CALIB_ARC_WL))
00115             cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_CALIB);
00116 
00117     }
00118     return 0;
00119 }
00120 

Generated on Tue Mar 12 15:19:53 2013 for NACO Pipeline Reference Manual by  doxygen 1.4.7