GRAVI Pipeline Reference Manual 1.7.2
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
gravi_data.c File Reference
#include <cpl.h>
#include <stdio.h>
#include <string.h>
#include <config.h>
#include <ctype.h>
#include <time.h>
#include <math.h>
#include <regex.h>
#include "gravi_dfs.h"
#include "gravi_data.h"
#include "gravi_pfits.h"
#include "gravi_utils.h"
#include "gravi_cpl.h"

Go to the source code of this file.

Data Structures

struct  _gravi_data_
 

Macros

#define GRAVI_DATA_SIZE   30
 

Functions

int gravi_data_is_oi_ext (cpl_propertylist *hdr)
 Check if EXTNAME starts with 'OI_' (OIFITS extension)
 
cpl_error_code gravi_data_check_savetypes (cpl_propertylist *hdr, cpl_table *oi_table)
 Set the savetypes of the OIFITS table.
 
int gravi_data_get_dark_pos (cpl_table *detector_table, int reg)
 retrun the position of the dark line on top of the region at x position
 
cpl_mask * gravi_data_create_bias_mask (cpl_table *detector_table, cpl_size nx, cpl_size ny)
 return a mask with pixel to be possibly illuminated
 
cpl_error_code gravi_remove_cosmicrays_sc (cpl_imagelist *imglist_sc)
 Remove cosmic rays via filtering through images.
 
gravi_datagravi_data_new (int nb_ext)
 Create an empty gravi_data.
 
void gravi_data_delete (gravi_data *self)
 Delete a gravi data.
 
gravi_datagravi_data_duplicate (const gravi_data *self)
 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.
 
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.
 
cpl_error_code gravi_data_dump_mode (gravi_data *data)
 Dump some information about data in messagin.
 
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_dump (gravi_data *self)
 Dump the overall structure of a gravi_data in stdout.
 
int gravi_data_get_size (const gravi_data *self)
 Get the number of extension in a gravi_data.
 
cpl_error_code gravi_data_save_data (gravi_data *self, const char *filename, unsigned mode)
 Save a gravi data in a FITS file.
 
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_detector_cleanup (gravi_data *data, const cpl_parameterlist *parlist)
 Perform self-bias correction to the SC raw data.
 
static int _gravi_data_find (const gravi_data *self, const char *name)
 
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_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 (gravi_data *output, gravi_data *input, const char *name)
 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.
 
int gravi_data_has_extension (gravi_data *raw_calib, const char *ext_name)
 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'.
 
cpl_propertylist * gravi_data_get_plist_x (gravi_data *self, int i)
 Get the propertylist of an extension by position.
 
cpl_table * gravi_data_get_table_x (gravi_data *self, int i)
 Get the table of an extension by position.
 
cpl_imagelist * gravi_data_get_cube_x (gravi_data *self, int i)
 Get the cube of an extension by position.
 
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.
 
cpl_propertylist * gravi_data_get_oi_plist (gravi_data *self, const char *extname, const char *insname)
 Get the propertylist from EXTNAME and INSNAME.
 
cpl_propertylist * gravi_data_get_plist (gravi_data *self, const char *extname)
 Get the propertylist from EXTNAME.
 
cpl_propertylist * gravi_data_get_extra_primary_header (gravi_data *self)
 Get the propertylist for additional keywords to the primary header.
 
cpl_table * gravi_data_get_table (gravi_data *self, const char *extname)
 Return a pointer on a table extension by its EXTNAME.
 
cpl_imagelist * gravi_data_get_cube (gravi_data *self, const char *extname)
 Return a pointer on an IMAGE extension by its EXTNAME.
 
cpl_error_code gravi_data_erase_x (gravi_data *self, int pos)
 Erase an extension by its position.
 
cpl_error_code gravi_data_erase (gravi_data *self, const char *extname)
 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_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_table ** gravi_data_get_oiwave_tables (gravi_data *data, int type_data, int npol)
 Get pointer to the OI_WAVELENGTH tables of both polarisations.