GRAVI Pipeline Reference Manual 1.10.1
Loading...
Searching...
No Matches
gravi_data.h File Reference
#include <cpl.h>
#include <stdio.h>
#include <string.h>
#include "gravi_pfits.h"

Go to the source code of this file.

Macros

#define gravi_data_get_oi_wave(data, type, pol, npol)
 
#define gravi_data_get_oi_vis(data, type, pol, npol)
 
#define gravi_data_get_oi_vis2(data, type, pol, npol)
 
#define gravi_data_get_oi_t3(data, type, pol, npol)
 
#define gravi_data_get_oi_flux(data, type, pol, npol)
 
#define gravi_data_get_wave_fibre(data, type)
 
#define gravi_data_get_wave_fibre_plist(data, type)
 
#define gravi_data_get_wave_data(data, type)
 
#define gravi_data_get_wave_data_plist(data, type)
 
#define gravi_data_has_wave(data, type)
 
#define gravi_data_get_p2vm_data(data, type)
 
#define gravi_data_has_p2vm(data, type)
 
#define gravi_data_get_imaging_detector(data, type)
 
#define gravi_data_has_detector(data, type)
 
#define gravi_data_get_spectrum_data(data, type)
 
#define gravi_data_get_spectrum_data_plist(data, type)
 
#define gravi_data_has_spectrum(data, type)
 
#define gravi_data_get_profile_plist(data)
 
#define gravi_data_get_oi_wave_plist(data, type, pol, npol)
 
#define gravi_data_get_oi_vis_plist(data, type, pol, npol)
 
#define gravi_data_get_oi_vis2_plist(data, type, pol, npol)
 
#define gravi_data_get_oi_t3_plist(data, type, pol, npol)
 
#define gravi_data_get_oi_flux_plist(data, type, pol, npol)
 
#define gravi_data_get_header(data)
 
#define gravi_data_get_extname(data, ext)
 
#define gravi_data_get_qc(data)
 
#define gravi_data_is_internal(data)
 
#define gravi_data_get_img(data, ext)
 
#define gravi_data_get_spec_res(data)
 

Typedefs

typedef typedefCPL_BEGIN_DECLS struct _gravi_data_ gravi_data
 

Functions

gravi_datagravi_data_new (int)
 Create an empty gravi_data.
 
gravi_datagravi_data_duplicate (const gravi_data *)
 Create a copy of the gravi data.
 
cpl_error_code gravi_data_append (gravi_data *first, const gravi_data *second, int force)
 Append a gravi_data into another existing one.
 
void gravi_data_delete (gravi_data *)
 Delete a gravi data.
 
gravi_datagravi_data_load (const char *filename)
 Low-level function to load FITS file.
 
gravi_datagravi_data_load_ext (const char *filename, const char *extensions_regexp)
 Low-level function to load FITS file.
 
gravi_datagravi_data_load_frame (cpl_frame *frame, cpl_frameset *used_frameset)
 Load a FITS file and create a gravi_data.
 
int gravi_data_patch (gravi_data *file_to_patch, cpl_frameset *patch_frameset)
 Load a RAW FITS file and create a gravi_data.
 
gravi_datagravi_data_load_rawframe (cpl_frame *frame, cpl_frameset *used_frameset)
 Load a RAW FITS file and create a gravi_data.
 
gravi_datagravi_data_load_rawframe_ext (cpl_frame *frame, cpl_frameset *used_frameset, const char *extensions_regexp)
 Load a RAW FITS file and create a gravi_data from specified extensions.
 
cpl_error_code gravi_data_save_new (gravi_data *self, cpl_frameset *allframes, const char *filename, const char *suffix, const cpl_parameterlist *parlist, cpl_frameset *usedframes, cpl_frame *frame, const char *recipe, cpl_propertylist *applist, const char *proCatg)
 Save a gravi data in a CPL-complian FITS file.
 
cpl_error_code gravi_data_save_data (gravi_data *, const char *, unsigned)
 Save a gravi data in a FITS file.
 
int gravi_data_has_extension (gravi_data *, const char *)
 Check if data has extension with given EXTNAME.
 
int gravi_data_has_type (gravi_data *self, const char *type)
 Return the number of ext whose EXTNAME and INSNAME match 'type'.
 
int gravi_data_get_size (const gravi_data *)
 Get the number of extension in a gravi_data.
 
cpl_propertylist * gravi_data_get_plist (gravi_data *, const char *)
 Get the propertylist from EXTNAME.
 
cpl_propertylist * gravi_data_get_plist_x (gravi_data *, int)
 Get the propertylist of an extension by position.
 
cpl_table * gravi_data_get_table_x (gravi_data *, int)
 Get the table of an extension by position.
 
cpl_imagelist * gravi_data_get_cube_x (gravi_data *, int)
 Get the cube of an extension by position.
 
cpl_table * gravi_data_get_table (gravi_data *, const char *)
 Return a pointer on a table extension by its EXTNAME.
 
cpl_imagelist * gravi_data_get_cube (gravi_data *, const char *)
 Return a pointer on an IMAGE extension by its EXTNAME.
 
cpl_propertylist * gravi_data_get_oi_plist (gravi_data *, const char *, const char *)
 Get the propertylist from EXTNAME and INSNAME.
 
cpl_table * gravi_data_get_oi_table (gravi_data *, const char *, const char *)
 Get an OI_FITS table from EXTNAME and INSNAME.
 
cpl_table ** gravi_data_get_oiwave_tables (gravi_data *data, int type_data, int npol)
 Get pointer to the OI_WAVELENGTH tables of both polarisations.
 
cpl_propertylist * gravi_data_get_extra_primary_header (gravi_data *)
 Get the propertylist for additional keywords to the primary header.
 
cpl_error_code gravi_data_erase_x (gravi_data *, int)
 Erase an extension by its position.
 
cpl_error_code gravi_data_erase (gravi_data *, const char *)
 Erase an extension by its EXTNAME.
 
cpl_error_code gravi_data_erase_type (gravi_data *self, const char *type)
 Erase all extension related to an instrument (SC, FT, MET...)
 
cpl_error_code gravi_data_add_table (gravi_data *self, cpl_propertylist *plist, const char *extname, cpl_table *table)
 Add a BINTABLE extension in gravi_data.
 
cpl_error_code gravi_data_add_cube (gravi_data *self, cpl_propertylist *plist, const char *extname, cpl_imagelist *imglist)
 Add an IMAGE (imagelist) extension in gravi_data.
 
cpl_error_code gravi_data_add_img (gravi_data *self, cpl_propertylist *plist, const char *extname, cpl_image *image)
 Add an IMAGE (single image) extension in gravi_data.
 
cpl_error_code gravi_data_copy_ext (gravi_data *output, gravi_data *input, const char *name)
 Copy extensions from one data to another.
 
cpl_error_code gravi_data_copy_ext_i (gravi_data *output, gravi_data *input, cpl_size num)
 Copy extensions from one data to another.
 
cpl_error_code gravi_data_copy_ext_insname (gravi_data *output, gravi_data *input, const char *name, const char *insname)
 Copy extensions from one data to another.
 
cpl_error_code gravi_data_move_ext (gravi_data *output, gravi_data *input, const char *name)
 Move extensions from one data to another.
 
cpl_error_code gravi_data_clean_for_astro (gravi_data *data)
 Clean the data to keep only OIFITS extensions related to SC.
 
cpl_error_code gravi_data_check_consistency (gravi_data *data)
 Verify the integrity of RAW data.
 
cpl_error_code gravi_data_detector_cleanup (gravi_data *data, const cpl_parameterlist *parlist)
 Perform self-bias correction to the SC raw data.
 
cpl_error_code gravi_data_dump (gravi_data *self)
 Dump the overall structure of a gravi_data in stdout.
 
cpl_error_code gravi_data_dump_mode (gravi_data *data)
 Dump some information about data in messagin.
 

Macro Definition Documentation

◆ gravi_data_get_extname

#define gravi_data_get_extname ( data,
ext )
Value:
cpl_propertylist * gravi_data_get_plist_x(gravi_data *self, int i)
Get the propertylist of an extension by position.
const char * gravi_pfits_get_extname(const cpl_propertylist *plist)

Definition at line 76 of file gravi_data.h.

Referenced by gravi_vis_force_time(), and gravi_vis_mjd_to_time().

◆ gravi_data_get_header

#define gravi_data_get_header ( data)
Value:
#define GRAVI_PRIMARY_HDR_EXT
Definition gravi-test.h:212
cpl_propertylist * gravi_data_get_plist(gravi_data *self, const char *extname)
Get the propertylist from EXTNAME.

Definition at line 75 of file gravi_data.h.

Referenced by gravi_align_spectrum(), gravi_astrometry_load(), gravi_average_vis(), gravi_calib_setupstring(), gravi_calibrate_vis(), gravi_compute_badpix(), gravi_compute_biasmask(), gravi_compute_dark(), gravi_compute_disp(), gravi_compute_disp_old(), gravi_compute_flat_badpix(), gravi_compute_gain(), gravi_compute_opdc_state(), gravi_compute_outliers(), gravi_compute_p2vm(), gravi_compute_p2vmred(), gravi_compute_pca(), gravi_compute_piezotf(), gravi_compute_pointing_uv(), gravi_compute_profile(), gravi_compute_qc_ft_opd_estimator(), gravi_compute_qc_injection(), gravi_compute_rejection(), gravi_compute_signals(), gravi_compute_snr(), gravi_compute_tau0(), gravi_compute_tf(), gravi_compute_tf_qc(), gravi_compute_vis(), gravi_compute_vis_qc(), gravi_compute_wave(), gravi_compute_wave_offset(), gravi_copy_p2vm_qcs(), gravi_create_p2vm(), gravi_data_check_consistency(), gravi_data_check_shutter_beam(), gravi_data_detector_cleanup(), gravi_data_dump_mode(), gravi_data_save_new(), gravi_disp_cleanup(), gravi_extract_spectrum(), gravi_fit_argon(), gravi_flat_flux(), gravi_flatten_vis(), gravi_force_uncertainties(), gravi_lazer_get_wavelength(), gravi_metrology_demodulate(), gravi_metrology_reduce(), gravi_normalize_flux(), gravi_normalize_sc_to_ft(), gravi_p2vm_normalisation(), gravi_p2vm_phase_correction(), gravi_p2vm_transmission(), gravi_reduce_acqcam(), gravi_smooth_preproc(), gravi_vis_copy_fluxdata(), gravi_vis_resamp(), gravi_vis_smooth(), gravi_visdata_fromellipse(), gravi_wave_compute_opds(), gravi_wave_correct_color(), gravi_wave_qc(), gravity_disp(), gravity_p2vm(), gravity_pcacal(), gravity_vis(), gravity_viscal(), and gravity_wavelamp().

◆ gravi_data_get_imaging_detector

#define gravi_data_get_imaging_detector ( data,
type )
Value:
#define GRAVI_IMAGING_DETECTOR_FT_EXT
Definition gravi_pfits.h:50
#define GRAVI_SC
#define GRAVI_IMAGING_DETECTOR_SC_EXT
Definition gravi_pfits.h:49
cpl_table * gravi_data_get_table(gravi_data *self, const char *extname)
Return a pointer on a table extension by its EXTNAME.

Definition at line 60 of file gravi_data.h.

Referenced by gravi_align_spectrum(), gravi_compute_p2vm(), gravi_compute_p2vmred(), gravi_compute_wave(), gravi_create_p2vm(), gravi_p2vm_normalisation(), gravi_visdata_fromellipse(), gravi_wave_compute_opds(), and gravi_wave_qc().

◆ gravi_data_get_img

#define gravi_data_get_img ( data,
ext )
Value:
cpl_imagelist_get (gravi_data_get_cube (data,ext), 0)
cpl_imagelist * gravi_data_get_cube(gravi_data *self, const char *extname)
Return a pointer on an IMAGE extension by its EXTNAME.

Definition at line 79 of file gravi_data.h.

Referenced by gravi_average_dark(), gravi_compute_badpix(), gravi_compute_biasmask(), gravi_compute_gain(), gravi_compute_profile(), gravi_extract_spectrum(), gravi_preproc_acqcam(), and gravi_reduce_acqcam().

◆ gravi_data_get_oi_flux

#define gravi_data_get_oi_flux ( data,
type,
pol,
npol )
Value:
#define GRAVI_INSNAME(type, pol, npol)
#define GRAVI_OI_FLUX_EXT
Definition gravi_pfits.h:93
cpl_table * gravi_data_get_oi_table(gravi_data *self, const char *extname, const char *insname)
Get an OI_FITS table from EXTNAME and INSNAME.

Definition at line 49 of file gravi_data.h.

Referenced by gravi_average_vis(), gravi_compute_disp(), gravi_compute_opdc_state(), gravi_compute_outliers(), gravi_compute_qc_injection(), gravi_compute_signals(), gravi_compute_vis(), gravi_compute_vis_qc(), gravi_disp_cleanup(), gravi_force_uncertainties(), gravi_normalize_flux(), gravi_p2vm_transmission(), gravi_vis_copy_fluxdata(), gravi_vis_resamp(), and gravi_vis_smooth().

◆ gravi_data_get_oi_flux_plist

#define gravi_data_get_oi_flux_plist ( data,
type,
pol,
npol )
Value:
cpl_propertylist * gravi_data_get_oi_plist(gravi_data *self, const char *extname, const char *insname)
Get the propertylist from EXTNAME and INSNAME.

Definition at line 73 of file gravi_data.h.

Referenced by gravi_p2vm_transmission().

◆ gravi_data_get_oi_t3

#define gravi_data_get_oi_t3 ( data,
type,
pol,
npol )

◆ gravi_data_get_oi_t3_plist

#define gravi_data_get_oi_t3_plist ( data,
type,
pol,
npol )
Value:

Definition at line 72 of file gravi_data.h.

◆ gravi_data_get_oi_vis

◆ gravi_data_get_oi_vis2

#define gravi_data_get_oi_vis2 ( data,
type,
pol,
npol )

◆ gravi_data_get_oi_vis2_plist

#define gravi_data_get_oi_vis2_plist ( data,
type,
pol,
npol )
Value:

Definition at line 71 of file gravi_data.h.

◆ gravi_data_get_oi_vis_plist

#define gravi_data_get_oi_vis_plist ( data,
type,
pol,
npol )
Value:

Definition at line 70 of file gravi_data.h.

Referenced by gravi_compute_disp(), and gravi_compute_vis().

◆ gravi_data_get_oi_wave

◆ gravi_data_get_oi_wave_plist

#define gravi_data_get_oi_wave_plist ( data,
type,
pol,
npol )

◆ gravi_data_get_p2vm_data

#define gravi_data_get_p2vm_data ( data,
type )

◆ gravi_data_get_profile_plist

#define gravi_data_get_profile_plist ( data)
Value:

Definition at line 67 of file gravi_data.h.

◆ gravi_data_get_qc

#define gravi_data_get_qc ( data)
Value:
cpl_propertylist * gravi_plist_get_qc(cpl_propertylist *header)
Extract QC parameters.

Definition at line 77 of file gravi_data.h.

Referenced by gravi_data_save_new().

◆ gravi_data_get_spec_res

#define gravi_data_get_spec_res ( data)
Value:
const char * gravi_pfits_get_spec_res(const cpl_propertylist *plist)

Definition at line 80 of file gravi_data.h.

Referenced by gravity_viscal().

◆ gravi_data_get_spectrum_data

◆ gravi_data_get_spectrum_data_plist

#define gravi_data_get_spectrum_data_plist ( data,
type )

◆ gravi_data_get_wave_data

#define gravi_data_get_wave_data ( data,
type )
Value:
#define GRAVI_WAVE_DATA_FT_EXT
Definition gravi_pfits.h:64
#define GRAVI_WAVE_DATA_SC_EXT
Definition gravi_pfits.h:65

Definition at line 53 of file gravi_data.h.

Referenced by gravi_align_spectrum(), gravi_create_p2vm(), and gravi_wave_qc().

◆ gravi_data_get_wave_data_plist

#define gravi_data_get_wave_data_plist ( data,
type )
Value:

Definition at line 54 of file gravi_data.h.

Referenced by gravi_wave_qc().

◆ gravi_data_get_wave_fibre

#define gravi_data_get_wave_fibre ( data,
type )
Value:
#define GRAVI_WAVE_FIBRE_SC_EXT
Definition gravi_pfits.h:69
#define GRAVI_WAVE_FIBRE_FT_EXT
Definition gravi_pfits.h:68

Definition at line 51 of file gravi_data.h.

Referenced by gravi_wave_qc().

◆ gravi_data_get_wave_fibre_plist

#define gravi_data_get_wave_fibre_plist ( data,
type )

◆ gravi_data_has_detector

#define gravi_data_has_detector ( data,
type )
Value:
int gravi_data_has_extension(gravi_data *raw_calib, const char *ext_name)
Check if data has extension with given EXTNAME.

Definition at line 61 of file gravi_data.h.

Referenced by gravi_extract_spectrum().

◆ gravi_data_has_p2vm

#define gravi_data_has_p2vm ( data,
type )

◆ gravi_data_has_spectrum

#define gravi_data_has_spectrum ( data,
type )

◆ gravi_data_has_wave

#define gravi_data_has_wave ( data,
type )

◆ gravi_data_is_internal

#define gravi_data_is_internal ( data)
Value:
int gravi_pfits_is_calib(const cpl_propertylist *plist)

Definition at line 78 of file gravi_data.h.

Referenced by gravi_compute_tf(), and gravi_extract_spectrum().

Typedef Documentation

◆ gravi_data

typedef typedefCPL_BEGIN_DECLS struct _gravi_data_ gravi_data

Definition at line 39 of file gravi_data.h.