|
GRAVI Pipeline Reference Manual 1.9.4
|
Functions | |
| int | gravi_array_set_invalid_negative (cpl_array *array) |
| Set invalid to all negative elements of an array. | |
| cpl_error_code | gravi_vis_flag_negative (cpl_table *oi_table, const char *data, const char *flag) |
| Flag negative element of an OIFITS table. | |
| cpl_error_code | gravi_vis_flag_invalid (cpl_table *oi_table, const char *data, const char *flag) |
| Flag invalid element of an OIFITS table. | |
| char * | gravi_calib_setupstring (gravi_data *data) |
| Build a unique setup string per calibratable setup. | |
| double | gravi_visibility_UD (double uv, double diam, double lbd) |
| Compute the expected visibility from a UD model. | |
| cpl_size | gravi_get_row_in_cat (cpl_table *diam_table, double ra, double dec, double *separation) |
| Get the row in a cpl_table matching closest RAJ2000 and DEJ2000. | |
| cpl_error_code | gravi_apply_tf_amp (gravi_data *science, gravi_data *science_tf, gravi_data **used_tf_data, int num_tf_data, const char *extName, const char *insName, const char *ampName, const char *ampErrName, int nbase, double delta_t) |
| Interpolate the TF at the time of the science observation for an amplitude quantity. | |
| cpl_error_code | gravi_apply_tf_phi (gravi_data *science, gravi_data *science_tf, gravi_data **used_tf_data, int num_tf_data, const char *extName, const char *insName, const char *phiName, const char *phiErrName, int nbase, double delta_t) |
| Interpolate the TF at the time of the science observation for a phase quantity (in deg). | |
| gravi_data * | gravi_calibrate_vis (gravi_data *vis_data, gravi_data **tf_data, int num_tf, gravi_data *phi_tf_data, gravi_data *tf_science, const cpl_parameterlist *parlist) |
| Computes the calibrated visibility from science a single data and several previously evaluated instrumental visibility. | |
| gravi_data * | gravi_compute_tf (gravi_data *vis_data, gravi_data *diamcat_data) |
| This function evaluates the transfer function from the observation of a reference star whose diameter can be determined. | |
| cpl_error_code | gravi_compute_tf_qc (gravi_data *oi_vis, gravi_data *diamcat_data) |
| Fill QC parameters related to transfer function. | |
| gravi_data * | gravi_compute_zp (gravi_data **vis_calib, int num_calib) |
| Compute the ZP data. | |
This module implements the functions to compute the transfer function and to calibrate the visibilities knowing this transfer function. The main functions are :
gravi_compute_tf() to compute the transfer funciotns. See Algorithms/Calibration with the TF, From CAL to TF estimations.gravi_calibrate_vis() to interpolate (see Algorithms/Calibration with the TF, Interpolation of TF at the time of SCI) and to calibrate (see Algorithms/Calibration with the TF, Calibration) | cpl_error_code gravi_apply_tf_amp | ( | gravi_data * | science, |
| gravi_data * | science_tf, | ||
| gravi_data ** | used_tf_data, | ||
| int | num_tf_data, | ||
| const char * | extName, | ||
| const char * | insName, | ||
| const char * | ampName, | ||
| const char * | ampErrName, | ||
| int | nbase, | ||
| double | delta_t | ||
| ) |
Interpolate the TF at the time of the science observation for an amplitude quantity.
| science | the science data to be calibrated, inplace |
| science_tf | an already allocated data (duplication of science) in which the TF interpolated point are stored. |
| used_tf_data | list of the TF data to be interpolated |
| num_tf_data | number of TF data |
| extName | EXTNAME of the OIFITS extension to be calibrated |
| insName | INSNAME of the OIFITS extension to be calibrated |
| ampName | column name of the amplitude to be calibrated |
| ampErrName | corresponding error column |
All dataset shall be conformable in SETUP, but may contain a different number of observation (rnow/nbase) amp is calibrated as a real number: < AMP . W > The weight W is computed as a mixture between the SNR of each TF measurement and its time distance to the science observation.
Definition at line 248 of file gravi_tf.c.
References cpl_msg_debug(), CPLCHECK_MSG, gravi_data_get_oi_table(), gravi_msg_function_exit, gravi_msg_function_start, gravi_vis_flag_invalid(), and gravi_vis_flag_negative().
Referenced by gravi_calibrate_vis(), and gravi_flat_flux().
| cpl_error_code gravi_apply_tf_phi | ( | gravi_data * | science, |
| gravi_data * | science_tf, | ||
| gravi_data ** | used_tf_data, | ||
| int | num_tf_data, | ||
| const char * | extName, | ||
| const char * | insName, | ||
| const char * | phiName, | ||
| const char * | phiErrName, | ||
| int | nbase, | ||
| double | delta_t | ||
| ) |
Interpolate the TF at the time of the science observation for a phase quantity (in deg).
| science | the science data to be calibrated, inplace |
| science_tf | an already allocated data (duplication of science) in which the TF interpolated point are stored. |
| used_tf_data | list of the TF data to be interpolated |
| num_tf_data | number of TF data |
| extName | EXTNAME of the OIFITS extension to be calibrated |
| insName | INSNAME of the OIFITS extension to be calibrated |
| phiName | column name of the phase to be calibrated |
| phiErrName | corresponding error column |
All dataset shall be conformable in SETUP, but may contain a different number of observation (rnow/nbase) phi is calibrated as a phasor: arg{< exp(i PHI ) . W >} The weight W is computed as a mixture between the SNR of each TF measurement and its time distance to the science observation.
Definition at line 385 of file gravi_tf.c.
References cpl_msg_debug(), CPLCHECK_MSG, gravi_array_cexp(), gravi_data_get_oi_table(), gravi_msg_function_exit, gravi_msg_function_start, gravi_vis_flag_invalid(), and gravi_vis_flag_negative().
Referenced by gravi_calibrate_vis().
| int gravi_array_set_invalid_negative | ( | cpl_array * | array | ) |
Set invalid to all negative elements of an array.
| array | the cpl_array to modify in-place |
Definition at line 86 of file gravi_tf.c.
| char * gravi_calib_setupstring | ( | gravi_data * | data | ) |
Build a unique setup string per calibratable setup.
| data | the input gravi_data |
The setup string contains: INS.SPEC.RES, INS.POLA.MODE, FT.POLA.MODE FT.DIT and SC.DIT. The setupstring shall be desallocated properly.
Definition at line 201 of file gravi_tf.c.
References cpl_msg_debug(), CPLCHECK_NUL, gravi_data_get_header, GRAVI_FT, gravi_msg_function_exit, gravi_msg_function_start, gravi_pfits_get_dit_ft(), gravi_pfits_get_dit_sc(), gravi_pfits_get_pola_mode(), gravi_pfits_get_spec_res(), and GRAVI_SC.
Referenced by gravi_calibrate_vis().
| gravi_data * gravi_calibrate_vis | ( | gravi_data * | vis_data, |
| gravi_data ** | tf_data, | ||
| int | num_tf, | ||
| gravi_data * | phi_tf_data, | ||
| gravi_data * | tf_science, | ||
| const cpl_parameterlist * | parlist | ||
| ) |
Computes the calibrated visibility from science a single data and several previously evaluated instrumental visibility.
| vis_data | The science OIFITS data to be calibrated |
| tf_data | The list of OIFITS transfer function data |
| num_tf | The number of transfer function data |
| phi_tf_data | The transfer function data to use for separate phase calibration, or NULL |
| zero | The astrometric zero-point (unused so far) |
| tf_science | The already allocated gravi_data in which the interpolated TF at the time of the science is returned. |
| parlist | The recipe parameters :
|
Definition at line 521 of file gravi_tf.c.
References cpl_msg_info(), CPLCHECK_NUL, gravi_apply_tf_amp(), gravi_apply_tf_phi(), gravi_calib_setupstring(), gravi_data_duplicate(), gravi_data_get_header, gravi_data_get_oi_table(), GRAVI_INSNAME, gravi_msg_function_exit, gravi_msg_function_start, GRAVI_OI_FLUX_EXT, GRAVI_OI_T3_EXT, GRAVI_OI_VIS2_EXT, GRAVI_OI_VIS_EXT, gravi_param_get_bool(), gravi_param_get_double(), and gravi_pfits_get_pola_num().
Referenced by gravity_viscal().
| gravi_data * gravi_compute_tf | ( | gravi_data * | vis_data, |
| gravi_data * | diamcat_data | ||
| ) |
This function evaluates the transfer function from the observation of a reference star whose diameter can be determined.
| vis_data | The input OIFITS observation |
| diamcat_data | The input catalog of calibrator diameters (optional) |
Definition at line 786 of file gravi_tf.c.
References cpl_msg_info(), CPLCHECK_NUL, FREE, GRAVI_BASE_NAME, gravi_data_delete(), gravi_data_duplicate(), gravi_data_get_header, gravi_data_get_oi_vis, gravi_data_get_oi_vis2, gravi_data_get_oi_wave, gravi_data_get_table(), gravi_data_get_table_x(), gravi_data_is_internal, gravi_get_row_in_cat(), gravi_msg_function_exit, gravi_msg_function_start, GRAVI_OI_ARRAY_EXT, gravi_pfits_get_diameter(), gravi_pfits_get_double_silentdefault(), gravi_pfits_get_pola_num(), gravi_pfits_get_type_decep, gravi_pfits_get_type_raep, gravi_pfits_update_double(), GRAVI_TYPE, gravi_visibility_UD(), and plist.
Referenced by gravi_compute_tf_qc(), and gravity_viscal().
| cpl_error_code gravi_compute_tf_qc | ( | gravi_data * | oi_vis, |
| gravi_data * | diamcat_data | ||
| ) |
Fill QC parameters related to transfer function.
| oi_vis | The input OIFITS observation |
| diamcat_data | The input catalog of calibrator diameters (optional) |
This function evaluates the transfer function and create QC parameters in the header of the input OIFITS observation. These QC parameters are created only if the TF could be computed. The TF OIFITS data itself is actually erased.
Definition at line 1035 of file gravi_tf.c.
References cpl_msg_info(), FREE, gravi_compute_tf(), gravi_data_delete(), gravi_data_get_header, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravity_vis().
| gravi_data * gravi_compute_zp | ( | gravi_data ** | vis_calib, |
| int | num_calib | ||
| ) |
Compute the ZP data.
Definition at line 1070 of file gravi_tf.c.
References gravi_data_duplicate(), gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravity_viscal().
| cpl_size gravi_get_row_in_cat | ( | cpl_table * | diam_table, |
| double | ra, | ||
| double | dec, | ||
| double * | separation | ||
| ) |
Get the row in a cpl_table matching closest RAJ2000 and DEJ2000.
| diam_table | cpl_table with RAJ2000 and DECJ2000 in '+DD MM SS.SS' and 'HH MM SS.SS' format |
| ra | ra to search in [rad] |
| dec | dec to search in [rad] |
Definition at line 731 of file gravi_tf.c.
References gravi_dec_to_rad(), gravi_msg_function_exit, gravi_msg_function_start, and gravi_ra_to_rad().
Referenced by gravi_compute_tf().
| cpl_error_code gravi_vis_flag_invalid | ( | cpl_table * | oi_table, |
| const char * | data, | ||
| const char * | flag | ||
| ) |
Flag invalid element of an OIFITS table.
| oi_table | the OIFITS table to modify in-place |
| data | the column name (ex: VIS2DATA) |
| flag | the corresponding flag column (ex: FLAG) |
Definition at line 157 of file gravi_tf.c.
References CPLCHECK_MSG, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_apply_tf_amp(), and gravi_apply_tf_phi().
| cpl_error_code gravi_vis_flag_negative | ( | cpl_table * | oi_table, |
| const char * | data, | ||
| const char * | flag | ||
| ) |
Flag negative element of an OIFITS table.
| oi_table | the OIFITS table to modify in-place |
| data | the column name (ex: VIS2DATA) |
| flag | the corresponding flag column (ex: FLAG) |
Definition at line 117 of file gravi_tf.c.
References CPLCHECK_MSG, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_apply_tf_amp(), and gravi_apply_tf_phi().
| double gravi_visibility_UD | ( | double | uv, |
| double | diam, | ||
| double | lbd | ||
| ) |
Compute the expected visibility from a UD model.
| uv | baseline lenght [m] |
| diam | diameter [mas] |
| lbd | wavelength [m] |
Definition at line 711 of file gravi_tf.c.
Referenced by gravi_compute_tf().