GRAVI Pipeline Reference Manual 1.10.1
Loading...
Searching...
No Matches
gravi_idp.c
Go to the documentation of this file.
1/*
2 * This file is part of the GRAVI Pipeline
3 * Copyright (C) 2022 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20/*-----------------------------------------------------------------------------
21 Includes
22 -----------------------------------------------------------------------------*/
23
24#ifdef HAVE_CONFIG_H
25#include <config.h>
26#endif
27
28#include <math.h>
29#include <string.h>
30#include "gravi_utils.h"
31#include "gravi_idp.h"
32#include "gravi_pfits.h"
33#include "gravi_dfs.h"
34#include "gravi_cpl.h"
35#include "gravi_vis.h"
36
37/*-----------------------------------------------------------------------------*/
46/*-----------------------------------------------------------------------------*/
47cpl_propertylist * gravi_idp_compute (gravi_data * vis_data,
48 cpl_propertylist * header,
49 cpl_frameset * frameset,
50 char * input_data_type)
51{
52 cpl_propertylist * idp_plist = cpl_propertylist_new ();
53
55 char qc_name[100];
56
57 /* Scratch tables to merge polarization tables */
58 cpl_table * oi_vis2_SC_allpol = NULL;
59 cpl_table * oi_T3_SC_allpol = NULL;
60 cpl_table * oi_wave_SC_allpol = NULL;
61
62 /* There are products like the p2vmred that do not have all columns */
64 {
65 double vis2err = 0;
66 double visphierr = 0;
67 double t3phierr = 0;
68 oi_vis2_SC_allpol = cpl_table_duplicate(gravi_data_get_oi_vis2 (vis_data, GRAVI_SC, 0, npol_sc));
69 oi_T3_SC_allpol = cpl_table_duplicate(gravi_data_get_oi_t3 (vis_data, GRAVI_SC, 0, npol_sc));
70 oi_wave_SC_allpol = cpl_table_duplicate(gravi_data_get_oi_wave (vis_data, GRAVI_SC, 0, npol_sc));
71 for (int pol = 1; pol < npol_sc; pol++) {
72 cpl_table_insert(oi_vis2_SC_allpol, gravi_data_get_oi_vis2 (vis_data, GRAVI_SC, pol, npol_sc), cpl_table_get_nrow(oi_vis2_SC_allpol));
73 cpl_table_insert(oi_T3_SC_allpol, gravi_data_get_oi_t3 (vis_data, GRAVI_SC, pol, npol_sc), cpl_table_get_nrow(oi_T3_SC_allpol));
74 cpl_table_insert(oi_wave_SC_allpol, gravi_data_get_oi_wave (vis_data, GRAVI_SC, pol, npol_sc), cpl_table_get_nrow(oi_wave_SC_allpol));
75 }
76
77 for (int pol = 0; pol < npol_sc; pol++) {
78 double this_pol_vis2err = gravi_table_get_column_flagged_mean(gravi_data_get_oi_vis2 (vis_data, GRAVI_SC, pol, npol_sc), "VIS2ERR");
79 vis2err += this_pol_vis2err * this_pol_vis2err;
80 double this_pol_visphierr = gravi_table_get_column_flagged_mean(gravi_data_get_oi_vis (vis_data, GRAVI_SC, pol, npol_sc), "VISPHIERR");
81 visphierr += this_pol_visphierr * this_pol_visphierr;
82 double this_pol_t3phierr = gravi_table_get_column_flagged_mean(gravi_data_get_oi_t3 (vis_data, GRAVI_SC, pol, npol_sc), "T3PHIERR");
83 t3phierr += this_pol_t3phierr * this_pol_t3phierr;
84 }
85
86 /* Compute QC values that aggregate on polarizations */
87 sprintf (qc_name, "VIS2ERR");
88 cpl_propertylist_update_double (idp_plist, qc_name, sqrt(vis2err));
89 cpl_propertylist_set_comment (idp_plist, qc_name, "Representative squared visibility error [%]");
90
91 sprintf (qc_name, "VISPHERR");
92 cpl_propertylist_update_double (idp_plist, qc_name, sqrt(visphierr));
93 cpl_propertylist_set_comment (idp_plist, qc_name, "Representative visibility phase error [%]");
94
95 sprintf (qc_name, "T3PHIERR");
96 cpl_propertylist_update_double (idp_plist, qc_name, sqrt(t3phierr));
97 cpl_propertylist_set_comment (idp_plist, qc_name, "Representative closure phase error [deg]");
98
99 double min_uvcoord, max_uvcoord;
100 gravi_data_get_minmax_uvcoord(oi_vis2_SC_allpol, &min_uvcoord, &max_uvcoord);
101
102 cpl_vector * baselines = cpl_vector_new(GRAVI_NBASE*2);
103 for (cpl_size ibase=0; ibase < GRAVI_NBASE; ibase++)
104 {
105 double bl_start = gravi_pfits_get_projected_baseline_start(header, GRAVI_BASE_TEL[ibase][0]+1, GRAVI_BASE_TEL[ibase][1]+1);
106 double bl_end = gravi_pfits_get_projected_baseline_end(header, GRAVI_BASE_TEL[ibase][0]+1, GRAVI_BASE_TEL[ibase][1]+1);
107 cpl_vector_set(baselines, 2*ibase, bl_start);
108 cpl_vector_set(baselines, 2*ibase + 1, bl_end);
109 }
110 double base_max = cpl_vector_get_max(baselines);
111 double base_min = cpl_vector_get_min(baselines);
112 cpl_vector_delete(baselines);
113
114 sprintf (qc_name, "BASE_MAX");
115 cpl_propertylist_update_double (idp_plist, qc_name, base_max);
116 cpl_propertylist_set_comment (idp_plist, qc_name, "[m] Maximum baseline");
117
118 sprintf (qc_name, "BASE_MIN");
119 cpl_propertylist_update_double (idp_plist, qc_name, base_min);
120 cpl_propertylist_set_comment (idp_plist, qc_name, "[m] Minimum baseline");
121
122 /* The rows in oi_wave_SC_allpol contain each wavelenght npol_sc times,
123 since it has been aggregated. Therefore dividing by npol_sc times */
124 sprintf (qc_name, "NUM_CHAN");
125 cpl_propertylist_update_int (idp_plist, qc_name, cpl_table_get_nrow(oi_wave_SC_allpol) / npol_sc );
126 cpl_propertylist_set_comment (idp_plist, qc_name, "Number of wavelength channels");
127
128 /* Compute wavelength range */
129 double min_eff_wave = cpl_table_get_column_min(oi_wave_SC_allpol, "EFF_WAVE");
130 double max_eff_wave = cpl_table_get_column_max(oi_wave_SC_allpol, "EFF_WAVE");
131 int null_flag;
132 sprintf (qc_name, "WAVELMAX");
133 cpl_size max_eff_wave_pos;
134 cpl_table_get_column_maxpos(oi_wave_SC_allpol, "EFF_WAVE", &max_eff_wave_pos);
135 double band_max_eff_wave = cpl_table_get_float(oi_wave_SC_allpol, "EFF_BAND", max_eff_wave_pos, &null_flag);
136 cpl_propertylist_update_double (idp_plist, qc_name, (max_eff_wave + band_max_eff_wave / 2.) * 1e9);
137 cpl_propertylist_set_comment (idp_plist, qc_name, "[nm] Maximum wavelength");
138
139 sprintf (qc_name, "WAVELMIN");
140 cpl_size min_eff_wave_pos;
141 cpl_table_get_column_minpos(oi_wave_SC_allpol, "EFF_WAVE", &min_eff_wave_pos);
142 double band_min_eff_wave = cpl_table_get_float(oi_wave_SC_allpol, "EFF_BAND", min_eff_wave_pos, &null_flag);
143 cpl_propertylist_update_double (idp_plist, qc_name, (min_eff_wave - band_min_eff_wave / 2.) * 1e9);
144 cpl_propertylist_set_comment (idp_plist, qc_name, "[nm] Minimum wavelength");
145
146 double spec_bin =0;
147 for (int pol = 0; pol < npol_sc; pol++) {
148 cpl_table * this_wave_table = gravi_data_get_oi_wave (vis_data, GRAVI_SC, pol, npol_sc);
149 double this_spec_bin = cpl_table_get_column_mean(this_wave_table, "EFF_BAND");
150 if (this_spec_bin > spec_bin)
151 spec_bin = this_spec_bin;
152 }
153 sprintf (qc_name, "SPEC_BIN");
154 cpl_propertylist_update_double (idp_plist, qc_name, spec_bin * 1e9);
155 cpl_propertylist_set_comment (idp_plist, qc_name, "[nm] Average spectral coordinate bin size");
156
157 cpl_table_duplicate_column(oi_wave_SC_allpol, "SPEC_RES", oi_wave_SC_allpol, "EFF_WAVE");
158 cpl_table_divide_columns(oi_wave_SC_allpol,"SPEC_RES", "EFF_BAND");
159
160 sprintf (qc_name, "SPEC_RES");
161 cpl_propertylist_update_double (idp_plist, qc_name, cpl_table_get_column_mean(oi_wave_SC_allpol, "SPEC_RES"));
162 cpl_propertylist_set_comment (idp_plist, qc_name, "Spectral resolution");
163
164 /* This is the mean INT_TIME, which includes duplicated entries due to the several polarizations.
165 Since it is a mean, the final value should be the same */
166 sprintf (qc_name, "EXPTIME");
167 double mean_int_time = 0.0;
168 cpl_size valid_elem = 0;
169 cpl_size nrow = cpl_table_get_nrow (oi_vis2_SC_allpol);
170 double * inttime = cpl_table_get_data_double (oi_vis2_SC_allpol, "INT_TIME");
171 for (cpl_size r=0; r<nrow;r++)
172 {
173 if (inttime[r])
174 {
175 mean_int_time += inttime[r];
176 valid_elem++;
177 }
178 }
179
180 if(valid_elem)
181 mean_int_time = mean_int_time / valid_elem;
182 cpl_propertylist_update_double (idp_plist, qc_name, mean_int_time);
183 cpl_propertylist_set_comment (idp_plist, qc_name, "Exposure time");
184 /* This is the sum of all INT_TIME divided by the number of baselines. The mean is multiplied
185 by the number of rows and then divided by the number of polarizations since they have been
186 aggregated. Finally divided by the number of baselines as specified in PIPE-9900 */
187 if(!cpl_propertylist_has(header, "TEXPTIME"))
188 {
189 double texptime = 0;
190 for (int pol = 0; pol < npol_sc; pol++) {
191 cpl_table * this_pol_table = gravi_data_get_oi_vis2 (vis_data, GRAVI_SC, pol, npol_sc);
192 double this_pol_texptime = 0;
193 cpl_size nsets = cpl_table_get_nrow(this_pol_table) / GRAVI_NBASE ;
194 for (cpl_size set = 0 ; set < nsets ; set++)
195 {
196 cpl_table * int_time_this_set = cpl_table_extract(this_pol_table, GRAVI_NBASE * set, GRAVI_NBASE);
197 double max_int_time = gravi_table_get_column_flagged_max(int_time_this_set, "INT_TIME");
198 this_pol_texptime += max_int_time;
199 cpl_table_delete(int_time_this_set);
200 }
201 texptime = fmax(texptime, this_pol_texptime);
202 }
203
204 sprintf (qc_name, "TEXPTIME");
205 cpl_propertylist_update_double (idp_plist, qc_name, texptime);
206 cpl_propertylist_set_comment (idp_plist, qc_name, "Total exposure time");
207 }
208 else
209 {
210 cpl_propertylist_update_double (idp_plist, "TEXPTIME",
211 cpl_propertylist_get_double(header, "TEXPTIME") );
212 cpl_propertylist_set_comment (idp_plist, "TEXPTIME", "Total exposure time");
213 }
214 }
215
216 /* PRODCATG */
217 cpl_propertylist_update_string (idp_plist, "PRODCATG", "SCIENCE.VISIBILITY");
218 cpl_propertylist_set_comment (idp_plist, "PRODCATG", "Data product category");
219
220 /* VISCAL */
221 if(input_data_type != NULL)
222 {
223 if(strcmp(input_data_type, "raw_science") == 0 || strcmp(input_data_type, "raw_calibrator") == 0 )
224 {
225 cpl_propertylist_update_string (idp_plist, "VISCAL", "UNCALIBRATED");
226 cpl_propertylist_set_comment (idp_plist, "VISCAL", "Type of visibilities");
227 }
228 if(strcmp(input_data_type, "vis_science") == 0 || strcmp(input_data_type, "vis_calibrator") == 0 )
229 {
230 cpl_propertylist_update_string (idp_plist, "VISCAL", "CALIBRATED");
231 cpl_propertylist_set_comment (idp_plist, "VISCAL", "Type of visibilities");
232 }
233 }
234
235 /* MJD-OBS */
236 double mjd_obs_first = DBL_MAX;
237 if(frameset != NULL)
238 {
239 const cpl_frame *frame;
240 cpl_frameset * science_frames = gravi_frameset_extract_fringe_data(frameset);
241 cpl_frameset_iterator *it = cpl_frameset_iterator_new(science_frames);
242 while ((frame = cpl_frameset_iterator_get(it)) != NULL) {
243 cpl_propertylist * this_frame_header = cpl_propertylist_load(cpl_frame_get_filename(frame), 0);
244 double mjd_obs = gravi_pfits_get_mjd(this_frame_header);
245 if (mjd_obs < mjd_obs_first)
246 mjd_obs_first = mjd_obs;
247 cpl_frameset_iterator_advance(it, 1);
248 cpl_propertylist_delete(this_frame_header);
249 }
250 cpl_frameset_delete(science_frames);
251 cpl_frameset_iterator_delete(it);
252 }
253 if (mjd_obs_first == DBL_MAX)
254 mjd_obs_first = gravi_pfits_get_mjd(header);
255 cpl_propertylist_update_double (idp_plist, "MJD-OBS", mjd_obs_first);
256 cpl_propertylist_set_comment (idp_plist, "MJD-OBS", "Start of observation");
257
258 /* MJD-END */
259 double mjd_obs_last = 0;
260 double exptime_last = 0;
261 if(frameset != NULL)
262 {
263 const cpl_frame *frame;
264 cpl_frameset * science_frames = gravi_frameset_extract_fringe_data(frameset);
265 cpl_frameset_iterator *it = cpl_frameset_iterator_new(science_frames);
266 while ((frame = cpl_frameset_iterator_get(it)) != NULL) {
267 cpl_propertylist * this_frame_header = cpl_propertylist_load(cpl_frame_get_filename(frame), 0);
268 double mjd_obs = gravi_pfits_get_mjd(this_frame_header);
269 if (mjd_obs > mjd_obs_last)
270 {
271 mjd_obs_last = mjd_obs;
272 exptime_last = cpl_propertylist_get_double(this_frame_header, "EXPTIME");
273 }
274 cpl_frameset_iterator_advance(it, 1);
275 cpl_propertylist_delete(this_frame_header);
276 }
277 cpl_frameset_delete(science_frames);
278 cpl_frameset_iterator_delete(it);
279 }
280 if (mjd_obs_last == 0)
281 mjd_obs_last = gravi_pfits_get_mjd(header);
282 if (exptime_last == 0)
283 {
284 if ( cpl_propertylist_has(header, "EXPTIME") )
285 exptime_last = cpl_propertylist_get_double(header, "EXPTIME");
286 else
287 exptime_last = cpl_propertylist_get_double(idp_plist, "EXPTIME");
288 }
289
290 cpl_propertylist_update_double (idp_plist, "MJD-END",
291 mjd_obs_last + exptime_last / 86400.);
292 cpl_propertylist_set_comment (idp_plist, "MJD-END", "End of observation");
293
294 /* Delete MJD-OBS from the main header, since it will take precedence over what is computed here*/
295 cpl_propertylist_erase (header, "MJD-OBS");
296
297 /* OBID */
298 cpl_propertylist_update_int (idp_plist, "OBID1",
299 cpl_propertylist_get_int(header, "ESO OBS ID"));
300 cpl_propertylist_set_comment (idp_plist, "OBID1", "Obseration Block ID");
301
302 /* NCOMBINE */
303 if(frameset != NULL)
304 {
305 cpl_frameset * science_frames = gravi_frameset_extract_fringe_data(frameset);
306 cpl_size nscience = cpl_frameset_get_size(science_frames);
307 cpl_frameset_delete(science_frames);
308 if(!cpl_propertylist_has(header, "NCOMBINE"))
309 {
310 if (nscience != 0)
311 {
312 cpl_propertylist_update_int (idp_plist, "NCOMBINE", nscience);
313 cpl_propertylist_set_comment (idp_plist, "NCOMBINE", "Number of raw science combined");
314 }
315 }
316 else
317 {
318 cpl_propertylist_update_int (idp_plist, "NCOMBINE",
319 cpl_propertylist_get_int(header, "NCOMBINE") );
320 cpl_propertylist_set_comment (idp_plist, "NCOMBINE", "Number of raw science combined");
321 }
322 }
323 /* OBSTECH */
324 // Only create OBSTECH if it does not exist yet.
325 // This is needed for For gravity_viscal which starts from
326 // products and does not have a ESO DPR TECH anymore
327 if(cpl_propertylist_has(header, "ESO DPR TECH"))
328 {
329 cpl_propertylist_update_string (idp_plist, "OBSTECH",
330 cpl_propertylist_get_string(header, "ESO DPR TECH") );
331 cpl_propertylist_set_comment (idp_plist, "OBSTECH", "Observation technique");
332 }
333 else if(cpl_propertylist_has(header, "OBSTECH"))
334 {
335 cpl_propertylist_update_string (idp_plist, "OBSTECH",
336 cpl_propertylist_get_string(header, "OBSTECH") );
337 cpl_propertylist_set_comment (idp_plist, "OBSTECH", "Observation technique");
338 }
339
340 /* SPECSYS */
341 cpl_propertylist_update_string (idp_plist, "SPECSYS", "TOPOCENT");
342 cpl_propertylist_set_comment (idp_plist, "SPECSYS", "Frame of reference for spectral coordinates");
343
344 /* TIMESYS */
345 cpl_propertylist_update_string (idp_plist, "TIMESYS", "UTC");
346 cpl_propertylist_set_comment (idp_plist, "TIMESYS", "Time system");
347
348 /* SPEC_ERR */
349 /* According to https://jira.eso.org/browse/PIPE-9900 this
350 is hard-coded depending on resolution */
351 double spec_err = 0;
352 const char * resolution = gravi_pfits_get_resolution (header);
353 if ( !strcmp (resolution, "HIGH") )
354 spec_err = 0.28;
355 if ( !strcmp (resolution, "MED") )
356 spec_err = 2.2;
357 if ( !strcmp (resolution, "LOW") )
358 spec_err = 50;
359 cpl_propertylist_update_double (idp_plist, "SPEC_ERR", spec_err);
360 cpl_propertylist_set_comment (idp_plist, "SPEC_ERR", "Statistical error in spectral coordinate");
361
362 /* SPEC_SYE */
363 /* Hard-coded to the values in Sanchez-Bermudez et al. 2017 */
364 cpl_propertylist_update_double (idp_plist, "SPEC_SYE", 0.1);
365 cpl_propertylist_set_comment (idp_plist, "SPEC_SYE", "Systematic error in spectral coordinate");
366
367 /* PROV keywords */
368 if(frameset != NULL)
369 {
370 const cpl_frame *frame;
371 size_t i_prov = 1;
372 char prov_keyword[8];
373 cpl_frameset_iterator *it = cpl_frameset_iterator_new(frameset);
374 while ((frame = cpl_frameset_iterator_get(it)) != NULL) {
375 if (strcmp(cpl_frame_get_tag(frame), GRAVI_SINGLE_SCIENCE_RAW) == 0 ||
376 strcmp(cpl_frame_get_tag(frame), GRAVI_DUAL_SCIENCE_RAW) == 0 ||
377 strcmp(cpl_frame_get_tag(frame), GRAVI_SINGLE_CALIB_RAW) == 0 ||
378 strcmp(cpl_frame_get_tag(frame), GRAVI_DUAL_CALIB_RAW) == 0 ||
379 strcmp(cpl_frame_get_tag(frame), GRAVI_VIS_DUAL_SCIENCE) == 0 ||
380 strcmp(cpl_frame_get_tag(frame), GRAVI_VIS_SINGLE_SCIENCE) == 0)
381 {
382 snprintf(prov_keyword, 7, "PROV%zu",i_prov);
383 const char * filename = cpl_frame_get_filename(frame);
384 const char * filename_no_path = strrchr(filename, '/');
385 if (filename_no_path == NULL)
386 filename_no_path = filename;
387 else
388 filename_no_path += 1;
389 cpl_propertylist_update_string(idp_plist, prov_keyword, filename_no_path);
390 i_prov++;
391 }
392 cpl_frameset_iterator_advance(it, 1);
393 }
394 cpl_frameset_iterator_delete(it);
395 }
396
398 {
399 cpl_table * oi_array = gravi_data_get_table (vis_data, GRAVI_OI_ARRAY_EXT);
400 if(!cpl_table_has_column(oi_array, "FOV"))
401 {
402 cpl_table_new_column(oi_array, "FOV", CPL_TYPE_DOUBLE);
403 cpl_table_new_column(oi_array, "FOVTYPE", CPL_TYPE_STRING);
404 double fov;
405 const char * telname = gravi_conf_get_telname (0, header);
406 if (telname == NULL) {
407 cpl_msg_warning(cpl_func, "Cannot get TELNAME, FOV is not determined");
408 fov = 0.0;
409 } else {
410 if (telname[0] == 'U')
411 fov = 0.0285; // Hard-coded UT FOV
412 else
413 fov = 0.126; // Hard-coded AT FOV
414 }
415
416 cpl_table_fill_column_window_double(oi_array, "FOV", 0, cpl_table_get_nrow(oi_array), fov);
417 cpl_table_fill_column_window_string(oi_array, "FOVTYPE", 0, cpl_table_get_nrow(oi_array),"RADIUS");
418 cpl_table_set_column_unit(oi_array, "FOV", "arcsec");
419 }
420 }
421
422 /* Delete scratch tables */
423 cpl_table_delete(oi_vis2_SC_allpol);
424 cpl_table_delete(oi_T3_SC_allpol);
425 cpl_table_delete(oi_wave_SC_allpol);
426
427 return idp_plist;
428}
429
typedefCPL_BEGIN_DECLS struct _gravi_data_ gravi_data
Definition: gravi_data.h:39
#define gravi_data_get_oi_t3(data, type, pol, npol)
Definition: gravi_data.h:48
#define gravi_data_get_oi_vis2(data, type, pol, npol)
Definition: gravi_data.h:47
#define gravi_data_get_oi_wave(data, type, pol, npol)
Definition: gravi_data.h:45
#define gravi_data_get_oi_vis(data, type, pol, npol)
Definition: gravi_data.h:46
#define GRAVI_SINGLE_SCIENCE_RAW
Definition: gravi_dfs.h:52
#define GRAVI_VIS_DUAL_SCIENCE
Definition: gravi_dfs.h:98
#define GRAVI_VIS_SINGLE_SCIENCE
Definition: gravi_dfs.h:96
#define GRAVI_DUAL_CALIB_RAW
Definition: gravi_dfs.h:53
#define GRAVI_SINGLE_CALIB_RAW
Definition: gravi_dfs.h:51
#define GRAVI_DUAL_SCIENCE_RAW
Definition: gravi_dfs.h:54
cpl_propertylist * gravi_idp_compute(gravi_data *vis_data, cpl_propertylist *header, cpl_frameset *frameset, char *input_data_type)
Create IDP keywords to satisfy standard.
Definition: gravi_idp.c:47
cpl_propertylist * header
Definition: gravi_old.c:2004
cpl_propertylist_update_double(header, "ESO QC MINWAVE SC", cpl_propertylist_get_double(plist, "ESO QC MINWAVE SC"))
#define GRAVI_OI_VIS2_EXT
Definition: gravi_pfits.h:95
#define GRAVI_OI_ARRAY_EXT
Definition: gravi_pfits.h:83
#define GRAVI_SC
Definition: gravi_pfits.h:165
#define GRAVI_NBASE
Definition: gravi_utils.h:105
double gravi_table_get_column_flagged_mean(cpl_table *table, const char *name)
Function to compute the mean of a column table with arrays.
Definition: gravi_cpl.c:217
double gravi_table_get_column_flagged_max(cpl_table *table, const char *name)
Function to compute the maximum of a column table with arrays.
Definition: gravi_cpl.c:290
int gravi_data_has_extension(gravi_data *raw_calib, const char *ext_name)
Check if data has extension with given EXTNAME.
Definition: gravi_data.c:1808
cpl_table * gravi_data_get_table(gravi_data *self, const char *extname)
Return a pointer on a table extension by its EXTNAME.
Definition: gravi_data.c:2096
cpl_frameset * gravi_frameset_extract_fringe_data(cpl_frameset *frameset)
Definition: gravi_dfs.c:1320
int gravi_pfits_get_pola_num(const cpl_propertylist *plist, int type_data)
Definition: gravi_pfits.c:263
double gravi_pfits_get_projected_baseline_end(const cpl_propertylist *plist, int tel1, int tel2)
Definition: gravi_pfits.c:805
double gravi_pfits_get_projected_baseline_start(const cpl_propertylist *plist, int tel1, int tel2)
Definition: gravi_pfits.c:794
double gravi_pfits_get_mjd(const cpl_propertylist *plist)
Definition: gravi_pfits.c:526
const char * gravi_pfits_get_resolution(const cpl_propertylist *plist)
Definition: gravi_pfits.c:155
const char * gravi_conf_get_telname(int gravi_beam, cpl_propertylist *header)
Definition: gravi_utils.c:1191
int GRAVI_BASE_TEL[GRAVI_NBASE][2]
Definition: gravi_utils.c:56
cpl_error_code gravi_data_get_minmax_uvcoord(const cpl_table *oi_vis2, double *min_uvcoord, double *max_uvcoord)
Compute the minimum and maximum values of sqrt(ucoord**2 + vcoord**2)
Definition: gravi_vis.c:2561