IIINSTRUMENT Pipeline Reference Manual 4.4.12
naco_dfs.c
1/* $Id: naco_dfs.c,v 1.22 2008-04-18 00:25:30 llundin Exp $
2 *
3 * This file is part of the NACO Pipeline
4 * Copyright (C) 2002,2003 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * $Author: llundin $
23 * $Date: 2008-04-18 00:25:30 $
24 * $Revision: 1.22 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifdef HAVE_CONFIG_H
29#include <config.h>
30#endif
31
32/*-----------------------------------------------------------------------------
33 Includes
34 -----------------------------------------------------------------------------*/
35
36#include <stdarg.h>
37#include <string.h>
38#include <math.h>
39
40#include <cpl.h>
41
42#include "naco_dfs.h"
43
44
45/*----------------------------------------------------------------------------*/
51/*----------------------------------------------------------------------------*/
52
55/*----------------------------------------------------------------------------*/
61/*----------------------------------------------------------------------------*/
62int naco_dfs_set_groups(cpl_frameset * set)
63{
64 cpl_frame * cur_frame;
65 const char * tag;
66 int nframes;
67 int i;
68
69 /* Check entries */
70 if (set == NULL) return -1;
71
72 /* Initialize */
73 nframes = cpl_frameset_get_size(set);
74
75 /* Loop on frames */
76 for (i=0 ; i<nframes ; i++) {
77 cur_frame = cpl_frameset_get_position(set, i);
78 tag = cpl_frame_get_tag(cur_frame);
79
80 /* RAW frames */
81 if (!strcmp(tag, NACO_IMG_DARK_RAW) ||
82 !strcmp(tag, NACO_IMG_DETLIN_LAMP) ||
83 !strcmp(tag, NACO_IMG_DETLIN_DARK) ||
84 !strcmp(tag, NACO_IMG_JITTER_OBJ) ||
85 !strcmp(tag, NACO_IMG_JITTER_SKY) ||
86 !strcmp(tag, NACO_IMG_JITTER_OBJ_POL) ||
87 !strcmp(tag, NACO_IMG_JITTER_SKY_POL) ||
88 !strcmp(tag, NACO_IMG_LAMPFLAT_RAW) ||
89 !strcmp(tag, NACO_IMG_TWFLAT_RAW) ||
90 !strcmp(tag, NACO_IMG_STREHL_CAL) ||
91 !strcmp(tag, NACO_IMG_STREHL_TECH) ||
92 !strcmp(tag, NACO_IMG_CHECKFOCUS_RAW) ||
93 !strcmp(tag, NACO_IMG_SLITPOS_RAW) ||
94 !strcmp(tag, NACO_IMG_ZPOINT_JITTER) ||
95 !strcmp(tag, NACO_IMG_ZPOINT_CHOP) ||
96 !strcmp(tag, NACO_IMG_STD_ASCII) ||
97 !strcmp(tag, NACO_SPC_MODEL_ASCII) ||
98 !strcmp(tag, NACO_SPC_ARGON_ASCII) ||
99 !strcmp(tag, NACO_SPC_LAMPWAVE_RAW) ||
100 !strcmp(tag, NACO_SPC_LAMPFLAT_RAW) ||
101 !strcmp(tag, NACO_SPC_NOD_RAW) ||
102 !strcmp(tag, NACO_SPC_JITTER_RAW) ||
103 !strcmp(tag, NACO_SPC_JITTER_SKY))
104 cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_RAW);
105 /* CALIB frames */
106 else if (!strcmp(tag, NACO_CALIB_FLAT) ||
107 !strcmp(tag, NACO_CALIB_BPM) ||
108 !strcmp(tag, NACO_CALIB_SPCFLAT) ||
109 !strcmp(tag, NACO_CALIB_ARC) ||
110 !strcmp(tag, NACO_IMG_STD_CAT) ||
111 !strcmp(tag, NACO_SPC_MODEL) ||
112 !strcmp(tag, NACO_SPC_ARGON) ||
113 !strcmp(tag, NACO_CALIB_ARC_WL))
114 cpl_frame_set_group(cur_frame, CPL_FRAME_GROUP_CALIB);
115
116 }
117 return 0;
118}
119
int naco_dfs_set_groups(cpl_frameset *set)
Set the group as RAW or CALIB in a frameset.
Definition: naco_dfs.c:62