ERIS Pipeline Reference Manual 1.9.2
eris_nix_dfs.h
1/* $Id$
2 *
3 * This file is part of the ERIS/NIX Pipeline
4 * Copyright (C) 2017 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 02110-1301 USA
19 */
20
21/*
22 * $Author$
23 * $Date$
24 * $Rev$
25*/
26
27#ifndef ERIS_NIX_DFS_H
28#define ERIS_NIX_DFS_H
29
30#ifdef HAVE_CONFIG_H
31#include <config.h>
32#endif
33
34/*-----------------------------------------------------------------------------
35 Define
36 -----------------------------------------------------------------------------*/
37
38/* Define here the PRO.CATG keywords */
39#define ERIS_NIX_NL_BPM_PRO_CATG "BP_MAP_NL"
40#define ERIS_NIX_CAL_DET_OBJECT_LSS_JITTER_PRO_CATG "CAL_DET_OBJECT_LSS_JITTER"
41#define ERIS_NIX_CAL_DET_OBJECT_FPC_PRO_CATG "CAL_DET_OBJECT_FPC"
42#define ERIS_NIX_CAL_DET_OBJECT_APP_PRO_CATG "CAL_DET_OBJECT_APP"
43#define ERIS_NIX_CAL_DET_OBJECT_SAM_PRO_CATG "CAL_DET_OBJECT_SAM"
44
45
46#define ERIS_NIX_CAL_DET_STD_FPC_PRO_CATG "CAL_DET_STD_FPC"
47#define ERIS_NIX_CAL_DET_STD_APP_PRO_CATG "CAL_DET_STD_APP"
48#define ERIS_NIX_CAL_DET_STD_SAM_PRO_CATG "CAL_DET_STD_SAM"
49
50#define ERIS_NIX_RAW_PUPIL_LAMP_OPEN_DO_CATG "PUPIL_LAMP_OPEN"
51#define ERIS_NIX_RAW_PUPIL_LAMP_JHK_DO_CATG "PUPIL_LAMP_JHK"
52#define ERIS_NIX_RAW_PUPIL_LAMP_LM_DO_CATG "PUPIL_LAMP_LM"
53#define ERIS_NIX_RAW_PUPIL_LAMP_CROSS_DO_CATG "PUPIL_LAMP_CROSS"
54#define ERIS_NIX_RAW_PUPIL_LAMP_MASK_DO_CATG "PUPIL_LAMP_MASK"
55
56
57#define ERIS_NIX_RAW_PUPIL_SKY_OPEN_DO_CATG "PUPIL_SKY_OPEN"
58#define ERIS_NIX_RAW_PUPIL_SKY_JHK_DO_CATG "PUPIL_SKY_JHK"
59#define ERIS_NIX_RAW_PUPIL_SKY_LM_DO_CATG "PUPIL_SKY_LM"
60#define ERIS_NIX_RAW_PUPIL_SKY_CROSS_DO_CATG "PUPIL_SKY_CROSS"
61#define ERIS_NIX_RAW_PUPIL_SKY_MASK_DO_CATG "PUPIL_SKY_MASK"
62#define ERIS_NIX_RAW_PUPIL_SKY_APP_DO_CATG "PUPIL_SKY_APP"
63#define ERIS_NIX_RAW_PUPIL_SKY_SAM_DO_CATG "PUPIL_SKY_SAM"
64#define ERIS_NIX_RAW_PUPIL_SKY_LYOT_DO_CATG "PUPIL_SKY_LYOT"
65#define ERIS_NIX_RAW_PUPIL_SKY_LYOTND_DO_CATG "PUPIL_SKY_LYOTND"
66
67
68#define ERIS_NIX_RAW_PUPIL_DARK_OPEN_DO_CATG "PUPIL_DARK_OPEN"
69#define ERIS_NIX_RAW_PUPIL_DARK_JHK_DO_CATG "PUPIL_DARK_JHK"
70#define ERIS_NIX_RAW_PUPIL_DARK_LM_DO_CATG "PUPIL_DARK_LM"
71#define ERIS_NIX_RAW_PUPIL_DARK_CROSS_DO_CATG "PUPIL_DARK_CROSS"
72#define ERIS_NIX_RAW_PUPIL_DARK_MASK_DO_CATG "PUPIL_DARK_MASK"
73
74
75#define ERIS_NIX_RAW_PUPIL_BKG_OPEN_DO_CATG "PUPIL_BACKGROUND_OPEN"
76#define ERIS_NIX_RAW_PUPIL_BKG_JHK_DO_CATG "PUPIL_BACKGROUND_JHK"
77#define ERIS_NIX_RAW_PUPIL_BKG_LM_DO_CATG "PUPIL_BACKGROUND_LM"
78#define ERIS_NIX_RAW_PUPIL_BKG_CROSS_DO_CATG "PUPIL_BACKGROUND_CROSS"
79#define ERIS_NIX_RAW_PUPIL_BKG_MASK_DO_CATG "PUPIL_BACKGROUND_MASK"
80
81#define ERIS_NIX_RAW_PUPIL_SKY_DO_CATG "PUPIL_SKY"
82#define ERIS_NIX_RAW_PUPIL_LAMP_DO_CATG "PUPIL_LAMP"
83#define ERIS_NIX_RAW_PUPIL_DARK_DO_CATG "PUPIL_DARK"
84#define ERIS_NIX_RAW_PUPIL_BKG_DO_CATG "PUPIL_BACKGROUND"
85
86
87
88#define ERIS_NIX_CAL_DET_OBJECT_JITTER_PRO_CATG "CAL_DET_OBJECT_JITTER"
89#define ERIS_NIX_CAL_DET_SKY_APP_PRO_CATG "CAL_DET_SKY_APP"
90#define ERIS_NIX_CAL_DET_SKY_FPC_PRO_CATG "CAL_DET_SKY_FPC"
91#define ERIS_NIX_CAL_DET_SKY_JITTER_PRO_CATG "CAL_DET_SKY_JITTER"
92
93#define ERIS_NIX_CAL_DET_PUPIL_LAMP_PRO_CATG "PUPIL_LAMP"
94#define ERIS_NIX_CAL_DET_PUPIL_LAMP_OPEN_PRO_CATG "PUPIL_LAMP_OPEN"
95#define ERIS_NIX_CAL_DET_PUPIL_LAMP_MASK_PRO_CATG "PUPIL_LAMP_MASK"
96
97#define ERIS_NIX_CAL_DET_PUPIL_SKY_PRO_CATG "PUPIL_SKY"
98#define ERIS_NIX_CAL_DET_PUPIL_SKY_OPEN_PRO_CATG "PUPIL_SKY_OPEN"
99#define ERIS_NIX_CAL_DET_PUPIL_SKY_MASK_PRO_CATG "PUPIL_SKY_MASK"
100
101#define ERIS_NIX_CAL_DET_PUPIL_BKG_PRO_CATG "PUPIL_BACKGROUND"
102#define ERIS_NIX_CAL_DET_PUPIL_BKG_OPEN_PRO_CATG "PUPIL_BACKGROUND_OPEN"
103#define ERIS_NIX_CAL_DET_PUPIL_BKG_MASK_PRO_CATG "PUPIL_BACKGROUND_MASK"
104
105
106#define ERIS_NIX_CAL_DET_PUPIL_DARK_PRO_CATG "PUPIL_DARK"
107#define ERIS_NIX_CAL_DET_PUPIL_DARK_OPEN_PRO_CATG "PUPIL_DARK_OPEN"
108#define ERIS_NIX_CAL_DET_PUPIL_DARK_MASK_PRO_CATG "PUPIL_DARK_MASK"
109
110#define ERIS_NIX_CAL_DET_STD_JITTER_PRO_CATG "CAL_DET_STD_JITTER"
111#define ERIS_NIX_CAL_DET_OBJECT_LSS_JITTER_PRO_CATG "CAL_DET_OBJECT_LSS_JITTER"
112#define ERIS_NIX_CAL_DET_SKY_LSS_JITTER_PRO_CATG "CAL_DET_SKY_LSS_JITTER"
113#define ERIS_NIX_CAL_DET_STD_LSS_JITTER_PRO_CATG "CAL_DET_STD_LSS_JITTER"
114#define ERIS_NIX_CAL_PHOT_CATALOGUE_PRO_CATG "CAL_PHOT_CATALOGUE"
115#define ERIS_NIX_CAL_PHOT_MATCH_CATALOGUE_PRO_CATG "CAL_PHOT_MATCHCAT"
116#define ERIS_NIX_CAL_PHOT_OBJECT_JITTER_PRO_CATG "CAL_PHOT_OBJECT_JITTER"
117#define ERIS_NIX_CAL_PHOT_REF_CATALOGUE_PRO_CATG "CAL_PHOT_REFCAT"
118#define ERIS_NIX_CAL_PHOT_STD_JITTER_PRO_CATG "CAL_PHOT_STD_JITTER"
119#define ERIS_NIX_CAL_WCS_CATALOGUE_PRO_CATG "CAL_WCS_CATALOGUE"
120#define ERIS_NIX_CAL_WCS_MATCH_CATALOGUE_PRO_CATG "CAL_WCS_MATCHCAT"
121#define ERIS_NIX_CAL_WCS_OBJECT_JITTER_PRO_CATG "CAL_WCS_OBJECT_JITTER"
122#define ERIS_NIX_CAL_WCS_REF_CATALOGUE_PRO_CATG "CAL_WCS_REFCAT"
123#define ERIS_NIX_CAL_WCS_REPORT_PRO_CATG "CAL_WCS_REPORT"
124#define ERIS_NIX_CAL_WCS_STD_JITTER_PRO_CATG "CAL_WCS_STD_JITTER"
125#define ERIS_NIX_CALIB_OBJECT_JITTER_PRO_CATG "CALIB_OBJECT_JITTER"
126#define ERIS_NIX_COEFFS_CUBE_PRO_CATG "COEFFS_CUBE"
127#define ERIS_NIX_CORRECTED_OBJECT_LSS_JITTER_PRO_CATG "CORRECTED_OBJECT_LSS_JITTER"
128#define ERIS_NIX_CORRECTED_STD_LSS_JITTER_PRO_CATG "CORRECTED_STD_LSS_JITTER"
129#define ERIS_NIX_DET_LIN_INFO_PRO_CATG "DET_LIN_INFO"
130#define ERIS_NIX_GAIN_PRO_CATG "GAIN_INFO"
131#define ERIS_NIX_IMG_CATALOGUE_PRO_CATG "IMG_OBS_CATALOGUE"
132#define ERIS_NIX_IMG_OBS_COMBINED_PRO_CATG "IMG_OBS_COMBINED"
133#define ERIS_NIX_IMG_STD_COMBINED_PRO_CATG "IMG_STD_COMBINED"
134#define ERIS_NIX_LSS_OBS_COMBINED_PRO_CATG "LSS_OBS_COMBINED"
135#define ERIS_NIX_LSS_STD_COMBINED_PRO_CATG "LSS_STD_COMBINED"
136#define ERIS_NIX_LSS_STARTRACE_SKY "LSS_STARTRACE_SKY"
137#define ERIS_NIX_LSS_TRACE_FIT "LSS_TRACE_FIT"
138#define ERIS_NIX_MASTER_BPM_LAMP_PRO_CATG "MASTER_BPM_LAMP"
139#define ERIS_NIX_MASTER_BPM_LSS_PRO_CATG "MASTER_BPM_LSS"
140#define ERIS_NIX_MASTER_BPM_SKY_PRO_CATG "MASTER_BPM_SKY"
141#define ERIS_NIX_MASTER_DARK_IMG_PRO_CATG "MASTER_DARK_IMG"
142#define ERIS_NIX_MASTER_DARK_IFU_PRO_CATG "MASTER_DARK_IFU"
143#define ERIS_NIX_MASTER_FLAT_LAMP_HIFREQ_PRO_CATG "MASTER_FLAT_LAMP_HIFREQ"
144#define ERIS_NIX_MASTER_FLAT_LAMP_LOFREQ_PRO_CATG "MASTER_FLAT_LAMP_LOFREQ"
145#define ERIS_NIX_MASTER_FLAT_LSS_HIFREQ_PRO_CATG "MASTER_FLAT_LSS_HIFREQ"
146#define ERIS_NIX_MASTER_FLAT_LSS_LOFREQ_PRO_CATG "MASTER_FLAT_LSS_LOFREQ"
147#define ERIS_NIX_MASTER_FLAT_SKY_HIFREQ_PRO_CATG "MASTER_FLAT_SKY_HIFREQ"
148#define ERIS_NIX_MASTER_FLAT_SKY_LOFREQ_PRO_CATG "MASTER_FLAT_SKY_LOFREQ"
149#define ERIS_NIX_MASTER_FLAT_TWILIGHT_LOFREQ_PRO_CATG \
150 "MASTER_FLAT_TWILIGHT_LOFREQ"
151#define ERIS_NIX_MASTER_STARTRACE_PRO_CATG "MASTER_STARTRACE"
152#define ERIS_NIX_MASTER_WAVE_PRO_CATG "MASTER_WAVE"
153#define ERIS_NIX_REFERENCE_DARK_PRO_CATG "MASTER_DARK"
154#define ERIS_NIX_PHOT_DATA_PRO_CATG "PHOT_DATA"
155#define ERIS_NIX_REFLEX_PRO_CATG "REFLEX"
156#define ERIS_NIX_SKYSUB_OBJECT_JITTER_PRO_CATG "SKYSUB_OBJECT_JITTER"
157#define ERIS_NIX_SKYSUB_STD_JITTER_PRO_CATG "SKYSUB_STD_JITTER"
158#define ERIS_NIX_SKYSUB_OBJECT_LSS_JITTER_PRO_CATG "SKYSUB_OBJECT_LSS_JITTER"
159#define ERIS_NIX_SKYSUB_STD_LSS_JITTER_PRO_CATG "SKYSUB_STD_LSS_JITTER"
160#define ERIS_NIX_WCS_MATCHED_CATALOGUE_PRO_CATG "WCS_MATCHED_CATALOGUE"
161#define ERIS_NIX_WCS_REFINE_PRO_CATG "WCS_REFINE"
162
163/* Define here the DO.CATG keywords. IMPORTANT that no definition
164 forms a substring of another, or will lead to problems in tag
165 matching while loading from frameset */
166#define ERIS_NIX_RAW_PERSISTENCE_IMG_DO_CATG "PERSISTENCE_IMA"
167#define ERIS_NIX_RAW_PERSISTENCE_CUBE_DO_CATG "PERSISTENCE_CUBE"
168#define ERIS_NIX_RAW_DARK_DO_CATG "DARK"
169#define ERIS_NIX_RAW_FLAT_LAMP_OFF_DO_CATG "FLAT_LAMP_OFF"
170#define ERIS_NIX_RAW_FLAT_LAMP_ON_DO_CATG "FLAT_LAMP_ON"
171#define ERIS_NIX_RAW_FLAT_SKY_DO_CATG "FLAT_SKY"
172#define ERIS_NIX_RAW_FLAT_SKY_LSS_DO_CATG "FLAT_SKY_LSS"
173#define ERIS_NIX_RAW_FLAT_TWILIGHT_DO_CATG "FLAT_TWILIGHT"
174#define ERIS_NIX_RAW_OBJECT_APP_DO_CATG "OBJECT_APP"
175#define ERIS_NIX_RAW_OBJECT_FPC_DO_CATG "OBJECT_FPC"
176#define ERIS_NIX_RAW_OBJECT_JITTER_DO_CATG "OBJECT_JITTER"
177#define ERIS_NIX_RAW_OBJECT_LSS_JITTER_DO_CATG "OBJECT_LSS_JITTER"
178#define ERIS_NIX_RAW_OBJECT_SAM_DO_CATG "OBJECT_SAM"
179
180#define ERIS_NIX_RAW_SKY_FPC_DO_CATG "SKY_FPC"
181#define ERIS_NIX_RAW_SKY_APP_DO_CATG "SKY_APP"
182#define ERIS_NIX_RAW_SKY_JITTER_DO_CATG "SKY_JITTER"
183#define ERIS_NIX_RAW_SKY_LSS_JITTER_DO_CATG "SKY_LSS_JITTER"
184#define ERIS_NIX_RAW_STARTRACE_IMG_DO_CATG "STARTRACE_IMG"
185#define ERIS_NIX_RAW_STARTRACE_SPEC_DO_CATG "STARTRACE_SPEC"
186#define ERIS_NIX_RAW_STD_JITTER_DO_CATG "STD_JITTER"
187#define ERIS_NIX_RAW_STD_APP_DO_CATG "STD_APP"
188#define ERIS_NIX_RAW_STD_FPC_DO_CATG "STD_FPC"
189#define ERIS_NIX_RAW_STD_SAM_DO_CATG "STD_SAM"
190#define ERIS_NIX_RAW_STD_LSS_JITTER_DO_CATG "STD_LSS_JITTER"
191#define ERIS_NIX_RAW_WAVE_LAMP_OFF_DO_CATG "WAVE_LAMP_OFF"
192#define ERIS_NIX_RAW_WAVE_LAMP_ON_DO_CATG "WAVE_LAMP_ON"
193
194
195/* Define here the MEF extension names */
196#define ERIS_NIX_HOT_BPM_EXTENSION "HOT_BPM"
197
198/* Define here the strings to set in keyword WCS_METHOD */
199#define ERIS_NIX_WCS_CATALOGUE_MATCH "CATALOGUE_MATCH"
200#define ERIS_NIX_WCS_JITTER_RELATIVE "JITTER_RELATIVE"
201#define ERIS_NIX_WCS_TEL_POINTING "TEL_POINTING"
202
203#define CPL_DFS_PRO_DID "PRO-1.16"
204
205/*-----------------------------------------------------------------------------
206 Functions prototypes
207 -----------------------------------------------------------------------------*/
208
209#include <hdrl.h>
210#include "eris_nix_defs.h"
211#include "eris_nix_master_bpm.h"
212
213
214cpl_error_code eris_nix_dfs_set_groups(cpl_frameset *);
215
216cpl_error_code enu_dfs_save_bpm(const char * pro_catg,
217 cpl_frameset * allframes,
218 const cpl_parameterlist * parlist,
219 const cpl_frameset * usedframes,
220 const master_bpm * bpm,
221 const char * recipe,
222 const cpl_propertylist * pl,
223 const char * pipe_id,
224 const char * filename);
225
226cpl_error_code enu_dfs_save_catalogue(cpl_frameset * frameset,
227 cpl_frame * inherit,
228 const cpl_parameterlist * parlist,
229 const cpl_table * catalogue,
230 const cpl_propertylist * tablelist,
231 const char * cat_name,
232 const char * recipe,
233 const char * pipe_id,
234 const char * preface,
235 const char * procat);
236
237cpl_error_code enu_dfs_save_himage(
238 cpl_frameset * allframes,
239 const cpl_parameterlist * parlist,
240 const cpl_frameset * provenance,
241 const cpl_boolean prov_raw,
242 const hdrl_image * himage,
243 const hdrl_imagelist * himagelist,
244 const mef_extension_list* mefs,
245 const char * recipe,
246 const cpl_frame * inherit,
247 const cpl_propertylist * applist,
248 const cpl_propertylist * wcs_plist,
249 const char * pipe_id,
250 const char * filename);
251
252cpl_error_code enu_dfs_save_limage(
253 cpl_frameset * allframes,
254 const cpl_parameterlist * parlist,
255 const cpl_frameset * provenance,
256 const cpl_boolean prov_raw,
257 const located_image * limage,
258 const char * recipe,
259 const cpl_frame * inherit,
260 cpl_propertylist * applist,
261 const char * pipe_id,
262 const char * filename);
263
264cpl_error_code enu_dfs_setup_product_header(cpl_propertylist * header,
265 const cpl_frame * product_frame,
266 const cpl_frameset * framelist,
267 const cpl_parameterlist * parlist,
268 const char * recipe_id,
269 const char * pipeline_id,
270 const cpl_frame * inherit,
271 const cpl_frameset * provenance,
272 const cpl_boolean prov_raw);
273
274#endif
cpl_error_code enu_dfs_save_limage(cpl_frameset *allframes, const cpl_parameterlist *parlist, const cpl_frameset *provenance, const cpl_boolean prov_raw, const located_image *limage, const char *recipe, const cpl_frame *inherit, cpl_propertylist *applist, const char *pipe_id, const char *filename)
Save a located image structure to a MEF.
Definition: eris_nix_dfs.c:909
cpl_error_code eris_nix_dfs_set_groups(cpl_frameset *)
Set the group as RAW or CALIB in a frameset.
Definition: eris_nix_dfs.c:58
cpl_error_code enu_dfs_save_bpm(const char *pro_catg, cpl_frameset *allframes, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const master_bpm *bpm, const char *recipe, const cpl_propertylist *pl, const char *pipe_id, const char *filename)
Save a master_bpm as a DFS-compliant pipeline product.
Definition: eris_nix_dfs.c:218
cpl_error_code enu_dfs_setup_product_header(cpl_propertylist *header, const cpl_frame *product_frame, const cpl_frameset *framelist, const cpl_parameterlist *parlist, const char *recipe_id, const char *pipeline_id, const cpl_frame *inherit, const cpl_frameset *provenance, const cpl_boolean prov_raw)
Add phase3/IDP keywords to a pipeline product propertyist list.
cpl_error_code enu_dfs_save_catalogue(cpl_frameset *frameset, cpl_frame *inherit, const cpl_parameterlist *parlist, const cpl_table *catalogue, const cpl_propertylist *tablelist, const char *cat_name, const char *recipe, const char *pipe_id, const char *preface, const char *procat)
Save a catalogue as DFS product.
Definition: eris_nix_dfs.c:274
cpl_error_code enu_dfs_save_himage(cpl_frameset *allframes, const cpl_parameterlist *parlist, const cpl_frameset *provenance, const cpl_boolean prov_raw, const hdrl_image *himage, const hdrl_imagelist *himagelist, const mef_extension_list *mefs, const char *recipe, const cpl_frame *inherit, const cpl_propertylist *applist, const cpl_propertylist *wcs_plist, const char *pipe_id, const char *filename)
Save an hdrl_image/imagelist as a DFS-compliant MEF pipeline product.
Definition: eris_nix_dfs.c:423