|
GRAVI Pipeline Reference Manual 1.9.4
|
Functions | |
| cpl_error_code | gravi_vis_bootstrap_snr_and_delay (cpl_table *oi_vis, const char *name_snr, const char *name_gdl) |
| Boostrap real-time SNR and GDELAY. | |
| cpl_error_code | gravi_vis_correct_phasediff (cpl_table *oi_vis1, const char *name1, cpl_table *oi_vis2, const char *name2, double *phasediff) |
| Correct for mean phase-difference between coherent fluxes. | |
| cpl_error_code | gravi_vis_compute_mean_phasor (cpl_table *oi_vis, const char *name_vis, const char *name_err, const char *name_pha, const char *name_var, const char *name_flag) |
| Compute real-time mean phasor of a VISDATA by averaging all spectral elements. | |
| cpl_error_code | gravi_vis_compute_interspectre (cpl_table *oi_vis, const char *name_vis, const char *name_is, const char *name_flag) |
| Compute the real-time interspectra. | |
| cpl_error_code | gravi_vis_compute_snr (cpl_table *oi_vis, const char *name_pha, const char *name_var, const char *name_snr) |
| Compute the real-time SNR. | |
| cpl_error_code | gravi_vis_compute_isdelay (cpl_table *oi_vis, const char *name_isp, const char *name_gdl, cpl_table *oi_wavelength) |
| Compute the group-delay from interspectra. | |
| cpl_error_code | gravi_vis_create_pfactor_sc (cpl_table *vis_SC, cpl_table *t3_SC, cpl_table *flux_FT) |
| Compute the PFACTOR for the SC. | |
| cpl_error_code | gravi_vis_create_pfactor_ft (cpl_table *vis_FT, cpl_table *flux_FT, cpl_size window_width) |
| Compute the PFACTOR for the FT. | |
| cpl_error_code | gravi_vis_create_f1f2_sc (cpl_table *vis_SC, cpl_table *flux_SC) |
| Compute the photometric normalisation for the SC. | |
| cpl_error_code | gravi_vis_create_f1f2_ft (cpl_table *vis_FT, cpl_table *flux_FT) |
| Compute the photometric normalisation for the FT. | |
| cpl_error_code | gravi_vis_create_phaseref_ft (cpl_table *vis_FT) |
| Compute the self-reference phase for each FT DIT. | |
| cpl_error_code | gravi_vis_create_met_sc (cpl_table *vis_SC, cpl_table *vis_MET, cpl_table *wave_table) |
| Compute the averaged MET signal for each SC DIT per base. | |
| cpl_error_code | gravi_create_outlier_flag_sc (cpl_table *flux_SC, cpl_table *vis_SC, double chi2r_threshold, double chi2r_sigma) |
| Create the list of outlier based on the values of the chi2. | |
| cpl_error_code | gravi_create_outlier_flag_ft (cpl_table *flux_FT, cpl_table *vis_FT) |
| Create the list of outlier. For the FT, this is filled with 0. | |
| cpl_error_code | gravi_flux_create_fddlpos_sc (cpl_table *flux_SC, cpl_table *fddl_table) |
| Compute the averaged FDDL signal for each SC DIT per beam. | |
| cpl_error_code | gravi_flux_create_totalflux_sc (cpl_table *flux_SC, cpl_table *flux_FT) |
| Compute total flux of each DIT for the SC and of the FT. | |
| cpl_error_code | gravi_flux_create_met_sc (cpl_table *flux_SC, cpl_table *vis_MET) |
| Compute the averaged MET signal for each SC DIT per beam. | |
| cpl_error_code | gravi_flux_create_acq_sc (cpl_table *flux_SC, cpl_table *vis_ACQ) |
| Compute the averaged ACQ signal for each SC DIT per beam. | |
| cpl_error_code | gravi_vis_create_acq_sc (cpl_table *vis_SC, cpl_table *vis_ACQ) |
| Compute the averaged ACQ signal for each SC DIT per base. | |
| cpl_error_code | gravi_vis_create_vfactor_sc (cpl_table *vis_SC, cpl_table *wave_table_sc, cpl_table *vis_FT, cpl_table *wave_table_ft) |
| Compute the VFACTOR for each SC DIT based on real-time FT. | |
| cpl_error_code | gravi_vis_create_lockratio_sc (cpl_table *vis_SC, cpl_table *vis_FT) |
| Create the clockratio for each SC DIT and baseline. | |
| cpl_error_code | gravi_vis_create_phaseref_sc (cpl_table *vis_SC, cpl_table *wavesc_table, cpl_table *waveft_table, cpl_propertylist *header, const cpl_parameterlist *parlist) |
| Compute the reference phase for each SC DIT. | |
| cpl_error_code | gravi_vis_create_opddisp_sc (cpl_table *vis_SC, cpl_table *flux_SC, cpl_table *wave_table, cpl_table *disp_table, cpl_propertylist *header, const cpl_parameterlist *parlist) |
| Compute the MET opd including the dispersion from the FDDL. | |
| cpl_error_code | gravi_vis_create_imagingref_sc (cpl_table *vis_SC, cpl_table *wave_table, cpl_propertylist *header, const cpl_parameterlist *parlist) |
| Create phase-referenced imaging data in the P2VMREDUCED file. | |
| cpl_error_code | gravi_compute_outliers (gravi_data *p2vmred_data, const cpl_parameterlist *parlist) |
| Compute the outliers flags. | |
| cpl_error_code | gravi_compute_snr (gravi_data *p2vmred_data, const cpl_parameterlist *parlist) |
| Compute real-time SNR and Group-Delay of the observation. | |
| cpl_error_code | gravi_signal_create_sync (cpl_table *vis_SC, int nbase_sc, double dit_sc, cpl_table *vis_FT, int nbase_ft, const char *name) |
| Compute synchronisation indices between OIFITS tables. | |
| cpl_error_code | gravi_vis_create_met_ft (cpl_table *vis_FT, cpl_table *vis_MET) |
| Compute the resampled MET signal for each FT DIT per base. | |
| cpl_error_code | gravi_vis_create_opdsc_ft (cpl_table *vis_FT, cpl_table *vis_SC, double dit_sc) |
| Compute the resampled SC signal for each FT DIT per base. | |
| cpl_error_code | gravi_flux_create_fddllin_sc (cpl_table *flux_SC, cpl_table *disp_table) |
| Compute the (FDDL_SC + FDDL_FT)/2 position in [m]. | |
| cpl_error_code | gravi_compute_signals (gravi_data *p2vmred_data, gravi_data *disp_data, const cpl_parameterlist *parlist) |
| Create intermediate signal in the P2VMREDUCED file. | |
| cpl_error_code | gravi_copy_p2vm_qcs (gravi_data *p2vmred_data, cpl_propertylist *plist) |
| Copy PFACTOR and VFACTOR QCs so that they may be aggregated over all frames. | |
| cpl_error_code | gravi_compute_rejection (gravi_data *p2vmred_data, const cpl_parameterlist *parlist) |
| Create rejection flags P2VMREDUCED file. | |
This module computes all the quantities from the individual coherent flux measurements that are useful for the final processing of the visibilities. It includes the signal synchronization, resampling and averaged over SC DIT, as well as qualitative parameters. The main function called by gravity_vis are :
gravi_compute_snr() : see Algorithms/Computation of SNRgravi_compute_signals() : see Algorithms/Computing the vFactor, Algorithms/Computing the pFactor, Algorithms/Phase referencing, Algorithms/Geometric fluxgravi_compute_rejection() : see Algorithms/Frame rejection | cpl_error_code gravi_compute_outliers | ( | gravi_data * | p2vmred_data, |
| const cpl_parameterlist * | parlist | ||
| ) |
Compute the outliers flags.
| p2vmred_data | is the P2VMREDUCED data (modified in-place) |
Fill the FLAG columns in the P2VMREDUCED data
Definition at line 536 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, FREE, gravi_create_outlier_flag_ft(), gravi_create_outlier_flag_sc(), gravi_data_get_header, gravi_data_get_oi_flux, gravi_data_get_oi_vis, GRAVI_FT, gravi_msg_function_exit, gravi_msg_function_start, gravi_param_get_double(), gravi_pfits_get_pola_num(), gravi_table_get_column_sum_array(), and ntel.
Referenced by gravity_disp(), gravity_vis(), and gravity_vis_from_p2vmred().
| cpl_error_code gravi_compute_rejection | ( | gravi_data * | p2vmred_data, |
| const cpl_parameterlist * | parlist | ||
| ) |
Create rejection flags P2VMREDUCED file.
| p2vmred_data | the P2VMREDUCED data (modified in-place) |
| parlist | parameter list of the recipe |
Create the rejection flags in the P2VMREDUCED file... These computations are mandatory for the further averaging of the frames into an OIFITS file with gravi_compute_vis
Create column in vis_FT with the REJECTION_FLAT computed by comparing the SNR and STATE to thresholds provided in parlist.
Create column in vis_SC with the FRINGEDE_RATIO.
Create column in vis_SC with the REJECTION_FLAT computed by comparing the VFACTOR and the FRINGEDET_RATIO of each SC DIT to the specified thresholds in parlist.
Definition at line 3484 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, GRAVI_BASE_NAME, gravi_bit_clear, gravi_bit_set, gravi_data_get_header, gravi_data_get_oi_vis, gravi_data_has_type(), GRAVI_FT, gravi_msg_function_exit, gravi_msg_function_start, gravi_param_get_double(), gravi_pfits_get_pola_num(), GRAVI_SC, gravi_table_new_column(), and gravi_vis_create_lockratio_sc().
Referenced by gravity_disp(), gravity_vis(), and gravity_vis_from_p2vmred().
| cpl_error_code gravi_compute_signals | ( | gravi_data * | p2vmred_data, |
| gravi_data * | disp_data, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Create intermediate signal in the P2VMREDUCED file.
| p2vmred_data | the P2VMREDUCED data (modified in-place) |
| disp_data | DISP_PARAM file, to compute the OPD_DISP |
| parlist | parameter list of the recipe (unused so far) |
Create many intermediate signal in the P2VMREDUCED file, necesary for the further averaging of frames. Especially phase references, vFactor... These computations are mandatory for the further averaging of the frames into an OIFITS file with gravi_compute_vis
Definition at line 3174 of file gravi_signal.c.
References cpl_msg_info(), cpl_propertylist_update_double(), CPLCHECK_MSG, GRAVI_BASE_NAME, GRAVI_CLO_NAME, gravi_data_get_header, gravi_data_get_oi_flux, gravi_data_get_oi_t3, gravi_data_get_oi_vis, gravi_data_get_oi_wave, gravi_data_get_table(), gravi_data_has_extension(), GRAVI_FDDL_EXT, gravi_flux_create_acq_sc(), gravi_flux_create_fddllin_sc(), gravi_flux_create_fddlpos_sc(), gravi_flux_create_met_sc(), gravi_flux_create_totalflux_sc(), GRAVI_FT, GRAVI_INSNAME, gravi_msg_function_exit, gravi_msg_function_start, gravi_msg_warning(), GRAVI_OI_VIS_ACQ_EXT, GRAVI_OI_VIS_MET_EXT, gravi_pfits_get_dit_sc(), gravi_pfits_get_pola_num(), GRAVI_SC, gravi_signal_create_sync(), gravi_table_compute_group_delay(), gravi_table_get_column_mean(), gravi_table_new_column(), gravi_table_smooth_column(), gravi_vis_create_acq_sc(), gravi_vis_create_f1f2_ft(), gravi_vis_create_f1f2_sc(), gravi_vis_create_imagingref_sc(), gravi_vis_create_met_sc(), gravi_vis_create_opddisp_sc(), gravi_vis_create_pfactor_ft(), gravi_vis_create_pfactor_sc(), gravi_vis_create_phaseref_ft(), gravi_vis_create_phaseref_sc(), gravi_vis_create_vfactor_sc(), and ntel.
Referenced by gravity_disp(), and gravity_vis().
| cpl_error_code gravi_compute_snr | ( | gravi_data * | p2vmred_data, |
| const cpl_parameterlist * | parlist | ||
| ) |
Compute real-time SNR and Group-Delay of the observation.
| p2vmred_data | is the P2VMREDUCED data (modified in-place) |
Create the SNR_SMT and GDELAY_SMT columns in the P2VMREDUCED data These are the estimate considering both polarisation if any, all closing baseline and a running sum of the complex coherent flux. These quantities are computed for SC and FT.
Create column: SNR, SNR_BOOT, GDELAY_BOOT
Definition at line 620 of file gravi_signal.c.
References cpl_msg_info(), cpl_propertylist_update_double(), CPLCHECK_MSG, GRAVI_BASE_NAME, GRAVI_BASE_TEL, gravi_data_get_header, gravi_data_get_oi_vis, gravi_data_get_oi_wave, gravi_data_has_type(), GRAVI_FT, gravi_msg_function_exit, gravi_msg_function_start, gravi_param_get_int(), gravi_pfits_get_period_sc(), gravi_pfits_get_pola_num(), gravi_table_add_columns(), gravi_table_get_column_mean(), gravi_table_runint_column(), gravi_table_smooth_column(), GRAVI_TYPE, gravi_vis_bootstrap_snr_and_delay(), gravi_vis_compute_interspectre(), gravi_vis_compute_isdelay(), gravi_vis_compute_mean_phasor(), gravi_vis_compute_snr(), and gravi_vis_correct_phasediff().
Referenced by gravity_disp(), gravity_vis(), and gravity_vis_from_p2vmred().
| cpl_error_code gravi_copy_p2vm_qcs | ( | gravi_data * | p2vmred_data, |
| cpl_propertylist * | plist | ||
| ) |
Copy PFACTOR and VFACTOR QCs so that they may be aggregated over all frames.
| p2vmred_data | The P2VMREDUCED data. |
| proplist | Propertylist to copy data into. |
Definition at line 3420 of file gravi_signal.c.
References CPLCHECK_INT, CPLCHECK_MSG, GRAVI_BASE_NAME, GRAVI_CLO_NAME, gravi_data_get_header, gravi_data_get_oi_vis, GRAVI_FT, gravi_pfits_get_pola_num(), GRAVI_SC, and plist.
Referenced by gravity_disp(), gravity_vis(), and gravity_vis_from_p2vmred().
| cpl_error_code gravi_create_outlier_flag_ft | ( | cpl_table * | flux_FT, |
| cpl_table * | vis_FT | ||
| ) |
Create the list of outlier. For the FT, this is filled with 0.
| flux_FT | input/output OI_FLUX table of the FT |
| vis_FT | input/output OI_VIS table of the FT |
Definition at line 2741 of file gravi_signal.c.
References gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_outliers().
| cpl_error_code gravi_create_outlier_flag_sc | ( | cpl_table * | flux_SC, |
| cpl_table * | vis_SC, | ||
| double | chi2r_threshold, | ||
| double | chi2r_sigma | ||
| ) |
Create the list of outlier based on the values of the chi2.
| flux_SC | input/output OI_FLUX table of the SC |
| vis_SC | input/output OI_VIS table of the SC |
| chi2r_threshold | threshold for absolute value of chi2r |
| chi2r_sigma | threshold in number of sigma |
| stat[2] | stat[0] is number of channels with at least one outlier. stat[1] is number of channels with more then 50% outliers. |
Definition at line 2628 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, FREE, gravi_msg_function_exit, gravi_msg_function_start, gravi_vector_abs(), gravi_vector_median(), and ntel.
Referenced by gravi_compute_outliers().
| cpl_error_code gravi_flux_create_acq_sc | ( | cpl_table * | flux_SC, |
| cpl_table * | vis_ACQ | ||
| ) |
Compute the averaged ACQ signal for each SC DIT per beam.
| flux_SC | input/output OI_VIS table of the SC |
| vis_ACQ | input OI_VIS_ACQ table |
The averaged quantities are stored in new columns in the vis_SC table. The ACQ_CAM signals are averaged with flat weighting inside each SC DIT. The synchronisation info shall already be computed.
Definition at line 1387 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_flux_create_fddllin_sc | ( | cpl_table * | flux_SC, |
| cpl_table * | disp_table | ||
| ) |
Compute the (FDDL_SC + FDDL_FT)/2 position in [m].
| flux_SC | input/output OI_FLUX table of the SC |
| disp_table | FDDL dispersion model |
Create new columns in flux_SC (FDDL)
Definition at line 2765 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, FREE, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_get_data_array_double(), gravi_table_new_column(), and ntel.
Referenced by gravi_compute_disp(), and gravi_compute_signals().
| cpl_error_code gravi_flux_create_fddlpos_sc | ( | cpl_table * | flux_SC, |
| cpl_table * | fddl_table | ||
| ) |
Compute the averaged FDDL signal for each SC DIT per beam.
| flux_SC | input/output OI_FLUX table of the SC |
| vis_MET | input OI_VIS_MET table |
| fddl_table | input FDDL table |
The averaged quantities are stored in new columns in the flux_SC table. The MET and FDDL signals are averaged with flat weighting inside each SC DIT. The synchronisation info shall already be computed.
Definition at line 2088 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_flux_create_met_sc | ( | cpl_table * | flux_SC, |
| cpl_table * | vis_MET | ||
| ) |
Compute the averaged MET signal for each SC DIT per beam.
| flux_SC | input/output OI_FLUX table of the SC |
| vis_MET | input OI_VIS_MET table |
The averaged quantities are stored in new columns in the vis_SC table. The metrology signals are averaged with flat weighting inside each SC DIT. The synchronisation info shall already be computed.
Definition at line 1919 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_array_init_double(), gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), gravi_table_new_column_array(), ndiode, and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_flux_create_totalflux_sc | ( | cpl_table * | flux_SC, |
| cpl_table * | flux_FT | ||
| ) |
Compute total flux of each DIT for the SC and of the FT.
| flux_SC | input/output OI_FLUX table of the SC |
| flux_FT | input/output OI_FLUX table of the FT |
Create new columns for the total flux of the SC for each SC DIT, the total flux of the FT for each FT DIT, and the total flux of the FT inside each SC DIT. The synchronisation info shall already be computed.
Definition at line 2159 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_signal_create_sync | ( | cpl_table * | vis_SC, |
| int | nbase_sc, | ||
| double | dit_sc, | ||
| cpl_table * | vis_FT, | ||
| int | nbase_ft, | ||
| const char * | name | ||
| ) |
Compute synchronisation indices between OIFITS tables.
| vis_SC | table for which to compute the indices (SC) |
| nbase_sc | integer, number of base (6 for SC) |
| dit_sc | double, search window for synch |
| vis_FT | table where to search for synch (FT, MET) |
| nbase_ft | integer, number of base (6 for FT, 1 for MET) |
| name | string, to define the LAST_## and FIRST_## column names |
Search for the first and last indices in VIS_FT for each frame in vis_SC, based on the TIME columns and the +-dit_sc/2 window, and creates the LAST_## and FIRST_## new columns with those index. The accepted frames are {first to last-1}
Definition at line 849 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_compute_signals(), gravi_metrology_acq(), and gravi_vis_create_opdguess_sc().
| cpl_error_code gravi_vis_bootstrap_snr_and_delay | ( | cpl_table * | oi_vis, |
| const char * | name_snr, | ||
| const char * | name_gdl | ||
| ) |
Boostrap real-time SNR and GDELAY.
| oi_vis | input OI_VIS table |
| name_snr | name of input/output SNR column |
| name_gdl | name of input/output group-delay column |
Compute a 'bootstraped' version of the SNR and GDELAY for each baseline, by looking at the information of other baselines forming closing triangles. Then update the SNR and Group-Delay of this baseline accordingly to the best combination found.
Definition at line 150 of file gravi_signal.c.
References cpl_msg_debug(), CPLCHECK_MSG, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, GRAVI_TRI_BASE, and GRAVI_TRI_SIGN.
Referenced by gravi_compute_snr().
| cpl_error_code gravi_vis_compute_interspectre | ( | cpl_table * | oi_vis, |
| const char * | name_vis, | ||
| const char * | name_is, | ||
| const char * | name_flag | ||
| ) |
Compute the real-time interspectra.
| oi_vis | input OI_VIS table |
| name_vis | name of VISDATA column to be used |
| name_is | name of interspectra column to be created |
| name_flag | name of flag column |
The real-time interspectral is computed by averaging the interspectra of all consecutive spectral channels pairs (for each DIT).
Definition at line 359 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_compute_snr().
| cpl_error_code gravi_vis_compute_isdelay | ( | cpl_table * | oi_vis, |
| const char * | name_isp, | ||
| const char * | name_gdl, | ||
| cpl_table * | oi_wavelength | ||
| ) |
Compute the group-delay from interspectra.
| oi_vis | input/output OI_VIS table |
| name_isp | name of interspectra column to be used |
| name_gdl | name of output group-delay column to be created |
| oi_wavelength | wavelength table corresponding to OI_VIS |
The group-delay is computed as arg{isp} / 2pi / delta_sigma where delta_sigma = 1/lbd[n/2] - 1/lbd[n/2+1]
Definition at line 482 of file gravi_signal.c.
References cpl_msg_debug(), CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_compute_snr().
| cpl_error_code gravi_vis_compute_mean_phasor | ( | cpl_table * | oi_vis, |
| const char * | name_vis, | ||
| const char * | name_err, | ||
| const char * | name_pha, | ||
| const char * | name_var, | ||
| const char * | name_flag | ||
| ) |
Compute real-time mean phasor of a VISDATA by averaging all spectral elements.
| oi_vis | input OI_VIS table |
| name_vis | name of coherent flux column to be used (VISDATA) |
| name_err | corresponding error column |
| name_pha | name of the column to be created with mean phasor |
| name_var | corresponding variance column to be created |
| name_flag | name of flag column |
Definition at line 280 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_compute_snr().
| cpl_error_code gravi_vis_compute_snr | ( | cpl_table * | oi_vis, |
| const char * | name_pha, | ||
| const char * | name_var, | ||
| const char * | name_snr | ||
| ) |
Compute the real-time SNR.
| oi_vis | input OI_VIS table |
| name_pha | name of phasor column to be used |
| name_var | name of variance column to be used |
| name_snr | name of output column for snr to be created |
The real-time SNR is computed as |pha| / sqrt{var}
Definition at line 432 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_compute_snr().
| cpl_error_code gravi_vis_correct_phasediff | ( | cpl_table * | oi_vis1, |
| const char * | name1, | ||
| cpl_table * | oi_vis2, | ||
| const char * | name2, | ||
| double * | phasediff | ||
| ) |
Correct for mean phase-difference between coherent fluxes.
| oi_vis1 | first input OI_VIS table (modified inplace) |
| name1 | name of coherent flux in oi_vis1 |
| oi_vis2 | second input OI_VIS table (untouched) |
| name2 | name of coherent flux in oi_vis2 |
| phasedif | mean phase-difference measured |
Compute the mean phasor difference between the column name1 and name2. Multiply column name1 by the conjugate of this phasor. Note that name1 and name2 should be DOUBLE COMPLEX.
Definition at line 218 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_snr().
| cpl_error_code gravi_vis_create_acq_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | vis_ACQ | ||
| ) |
Compute the averaged ACQ signal for each SC DIT per base.
| vis_SC | input/output OI_VIS table of the SC |
| vis_ACQ | input OI_VIS_ACQ table |
The averaged quantities are stored in new columns in the vis_SC table. The ACQ_CAM signals are averaged with flat weighting inside each SC DIT. The synchronisation info shall already be computed.
Definition at line 1309 of file gravi_signal.c.
References CPLCHECK_MSG, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_f1f2_ft | ( | cpl_table * | vis_FT, |
| cpl_table * | flux_FT | ||
| ) |
Compute the photometric normalisation for the FT.
| vis_FT | output OI_VIS table of the FT |
| flux_FT | input OI_FLUX table of the FT |
The normalisation is computed for each FT DIT and saved in a newly created column F1F2 in the vis_FT table. To enhance SNR and avoid division by zero, it uses a combination of time-averaged and channel-averaged signals to reconstruct the real-time per-channel photometric flux. The time averaged signal is from TOTALFLUX which shall thus be already computed.
Definition at line 1178 of file gravi_signal.c.
References CPLCHECK_MSG, FREELOOP, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column_array(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_f1f2_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | flux_SC | ||
| ) |
Compute the photometric normalisation for the SC.
| vis_SC | output OI_VIS table of the SC |
| flux_SC | input OI_FLUX table of the SC |
The normalisation is computed for each SC DIT and saved in a newly created column F1F2 in the vis_SC table. It is simply the product of the fluxes of the 2 telescopes corresponding to each base.
Definition at line 1130 of file gravi_signal.c.
References CPLCHECK_MSG, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column_array(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_imagingref_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | wave_table, | ||
| cpl_propertylist * | header, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Create phase-referenced imaging data in the P2VMREDUCED file.
| vis_SC | input/output OI_VIS table of the SC |
| wave_table | wavelength table corresponding to the OI_VIS above |
| header | main header |
Create IMAGING_REF column in vis_SC based on the following: IMAGING_REF = PHASE_REF - OPD_DISP * (2pi/EFF_WAVE)
Definition at line 3052 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, gravi_array_phase_wrap(), gravi_msg_function_exit, gravi_msg_function_start, gravi_param_get_string(), gravi_pfits_get_sobj_x(), gravi_pfits_get_sobj_y(), gravi_table_new_column_array(), and header.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_lockratio_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | vis_FT | ||
| ) |
Create the clockratio for each SC DIT and baseline.
| vis_SC | input/output OI_VIS table of the SC |
| vis_FT | input OI_VIS table of the FT |
Compute the fraction of FT DIT not-rejected inside each SC DIT, looking at the REJECTION_FLAG column in vis_FT. The result is saved in a newly created column column FRINGEDET_RATIO in the vis_SC column.
The synchronisation info shall already be computed.
Definition at line 2409 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_compute_rejection().
| cpl_error_code gravi_vis_create_met_ft | ( | cpl_table * | vis_FT, |
| cpl_table * | vis_MET | ||
| ) |
Compute the resampled MET signal for each FT DIT per base.
| vis_FT | input/output OI_VIS table of the FT |
| vis_MET | input OI_VIS_MET table |
| dit_ft | the FT DIT (exposure being TIME -> TIME+PERIOD |
The resampled quantities are stored in new columns in the vis_FT table. The routine doesn't need the synchronisation columns. The PERIOD of FT is computed as TIME[sample1] - TIME[sample0]. The TIME of the MET table is supposed to be the same for all beam.
If one or several MET sample are inside the FT DIT, they are averaged. If no MET samples are inside the FT DIT, the metrology is interpolated linearly at the time of FT.
Create table is PHASE_MET_FC (fiber coupler) in [rad]
Definition at line 1717 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), and ntel.
| cpl_error_code gravi_vis_create_met_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | vis_MET, | ||
| cpl_table * | wave_table | ||
| ) |
Compute the averaged MET signal for each SC DIT per base.
| vis_SC | input/output OI_VIS table of the SC |
| vis_MET | input OI_VIS_MET table |
The averaged quantities are stored in new columns in the vis_SC table. The metrology signals are averaged with flat weighting inside each SC DIT. The synchronisation info shall already be computed.
Definition at line 1464 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, FREE, gravi_array_init_double(), gravi_array_init_double_complex(), GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), gravi_table_new_column_array(), ndiode, and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_opddisp_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | flux_SC, | ||
| cpl_table * | wave_table, | ||
| cpl_table * | disp_table, | ||
| cpl_propertylist * | header, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Compute the MET opd including the dispersion from the FDDL.
| vis_SC | input/output OI_VIS table of the SC |
| flux_SC | input/output OI_FLUX table of the SC |
| wave_table | wavelength table corresponding to OI_VIS |
| disp_table | FDDL dispersion model |
| parlist | parameter list of the recipe |
Create new columns in vis_SC (OPD per base) and flux_SC (OPD per beam) by combining the already computed MET and FDDL signals averaged inside each SC DIT and the dispersion coefficient from disp_table.
Definition at line 2845 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, FREE, FREELOOP, gravi_array_phase_wrap(), GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_param_get_bool(), gravi_pfits_get_gdzero(), gravi_pfits_get_oplzero(), gravi_pfits_has_gdzero(), gravi_table_get_value, gravi_table_new_column(), gravi_table_new_column_array(), header, and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_opdsc_ft | ( | cpl_table * | vis_FT, |
| cpl_table * | vis_SC, | ||
| double | dit_sc | ||
| ) |
Compute the resampled SC signal for each FT DIT per base.
| vis_FT | input/output OI_VIS table of the FT |
| vis_SC | input OI_VIS table of SC |
| dit_sc | the SC DIT (exposure being TIME-DIT/2 -> TIME+DIT/2) |
The resampled quantities are stored in new columns in the vis_FT table. The routine doesn't need the synchronisations columns. For all FT samples inside an SC DIT, the routine filled the PHASE_SC column with the value of PHASE column from vis_SC. Samples outside an SC DIT are filled with 0.0
Create table PHASE_SC [rad]
Definition at line 1843 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_wave_compute_opds().
| cpl_error_code gravi_vis_create_pfactor_ft | ( | cpl_table * | vis_FT, |
| cpl_table * | flux_FT, | ||
| cpl_size | window_width | ||
| ) |
Compute the PFACTOR for the FT.
| vis_SC | output OI_VIS table of the SC |
| t3_SC | output OI_T3 table of the SC |
| flux_FT | input OI_FLUX table of the FT |
The PFACTOR is computed using a sliding window on the unsmoothed flux and saved in a newly created column P_FACTOR in the vis_FT table.
Definition at line 1043 of file gravi_signal.c.
References CPLCHECK_MSG, GRAVI_BASE_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_init_column_array(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_pfactor_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | t3_SC, | ||
| cpl_table * | flux_FT | ||
| ) |
Compute the PFACTOR for the SC.
| vis_SC | output OI_VIS table of the SC |
| t3_SC | output OI_T3 table of the SC |
| flux_FT | input OI_FLUX table of the FT |
The PFACTOR is computed for each SC DIT and saved in a newly created column P_FACTOR in the vis_SC table. Likewise the P3FACTOR is saved in a newly created column in the t3_SC table. The synchronisation info shall be available.
Definition at line 943 of file gravi_signal.c.
References CPLCHECK_MSG, GRAVI_BASE_TEL, GRAVI_CLO_TEL, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_new_column(), and ntel.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_phaseref_ft | ( | cpl_table * | vis_FT | ) |
Compute the self-reference phase for each FT DIT.
| vis_FT | input/output OI_VIS table of the FT |
The reference phase is computed for each FT DIT and saved in a newly created column PHASE_REF in the vis_FT table. It is a running mean of few DITs, performed independently for each spectral channel.
Definition at line 1242 of file gravi_signal.c.
References CPLCHECK_MSG, gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column_array().
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_phaseref_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | wavesc_table, | ||
| cpl_table * | waveft_table, | ||
| cpl_propertylist * | header, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Compute the reference phase for each SC DIT.
| vis_SC | input/output OI_VIS table of the SC |
| wave_table_sc | wavelength table corresponding to OI_VIS |
| wave_table_ft | wavelength table corresponding to OI_VIS FT |
The reference phase is computed for each SC DIT and saved in a newly created column PHASE_REF in the vis_SC table. It is constructed from the coherent-flux of the FT, already averaged inside each SC DIT (VISDATA_FT). It is then interpolatated to the SC wavelength table.
The polynomial coefficients used to extrapolate the PHASE_REF from the FT wavelengths to the SC wavelengths are saved in column PHASE_REF_COEFF.
Definition at line 2472 of file gravi_signal.c.
References cpl_msg_info(), CPLCHECK_MSG, FREE, gravi_array_add_phase(), gravi_array_multiply_phasor(), gravi_array_phase_wrap(), gravi_msg_function_exit, gravi_msg_function_start, gravi_param_get_int(), gravi_table_new_column_array(), and header.
Referenced by gravi_compute_signals().
| cpl_error_code gravi_vis_create_vfactor_sc | ( | cpl_table * | vis_SC, |
| cpl_table * | wave_table_sc, | ||
| cpl_table * | vis_FT, | ||
| cpl_table * | wave_table_ft | ||
| ) |
Compute the VFACTOR for each SC DIT based on real-time FT.
| vis_SC | input/output OI_VIS table of the SC |
| wave_table_sc | wavelength table corresponding to vis_SC |
| vis_FT | input/output OI_VIS table of the FT |
| wave_table_ft | wavelength table corresponding to vis_FT |
Create new columns in vis_SC with the VFACTOR of each SC DIT computed from the ratio between coherence and incoherent integration of the FT fringes inside each DIT. The synchronisation info shall already be computed. The VFACTOR is measured for a pseudo-broad band light (averaging all FT channels) and then extrapolated to all SC wavelength with a theoretical model. The synchronisation info shall already be computed.
Definition at line 2240 of file gravi_signal.c.
References CPLCHECK_MSG, FREE, gravi_array_init_double(), gravi_array_init_double_complex(), gravi_msg_function_exit, gravi_msg_function_start, gravi_pow2, gravi_table_new_column(), and gravi_table_new_column_array().
Referenced by gravi_compute_signals().