|
GRAVI Pipeline Reference Manual 1.9.4
|
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_data * | gravi_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. | |
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.
| #define GRAVI_ACOEFF_RANGE 0.02 |
Definition at line 45 of file gravi_disp.c.
| #define INFO_DEBUG 0 |
Definition at line 44 of file gravi_disp.c.
| cpl_error_code gravi_compute_argon_pos | ( | gravi_data * | preproc_data, |
| gravi_data * | wave_param | ||
| ) |
Compute position of argon lines in SC spectrum.
| preproc_data | ARGON frame already preproc |
| CPL_ERROR_NULL_INPUT | input data is missing |
| CPL_ERROR_ILLEGAL_INPUT | mission 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_data * gravi_compute_disp | ( | gravi_data * | vis_data | ) |
Compute the DISP_MODEL calibration map.
| vis_data | The input vis_data with several observations |
| CPL_ERROR_NULL_INPUT | input 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().
| cpl_error_code gravi_disp_cleanup | ( | gravi_data * | vis_data | ) |
Cleanup a VIS gravi_data before calibrating the dispersion.
| vis_data | The VIS data, modified in-place |
| CPL_ERROR_NULL_INPUT | input 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().
| 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.
| oivis_table | The input OI_VIS table |
| oiflux_table | The input OI_FLUX table |
| oiwave_table | The input OI_WAVELENGTH table |
| GDrms | GDELAY RMS over obs (max value over base) [m] |
| Amin | Minimum fine correction in wavenumber [m^-1] |
| Amin | Maximum fine correction in wavenumber [m^-1] |
| CPL_ERROR_NULL_INPUT | input 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().
| cpl_table * gravi_fit_fddl_lin | ( | cpl_table * | oiflux_table | ) |
Compute the linearity coefficient of FDDLs.
| oiflux_table | The input OI_FLUX table |
| CPL_ERROR_NULL_INPUT | input 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
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().