GRAVI Pipeline Reference Manual 1.9.3
Loading...
Searching...
No Matches
Macros | Functions
Dispersion and Argon calibration

Macros

#define INFO_DEBUG   0
 
#define GRAVI_ACOEFF_RANGE   0.02
 

Functions

cpl_table * gravi_fit_fddl_lin (cpl_table *oiflux_table)
 Compute the linearity coefficient of FDDLs.
 
cpl_table * gravi_fit_dispersion (cpl_table *oiflux_table, cpl_table *oivis_table, cpl_table *oiwave_table, double *GDrms, double *Amin, double *Amax)
 Compute the dispersion coefficient of FDDLs.
 
gravi_datagravi_compute_disp (gravi_data *vis_data)
 Compute the DISP_MODEL calibration map.
 
cpl_error_code gravi_disp_cleanup (gravi_data *vis_data)
 Cleanup a VIS gravi_data before calibrating the dispersion.
 
cpl_error_code gravi_compute_argon_pos (gravi_data *preproc_data, gravi_data *wave_param)
 Compute position of argon lines in SC spectrum.
 

Detailed Description

This module contains two main functions : gravi_compute_argon_pos() and gravi_compute_disp() which are called respectively by the recipe gravity_wavelamp and gravity_disp.

The gravi_compute_argon_pos computes the position of the known argon line wavelengths on which the gravi_compute_disp function relies as absolute wavelength calibration. Based on this, a precise dispersion calibration can be done.

Macro Definition Documentation

◆ GRAVI_ACOEFF_RANGE

#define GRAVI_ACOEFF_RANGE   0.02

Definition at line 45 of file gravi_disp.c.

◆ INFO_DEBUG

#define INFO_DEBUG   0

Definition at line 44 of file gravi_disp.c.

Function Documentation

◆ gravi_compute_argon_pos()

cpl_error_code gravi_compute_argon_pos ( gravi_data preproc_data,
gravi_data wave_param 
)

Compute position of argon lines in SC spectrum.

Parameters
preproc_dataARGON frame already preproc
Exceptions
CPL_ERROR_NULL_INPUTinput data is missing
CPL_ERROR_ILLEGAL_INPUTmission table (spectrum or OI_WAVE) in the input data

The function computes the position of various argon lines in the SPECTRUM of the SC. Then creates a new table POS_ARGON with the position in [pixel], in wavelength [m] and the expected theoretical wavelength [m] of each line.

Definition at line 918 of file gravi_disp.c.

References cpl_msg_info(), CPLCHECK_MSG, FREE, GRAVI_DATA, gravi_data_add_table(), gravi_data_get_oi_wave, gravi_data_get_spectrum_data, gravi_data_get_table(), gravi_msg_function_exit, gravi_msg_function_start, gravi_msg_warning(), GRAVI_SC, gravi_spectrum_get_npol, gravi_spectrum_get_nregion(), gravi_spectrum_get_nwave(), gravi_table_new_column(), and gravi_table_new_column_array().

Referenced by gravity_wavelamp().

◆ gravi_compute_disp()

gravi_data * gravi_compute_disp ( gravi_data vis_data)

Compute the DISP_MODEL calibration map.

Parameters
vis_dataThe input vis_data with several observations
Returns
a gravi_data with the DISP_MODEL table extention.
Exceptions
CPL_ERROR_NULL_INPUTinput data is missing

The recipe first compute the linearisation coefficients of the FDDL and store them into column LIN_FDDL_SC and LIN_FDDL_FT. Then it computes the dispersion index of the FDDL and store them into columns BETA and GAMMA. This table is then stored as extention DISP_MODEL into the returned, newly allocated, gravi_data.

The input vis_data shall have at least 10 observations (60 rows in OI_VIS tables).

Definition at line 113 of file gravi_disp.c.

References cpl_msg_info(), cpl_propertylist_update_double(), CPLCHECK_NUL, FREE, GRAVI_ACOEFF_RANGE, gravi_data_add_table(), gravi_data_get_header, gravi_data_get_oi_flux, gravi_data_get_oi_vis, gravi_data_get_oi_wave, gravi_data_get_table(), gravi_data_new(), gravi_fit_dispersion(), gravi_fit_fddl_lin(), gravi_flux_create_fddllin_sc(), gravi_msg_function_exit, gravi_msg_function_start, gravi_msg_warning(), gravi_pfits_get_pola_num(), GRAVI_SC, gravi_table_add_columns(), gravi_table_get_value, gravi_table_interpolate_column(), gravi_table_multiply_scalar(), gravi_table_new_column(), gravi_table_new_column_array(), LAMBDA_MET, and ntel.

Referenced by gravity_disp().

◆ gravi_disp_cleanup()

cpl_error_code gravi_disp_cleanup ( gravi_data vis_data)

Cleanup a VIS gravi_data before calibrating the dispersion.

Parameters
vis_dataThe VIS data, modified in-place
Exceptions
CPL_ERROR_NULL_INPUTinput data is missing

The function erase all observation with low FT visibilities (could be tracking on second lobes), and then keep only those with the longuest LKDT sequence.

Definition at line 360 of file gravi_disp.c.

References cpl_msg_debug(), cpl_msg_info(), CPLCHECK_MSG, FREE, gravi_data_get_header, gravi_data_get_oi_flux, gravi_data_get_oi_t3, gravi_data_get_oi_vis, gravi_data_get_oi_vis2, GRAVI_FT, gravi_lkdt_get_sequence(), gravi_msg_function_exit, gravi_msg_function_start, gravi_pfits_get_pola_num(), GRAVI_SC, gravi_vis_erase_obs(), header, and ntel.

Referenced by gravity_disp().

◆ gravi_fit_dispersion()

cpl_table * gravi_fit_dispersion ( cpl_table *  oiflux_table,
cpl_table *  oivis_table,
cpl_table *  oiwave_table,
double *  GDrms,
double *  Amin,
double *  Amax 
)

Compute the dispersion coefficient of FDDLs.

Parameters
oivis_tableThe input OI_VIS table
oiflux_tableThe input OI_FLUX table
oiwave_tableThe input OI_WAVELENGTH table
GDrmsGDELAY RMS over obs (max value over base) [m]
AminMinimum fine correction in wavenumber [m^-1]
AminMaximum fine correction in wavenumber [m^-1]
Returns
a table with the coefficients
Exceptions
CPL_ERROR_NULL_INPUTinput data is missing

Found the 14 parameters 6Aij + 4Bi + CGi in by solving the linear system:

PHASEijt * LAMBDA_MET / 2pi = Aij + Ci (FDDL_FTit + FDDL_SCit)/2 - Cj (FDDL_FTjt + FDDL_SCjt)/2 + Bi METit - Bj METjt

for all wavelength independently

The routine takes a great care to unwrap the phase before actually performing this fit.

The input tables shall contain several observation at various FDDL position, so that the system is invertible. The OI_VIS table shall contain the columns VISDATA, OPD_MET_FC. The OI_FLUX table shall contain the columns OPD_MET_FC, FDDL.

Note that the VISDATA are modified in-place by the routine.

The output table contains nwave rows (size of OI_WAVELENGTH table) with the columns BETA (the 4 Bi coefficients) and GAMMA (the 4 Ci coefficients). It also have a column EFF_WAVE duplicated from the input OI_WAVELENGTH table.

Definition at line 585 of file gravi_disp.c.

References cpl_msg_info(), CPLCHECK_NUL, FREE, GRAVI_ACOEFF_RANGE, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_compute_group_delay(), gravi_table_get_column_mean(), gravi_table_get_column_std(), gravi_table_get_data_array_double_complex(), gravi_table_init_column_array(), gravi_table_set_value, LAMBDA_MET, and ntel.

Referenced by gravi_compute_disp().

◆ gravi_fit_fddl_lin()

cpl_table * gravi_fit_fddl_lin ( cpl_table *  oiflux_table)

Compute the linearity coefficient of FDDLs.

Parameters
oiflux_tableThe input OI_FLUX table
Returns
a table with the coefficients [um/V^i]
Exceptions
CPL_ERROR_NULL_INPUTinput data is missing

Found the 22 parameters 6 Aij + 4 B1i + 4 B2i + 4 C1i + 4 C2i by solving the linear system: METit - METjt = Aij + B1i FT_POSit - B1j FT_POSjt

  • B2i FT_POSit**2 - B2j FT_POSjt**2
  • C1i SC_POSit + C1j SC_POSjt
  • C2i SC_POSit**2 + C2j SC_POSjt**2

The input OI_FLUX table shall contain several observation at various FDDL position, so that the system is invertible. It shall contains the columns OPD_MET_FC, FT_POS, SC_POS.

The output table contains 4 rows, one per beam i, and columns LIN_FDDL_FT with the B0 (=0), B1, B2 coefficients LIN_FDDL_SC with the C0 (=0), C1, C2 coefficients

Definition at line 464 of file gravi_disp.c.

References CPLCHECK_NUL, FREE, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column_array(), and ntel.

Referenced by gravi_compute_disp().