MOONS Pipeline Reference Manual 0.13.2
moo_products.h
1/*
2 * This file is part of the MOONS Pipeline
3 * Copyright (C) 2002-2016 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifndef MOO_PRODUCTS_H
21#define MOO_PRODUCTS_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27#include <cpl.h>
28
29#include "moo_det.h"
30#include "moo_detlist.h"
31#include "moo_params.h"
32#include "moo_raw.h"
33#include "moo_ext.h"
34#include "moo_rbn.h"
35#include "moo_sci.h"
36#include "moo_f2f.h"
37#include "moo_psf.h"
38#include "moo_loc.h"
39#include "moo_map.h"
40#include "moo_bpm.h"
41#include "moo_cube.h"
42#include "moo_resp.h"
43#include "moo_telluric.h"
44#include "moo_target_table.h"
45#include "moo_molectable.h"
46#include "moo_s1d.h"
47
48#define DICTIONARY_ID "ESO-VLT-DIC.PRO-1.17"
49#define MOO_PRODUCTS_PIPEID "moons"
50typedef struct
51{
52 cpl_frameset *framelist;
53 cpl_frameset *temporarylist;
54 const cpl_parameterlist *parlist;
55 const char *recid;
56 const char *pipeline_id;
57 int keep_temp;
58 moo_params *params;
59} moo_products;
60
61/*-----------------------------------------------------------------------------
62 Types
63 -----------------------------------------------------------------------------*/
64
65/*-----------------------------------------------------------------------------
66 Functions prototypes
67 -----------------------------------------------------------------------------*/
68moo_products *moo_products_new(cpl_frameset *framelist,
69 const cpl_parameterlist *parlist,
70 const char *recid,
71 const char *pipeline_id);
72
73void moo_products_delete(moo_products *self);
74const moo_params *moo_products_get_params(const moo_products *self);
75cpl_error_code
76moo_products_add_frame(const moo_products *self, cpl_frame *frame);
77
78cpl_frame *moo_products_add(moo_products *self,
79 moo_det *det,
80 cpl_frame_level level,
81 const char *tag,
82 const char *filename,
83 const cpl_frame *inherit_frame);
84
85cpl_frame *moo_products_add_det(moo_products *self,
86 moo_det *det,
87 cpl_frame_level level,
88 const char *tag,
89 const char *filename,
90 const cpl_frame *inherit_frame,
91 const char *filter);
92
93cpl_frame *moo_products_add_loc(moo_products *self,
94 moo_loc *loc,
95 int keep_points,
96 cpl_frame_level level,
97 const char *tag,
98 const char *filename,
99 const cpl_frame *inherit_frame);
100
101cpl_frame *moo_products_add_ext(moo_products *self,
102 moo_ext *ext,
103 cpl_frame_level level,
104 const char *tag,
105 const char *filename,
106 const cpl_frame *inherit_frame);
107
108cpl_frame *moo_products_add_rbn(moo_products *self,
109 moo_rbn *rbn,
110 cpl_frame_level level,
111 const char *tag,
112 const char *filename,
113 const cpl_frame *inherit_frame);
114
115cpl_frame *moo_products_add_sci(moo_products *self,
116 moo_sci *sci,
117 cpl_frame_level level,
118 const char *tag,
119 const char *filename,
120 const cpl_frame *inherit_frame);
121
122cpl_frame *moo_products_add_resp(moo_products *self,
123 moo_resp *resp,
124 cpl_frame_level level,
125 const char *tag,
126 const char *filename,
127 const cpl_frame *inherit_frame);
128
129cpl_frame *moo_products_add_telluric(moo_products *self,
130 moo_telluric *tell,
131 cpl_frame_level level,
132 const char *tag,
133 const char *filename,
134 const cpl_frame *inherit_frame);
135
136cpl_frame *moo_products_add_map(moo_products *self,
137 moo_map *map,
138 cpl_frame_level level,
139 const char *tag,
140 const char *filename,
141 const cpl_frame *inherit_frame,
142 moo_rbn *rbn);
143
144cpl_frame *moo_products_add_molectable(moo_products *self,
145 moo_molectable *mtable,
146 cpl_frame_level level,
147 const char *tag,
148 const char *filename,
149 const cpl_frame *inherit_frame);
150
151cpl_frame *moo_products_add_bpm(moo_products *self,
152 moo_bpm *bpm,
153 cpl_frame_level level,
154 const char *tag,
155 const char *filename,
156 const cpl_frame *inherit_frame);
157
158cpl_frame *moo_products_add_saturate_map(moo_products *self,
159 moo_saturate_map *saturate,
160 cpl_frame_level level,
161 const char *tag,
162 const char *filename,
163 const cpl_frame *inherit_frame);
164
165cpl_frame *moo_products_add_cube(moo_products *self,
166 moo_cube *cube,
167 cpl_frame_level level,
168 const char *tag,
169 const char *filename,
170 const cpl_frame *inherit_frame);
171
172cpl_frame *moo_products_add_s1d(moo_products *self,
173 moo_s1d *s1d,
174 const char *tag,
175 const cpl_frame *inherit_frame);
176
177
178cpl_frame *moo_products_add_target_table(moo_products *self,
179 moo_target_table *ttable,
180 cpl_frame_level level,
181 const char *tag,
182 const char *filename,
183 const cpl_frame *inherit_frame);
184
185cpl_frame *moo_products_add_f2f(moo_products *self,
186 moo_f2f *f2f,
187 cpl_frame_level level,
188 const char *tag,
189 const char *filename,
190 const cpl_frame *inherit_frame);
191
192cpl_frame *moo_products_add_psf(moo_products *self,
193 moo_psf *psf,
194 cpl_frame_level level,
195 const char *tag,
196 const char *filename,
197 const cpl_frame *inherit_frame);
198
199cpl_frame *moo_products_add_raw(moo_products *self,
200 moo_raw *raw,
201 cpl_frame_level level,
202 const char *tag,
203 const char *filename,
204 const cpl_frame *inherit_frame);
205
206cpl_error_code moo_masterbias(moo_det *det,
207 moo_detlist *bias_list,
208 moo_bias_params *bias_params,
209 moo_products *products);
210
211cpl_error_code moo_masterdark(moo_det *det, moo_products *products, int mode);
212
213#endif
moo_products * moo_products_new(cpl_frameset *framelist, const cpl_parameterlist *parlist, const char *recid, const char *pipeline_id)
create a moo_product object for a recipe
Definition: moo_products.c:53
cpl_frame * moo_products_add_s1d(moo_products *self, moo_s1d *s1d, const char *tag, const cpl_frame *inherit_frame)
create a product from a MOLECTABLE object
cpl_frame * moo_products_add_loc(moo_products *self, moo_loc *loc, int keep_points, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
This function creates a product from a LOC structure.
Definition: moo_products.c:277
cpl_frame * moo_products_add_sci(moo_products *self, moo_sci *sci, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a SCI object
Definition: moo_products.c:420
cpl_frame * moo_products_add_rbn(moo_products *self, moo_rbn *rbn, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a RBN object
Definition: moo_products.c:376
cpl_frame * moo_products_add_ext(moo_products *self, moo_ext *ext, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a EXT object
Definition: moo_products.c:333
cpl_frame * moo_products_add_molectable(moo_products *self, moo_molectable *mtable, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a MOLECTABLE object
Definition: moo_products.c:600
cpl_error_code moo_products_add_frame(const moo_products *self, cpl_frame *frame)
add a frame to the recipe products
Definition: moo_products.c:167
cpl_frame * moo_products_add_target_table(moo_products *self, moo_target_table *ttable, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a TARGET_TABLE object
Definition: moo_products.c:774
cpl_frame * moo_products_add_saturate_map(moo_products *self, moo_saturate_map *saturate, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a SATURATE MAP object
Definition: moo_products.c:687
cpl_frame * moo_products_add_resp(moo_products *self, moo_resp *resp, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a RESP object
Definition: moo_products.c:464
cpl_frame * moo_products_add_map(moo_products *self, moo_map *map, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame, moo_rbn *rbn)
create a product from a EXT object
Definition: moo_products.c:554
cpl_frame * moo_products_add_cube(moo_products *self, moo_cube *cube, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a CUBE object
Definition: moo_products.c:731
cpl_frame * moo_products_add_bpm(moo_products *self, moo_bpm *bpm, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a BPM object
Definition: moo_products.c:643
cpl_error_code moo_masterdark(moo_det *det, moo_products *products, int mode)
This function creates the master dark frame as a product and essentially produces a standard output a...
cpl_frame * moo_products_add(moo_products *self, moo_det *det, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a DET object
Definition: moo_products.c:203
cpl_error_code moo_masterbias(moo_det *det, moo_detlist *bias_list, moo_bias_params *bias_params, moo_products *products)
This function creates the master bias frame as a product and essentially produces a standard output a...
Definition: moo_products.c:995
const moo_params * moo_products_get_params(const moo_products *self)
get the moo_params object
Definition: moo_products.c:87
cpl_frame * moo_products_add_telluric(moo_products *self, moo_telluric *tell, cpl_frame_level level, const char *tag, const char *filename, const cpl_frame *inherit_frame)
create a product from a TELLURIC object
Definition: moo_products.c:508
the different type of detectors