X-shooter Pipeline Reference Manual 3.8.15
Data Structures | Macros | Functions
xsh_data_resid_tab.h File Reference
#include <cpl.h>
#include <xsh_data_wavesol.h>

Go to the source code of this file.

Data Structures

struct  xsh_resid_tab
 

Macros

#define XSH_RESID_TAB_TABLE_NB_COL   20
 
#define XSH_RESID_TAB_TABLE_COLNAME_WAVELENGTH   "Wavelength"
 
#define XSH_RESID_TAB_TABLE_UNIT_WAVELENGTH   "nm"
 
#define XSH_RESID_TAB_TABLE_COLNAME_SN   "SN"
 
#define XSH_RESID_TAB_TABLE_UNIT_SN   "none"
 
#define XSH_RESID_TAB_TABLE_COLNAME_ORDER   "Order"
 
#define XSH_RESID_TAB_TABLE_UNIT_ORDER   "none"
 
#define XSH_RESID_TAB_TABLE_COLNAME_SLITPOSITION   "Slit_position"
 
#define XSH_RESID_TAB_TABLE_UNIT_SLITPOSITION   "arcsec"
 
#define XSH_RESID_TAB_TABLE_COLNAME_SLITINDEX   "Slit_index"
 
#define XSH_RESID_TAB_TABLE_UNIT_SLITINDEX   "none"
 
#define XSH_RESID_TAB_TABLE_COLNAME_XTHPRE   "Xthpre"
 
#define XSH_RESID_TAB_TABLE_UNIT_XTHPRE   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_YTHPRE   "Ythpre"
 
#define XSH_RESID_TAB_TABLE_UNIT_YTHPRE   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_XTHCOR   "Xthcor"
 
#define XSH_RESID_TAB_TABLE_UNIT_XTHCOR   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_YTHCOR   "Ythcor"
 
#define XSH_RESID_TAB_TABLE_UNIT_YTHCOR   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_XGAUSS   "XGauss"
 
#define XSH_RESID_TAB_TABLE_UNIT_XGAUSS   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_YGAUSS   "YGauss"
 
#define XSH_RESID_TAB_TABLE_UNIT_YGAUSS   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_SIGMAXGAUSS   "SigmaXGauss"
 
#define XSH_RESID_TAB_TABLE_UNIT_SIGMAXGAUSS   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_SIGMAYGAUSS   "SigmaYGauss"
 
#define XSH_RESID_TAB_TABLE_UNIT_SIGMAYGAUSS   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_FWHMXGAUSS   "FwhmXGauss"
 
#define XSH_RESID_TAB_TABLE_UNIT_FWHMXGAUSS   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_FWHMYGAUSS   "FwhmYGauss"
 
#define XSH_RESID_TAB_TABLE_UNIT_FWHMYGAUSS   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_NORMGAUSS   "NormGauss"
 
#define XSH_RESID_TAB_TABLE_UNIT_NORMGAUSS   "ADU"
 
#define XSH_RESID_TAB_TABLE_COLNAME_XPOLY   "Xpoly"
 
#define XSH_RESID_TAB_TABLE_UNIT_XPOLY   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_YPOLY   "Ypoly"
 
#define XSH_RESID_TAB_TABLE_UNIT_YPOLY   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_XTHANNEAL   "Xthanneal"
 
#define XSH_RESID_TAB_TABLE_UNIT_XTHANNEAL   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_YTHANNEAL   "Ythanneal"
 
#define XSH_RESID_TAB_TABLE_UNIT_YTHANNEAL   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_RESIDXPOLY   "ResidXpoly"
 
#define XSH_RESID_TAB_TABLE_UNIT_RESIDXPOLY   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_RESIDYPOLY   "ResidYpoly"
 
#define XSH_RESID_TAB_TABLE_UNIT_RESIDYPOLY   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_RESIDXMODEL   "ResidXmodel"
 
#define XSH_RESID_TAB_TABLE_UNIT_RESIDXMODEL   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_RESIDYMODEL   "ResidYmodel"
 
#define XSH_RESID_TAB_TABLE_UNIT_RESIDYMODEL   "pixel"
 
#define XSH_RESID_TAB_TABLE_COLNAME_FLAG   "Flag"
 
#define XSH_RESID_TAB_TABLE_UNIT_FLAG   "none"
 
#define PROPERTY_GET(OBJECT, PROPERTY, TYPE, DEFAULT)
 
#define RESID_TAB_PROPERTY_GET(PROPERTY, TYPE, DEFAULT)    PROPERTY_GET( xsh_resid_tab, PROPERTY, TYPE, DEFAULT)
 

Functions

xsh_resid_tabxsh_resid_tab_create (int size, double *lambda, double *order, double *slit, double *sn, int *slit_index, double *thpre_x, double *thpre_y, double *corr_x, double *corr_y, double *gaussian_norm, double *gaussian_fit_x, double *gaussian_fit_y, double *gaussian_sigma_x, double *gaussian_sigma_y, double *gaussian_fwhm_x, double *gaussian_fwhm_y, int *flag, xsh_wavesol *wavesol, int wavesol_type)
 Create a residual tab structure.
 
xsh_resid_tabxsh_resid_tab_create_not_flagged (int size, double *lambda, double *order, double *slit, double *sn, int *slit_index, double *thpre_x, double *thpre_y, double *corr_x, double *corr_y, double *gaussian_norm, double *gaussian_fit_x, double *gaussian_fit_y, double *gaussian_sigma_x, double *gaussian_sigma_y, double *gaussian_fwhm_x, double *gaussian_fwhm_y, int *flag, xsh_wavesol *wavesol, int wavesol_type)
 
xsh_resid_tabxsh_resid_tab_load (cpl_frame *resid_tab_frame)
 Load a residual tab from a frame.
 
int xsh_resid_tab_get_size (xsh_resid_tab *resid)
 
double * xsh_resid_tab_get_lambda_data (xsh_resid_tab *resid)
 Get the size of the residual tab.
 
double * xsh_resid_tab_get_order_data (xsh_resid_tab *resid)
 Get the Orders array of the residual tab.
 
double * xsh_resid_tab_get_slitpos_data (xsh_resid_tab *resid)
 Get the slit_pos array of the residual tab.
 
int * xsh_resid_tab_get_slit_index (xsh_resid_tab *resid)
 
double * xsh_resid_tab_get_thpre_x_data (xsh_resid_tab *resid)
 Get the slit_index array of the residual tab.
 
double * xsh_resid_tab_get_thpre_y_data (xsh_resid_tab *resid)
 Get the thpre_y array of the residual tab.
 
double * xsh_resid_tab_get_xgauss_data (xsh_resid_tab *resid)
 Get the xgauss array of the residual tab.
 
double * xsh_resid_tab_get_ygauss_data (xsh_resid_tab *resid)
 Get the ygauss array of the residual tab.
 
void xsh_resid_tab_free (xsh_resid_tab **resid)
 Free memory associated to a resid_tab.
 
cpl_frame * xsh_resid_tab_save (xsh_resid_tab *resid, const char *filename, xsh_instrument *instr, const char *tag)
 Save a residual tab to a frame.
 
void xsh_resid_tab_log (xsh_resid_tab *resid, const char *filename)
 Log the residual tab in a ASCII file

 
cpl_frame * xsh_resid_tab_erase_flagged (cpl_frame *resid, const char *name)
 
cpl_error_code xsh_frame_table_resid_merge (cpl_frame *self, cpl_frame *right, const int solution_type)
 

Macro Definition Documentation

◆ PROPERTY_GET

#define PROPERTY_GET (   OBJECT,
  PROPERTY,
  TYPE,
  DEFAULT 
)
Value:
TYPE OBJECT##_get_##PROPERTY( OBJECT* obj)\
{\
TYPE result = DEFAULT;\
\
XSH_ASSURE_NOT_NULL( obj);\
result = obj->PROPERTY;\
\
cleanup:\
return result;\
}

Definition at line 110 of file xsh_data_resid_tab.h.

◆ RESID_TAB_PROPERTY_GET

#define RESID_TAB_PROPERTY_GET (   PROPERTY,
  TYPE,
  DEFAULT 
)     PROPERTY_GET( xsh_resid_tab, PROPERTY, TYPE, DEFAULT)

Definition at line 123 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_FLAG

#define XSH_RESID_TAB_TABLE_COLNAME_FLAG   "Flag"

Definition at line 106 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_FWHMXGAUSS

#define XSH_RESID_TAB_TABLE_COLNAME_FWHMXGAUSS   "FwhmXGauss"

Definition at line 73 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_FWHMYGAUSS

#define XSH_RESID_TAB_TABLE_COLNAME_FWHMYGAUSS   "FwhmYGauss"

Definition at line 76 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_NORMGAUSS

#define XSH_RESID_TAB_TABLE_COLNAME_NORMGAUSS   "NormGauss"

Definition at line 79 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_ORDER

#define XSH_RESID_TAB_TABLE_COLNAME_ORDER   "Order"

Definition at line 40 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_RESIDXMODEL

#define XSH_RESID_TAB_TABLE_COLNAME_RESIDXMODEL   "ResidXmodel"

Definition at line 100 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_RESIDXPOLY

#define XSH_RESID_TAB_TABLE_COLNAME_RESIDXPOLY   "ResidXpoly"

Definition at line 94 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_RESIDYMODEL

#define XSH_RESID_TAB_TABLE_COLNAME_RESIDYMODEL   "ResidYmodel"

Definition at line 103 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_RESIDYPOLY

#define XSH_RESID_TAB_TABLE_COLNAME_RESIDYPOLY   "ResidYpoly"

Definition at line 97 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_SIGMAXGAUSS

#define XSH_RESID_TAB_TABLE_COLNAME_SIGMAXGAUSS   "SigmaXGauss"

Definition at line 67 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_SIGMAYGAUSS

#define XSH_RESID_TAB_TABLE_COLNAME_SIGMAYGAUSS   "SigmaYGauss"

Definition at line 70 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_SLITINDEX

#define XSH_RESID_TAB_TABLE_COLNAME_SLITINDEX   "Slit_index"

Definition at line 46 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_SLITPOSITION

#define XSH_RESID_TAB_TABLE_COLNAME_SLITPOSITION   "Slit_position"

Definition at line 43 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_SN

#define XSH_RESID_TAB_TABLE_COLNAME_SN   "SN"

Definition at line 37 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_WAVELENGTH

#define XSH_RESID_TAB_TABLE_COLNAME_WAVELENGTH   "Wavelength"

Definition at line 34 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_XGAUSS

#define XSH_RESID_TAB_TABLE_COLNAME_XGAUSS   "XGauss"

Definition at line 61 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_XPOLY

#define XSH_RESID_TAB_TABLE_COLNAME_XPOLY   "Xpoly"

Definition at line 82 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_XTHANNEAL

#define XSH_RESID_TAB_TABLE_COLNAME_XTHANNEAL   "Xthanneal"

Definition at line 88 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_XTHCOR

#define XSH_RESID_TAB_TABLE_COLNAME_XTHCOR   "Xthcor"

Definition at line 55 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_XTHPRE

#define XSH_RESID_TAB_TABLE_COLNAME_XTHPRE   "Xthpre"

Definition at line 49 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_YGAUSS

#define XSH_RESID_TAB_TABLE_COLNAME_YGAUSS   "YGauss"

Definition at line 64 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_YPOLY

#define XSH_RESID_TAB_TABLE_COLNAME_YPOLY   "Ypoly"

Definition at line 85 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_YTHANNEAL

#define XSH_RESID_TAB_TABLE_COLNAME_YTHANNEAL   "Ythanneal"

Definition at line 91 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_YTHCOR

#define XSH_RESID_TAB_TABLE_COLNAME_YTHCOR   "Ythcor"

Definition at line 58 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_COLNAME_YTHPRE

#define XSH_RESID_TAB_TABLE_COLNAME_YTHPRE   "Ythpre"

Definition at line 52 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_NB_COL

#define XSH_RESID_TAB_TABLE_NB_COL   20

Definition at line 32 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_FLAG

#define XSH_RESID_TAB_TABLE_UNIT_FLAG   "none"

Definition at line 107 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_FWHMXGAUSS

#define XSH_RESID_TAB_TABLE_UNIT_FWHMXGAUSS   "pixel"

Definition at line 74 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_FWHMYGAUSS

#define XSH_RESID_TAB_TABLE_UNIT_FWHMYGAUSS   "pixel"

Definition at line 77 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_NORMGAUSS

#define XSH_RESID_TAB_TABLE_UNIT_NORMGAUSS   "ADU"

Definition at line 80 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_ORDER

#define XSH_RESID_TAB_TABLE_UNIT_ORDER   "none"

Definition at line 41 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_RESIDXMODEL

#define XSH_RESID_TAB_TABLE_UNIT_RESIDXMODEL   "pixel"

Definition at line 101 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_RESIDXPOLY

#define XSH_RESID_TAB_TABLE_UNIT_RESIDXPOLY   "pixel"

Definition at line 95 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_RESIDYMODEL

#define XSH_RESID_TAB_TABLE_UNIT_RESIDYMODEL   "pixel"

Definition at line 104 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_RESIDYPOLY

#define XSH_RESID_TAB_TABLE_UNIT_RESIDYPOLY   "pixel"

Definition at line 98 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_SIGMAXGAUSS

#define XSH_RESID_TAB_TABLE_UNIT_SIGMAXGAUSS   "pixel"

Definition at line 68 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_SIGMAYGAUSS

#define XSH_RESID_TAB_TABLE_UNIT_SIGMAYGAUSS   "pixel"

Definition at line 71 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_SLITINDEX

#define XSH_RESID_TAB_TABLE_UNIT_SLITINDEX   "none"

Definition at line 47 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_SLITPOSITION

#define XSH_RESID_TAB_TABLE_UNIT_SLITPOSITION   "arcsec"

Definition at line 44 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_SN

#define XSH_RESID_TAB_TABLE_UNIT_SN   "none"

Definition at line 38 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_WAVELENGTH

#define XSH_RESID_TAB_TABLE_UNIT_WAVELENGTH   "nm"

Definition at line 35 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_XGAUSS

#define XSH_RESID_TAB_TABLE_UNIT_XGAUSS   "pixel"

Definition at line 62 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_XPOLY

#define XSH_RESID_TAB_TABLE_UNIT_XPOLY   "pixel"

Definition at line 83 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_XTHANNEAL

#define XSH_RESID_TAB_TABLE_UNIT_XTHANNEAL   "pixel"

Definition at line 89 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_XTHCOR

#define XSH_RESID_TAB_TABLE_UNIT_XTHCOR   "pixel"

Definition at line 56 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_XTHPRE

#define XSH_RESID_TAB_TABLE_UNIT_XTHPRE   "pixel"

Definition at line 50 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_YGAUSS

#define XSH_RESID_TAB_TABLE_UNIT_YGAUSS   "pixel"

Definition at line 65 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_YPOLY

#define XSH_RESID_TAB_TABLE_UNIT_YPOLY   "pixel"

Definition at line 86 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_YTHANNEAL

#define XSH_RESID_TAB_TABLE_UNIT_YTHANNEAL   "pixel"

Definition at line 92 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_YTHCOR

#define XSH_RESID_TAB_TABLE_UNIT_YTHCOR   "pixel"

Definition at line 59 of file xsh_data_resid_tab.h.

◆ XSH_RESID_TAB_TABLE_UNIT_YTHPRE

#define XSH_RESID_TAB_TABLE_UNIT_YTHPRE   "pixel"

Definition at line 53 of file xsh_data_resid_tab.h.

Function Documentation

◆ xsh_resid_tab_get_size()

int xsh_resid_tab_get_size ( xsh_resid_tab resid)

◆ xsh_resid_tab_get_slit_index()

int * xsh_resid_tab_get_slit_index ( xsh_resid_tab resid)

Referenced by xsh_model_pipe_anneal().