|
GRAVI Pipeline Reference Manual 1.9.3
|
Functions | |
| const char * | gravi_get_license (void) |
| Get the pipeline copyright and license. | |
| cpl_error_code | gravi_msg_warning (const char *component, const char *msg) |
| cpl_table * | gravi_table_oi_create (int nwave, int nrow, const char *oi_name) |
| Create the oi table (oi_vis, oi_vis2, oi_t3) | |
| int | gravi_region_get_base (cpl_table *imaging_detector, int region) |
| Return the base of a region. | |
| int | gravi_region_get_base_sign (cpl_table *imaging_detector, int base) |
| Return the sign of a base by looking at the PORT order. | |
| int | gravi_region_get_pol (cpl_table *imaging_detector, int region) |
| Return the polarisation id of a region. | |
| int | gravi_region_get_phaseid (cpl_table *imaging_detector, int region) |
| Return the phase id of a region. | |
| int | gravi_region_get_tel (cpl_table *imaging_detector, int region, int beam) |
| Return the telescope id (0,1,2,3) in a beam of a region. | |
| char | gravi_region_get_phase (cpl_table *imaging_detector, int region) |
| Return the phase character of a region. | |
| int | gravi_get_region (cpl_table *img_det, int base, char phase, int pol) |
| Find the region matching base, phase and pol. | |
| int | gravi_wave_get_nlambda (cpl_table *wave_data, double lambda_min, double lambda_max) |
| Get the number of spectral element between lambdamin et lambdamax. | |
| int * | gravi_image_extract_dimension (cpl_image *img_profile) |
| Compute startx and nx of the illuminated part of the image. | |
| short | gravi_sta_index (int gravi_input, cpl_table *optical_train_table, cpl_table *array_geometry_table) |
| Retrieve STA_INDEX corresponding to a given input. | |
| int | gravi_get_shutter (cpl_propertylist *header, int tel) |
| int | gravi_check_shutter (cpl_propertylist *header, int t0, int t1, int t2, int t3) |
| int | gravi_get_shutter_id (cpl_propertylist *header) |
| int | gravi_get_shutter_baseid (cpl_propertylist *header) |
| int | gravi_data_check_shutter_beam (gravi_data **datas, int nb_datas) |
| cpl_size | gravi_spectrum_get_nwave (const cpl_table *table) |
| cpl_size | gravi_spectrum_get_nregion (const cpl_table *table) |
| double | gravi_spectrum_get_flux (const cpl_table *table) |
| Return the total flux in DATA# regions. | |
| cpl_vector * | gravi_compute_envelope (const cpl_vector *opd, int wave, int nwave) |
| Compute the envelope value. | |
| double | gravi_imagelist_get_flux (const cpl_imagelist *imglist) |
| Return the total flux in imagelist. | |
| cpl_error_code | gravi_lkdt_get_sequence (cpl_table *oi_table, cpl_size ntel, cpl_size *first, cpl_size *nobs) |
| Return the longuest sequence with constant LKDT. | |
| int | gravi_conf_get_iss (int gravi_beam, cpl_propertylist *header) |
| const char * | gravi_conf_get_telname (int gravi_beam, cpl_propertylist *header) |
| cpl_error_code | gravi_dump_the_boss (double ra, double dec) |
Variables | |
| int | GRAVI_BASE_TEL [GRAVI_NBASE][2] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} } |
| char | GRAVI_BASE_NAME [6][3] = {"12","13","14","23","24","34"} |
| int | GRAVI_TRI_BASE [GRAVI_NBASE][2][2] = { {{1,3},{2,4}}, {{0,3},{2,5}}, {{0,4},{1,5}}, {{0,1},{4,5}}, {{0,2},{3,5}}, {{1,2},{3,4}}} |
| int | GRAVI_TRI_SIGN [GRAVI_NBASE][2][2] = { {{1,-1},{1,-1}}, {{1,1},{1,-1}}, {{1,1},{1,1}}, {{-1,1},{1,-1}}, {{-1,1},{1,1}}, {{-1,1},{-1,1}} } |
| int | GRAVI_CLO_TEL [4][3] = {{0,1,2}, {0,1,3}, {0,2,3}, {1,2,3}} |
| char | GRAVI_CLO_NAME [4][4] = {"123", "124", "134", "234"} |
| int | GRAVI_CLO_BASE [4][3] = {{0,3,1}, {0,4,2}, {1,5,2}, {3,5,4}} |
| char | GRAVI_DATA [50][7] |
| char | GRAVI_DATAERR [50][10] |
| int | GRAVI_LABINPUT [4] = {7,5,3,1} |
This module contains some utilities to access to specific quantities.
| int gravi_check_shutter | ( | cpl_propertylist * | header, |
| int | t0, | ||
| int | t1, | ||
| int | t2, | ||
| int | t3 | ||
| ) |
Definition at line 943 of file gravi_utils.c.
References gravi_get_shutter(), and header.
Referenced by gravi_compute_gain(), gravi_compute_p2vm(), gravi_data_check_shutter_beam(), gravi_get_shutter_baseid(), and gravi_get_shutter_id().
| cpl_vector * gravi_compute_envelope | ( | const cpl_vector * | opd, |
| int | wave, | ||
| int | nwave | ||
| ) |
Compute the envelope value.
| opd | Input vector with GD in [m] |
| wave | Input wave channel |
| nwave | Number of wave channel (define spectral resolution) |
The vector is filled with the envelope amplitude at each OPD_GD position for the spectral channel wave, assuming the K-band is split into n_wave channel. Thus n_wave defines the spectral resolution (coherence length). The enveloppe is modeled with a Gaussian function.
Assume wave are ordered increasingly.
Definition at line 1081 of file gravi_utils.c.
References CPLCHECK_NUL, and GRAVI_LBD_FTSC.
Referenced by gravi_compute_p2vm(), gravi_ellipse_meanopd_create(), gravi_wave_fibre(), and gravi_wave_scan().
| int gravi_conf_get_iss | ( | int | gravi_beam, |
| cpl_propertylist * | header | ||
| ) |
Definition at line 1170 of file gravi_utils.c.
References GRAVI_LABINPUT, and header.
| const char * gravi_conf_get_telname | ( | int | gravi_beam, |
| cpl_propertylist * | header | ||
| ) |
Definition at line 1191 of file gravi_utils.c.
References cpl_msg_debug(), GRAVI_LABINPUT, and header.
Referenced by gravi_acq_measure_strehl(), gravi_acqcam_field(), gravi_acqcam_get_diode_ref_v2(), gravi_idp_compute(), gravi_metrology_get_astig(), gravi_metrology_get_fc_focus(), gravi_metrology_get_fc_shift(), gravi_metrology_get_posx(), gravi_metrology_get_posy(), gravi_metrology_telfc(), gravi_metrology_update_receiverpos(), and gravi_reduce_acqcam().
| int gravi_data_check_shutter_beam | ( | gravi_data ** | datas, |
| int | nb_datas | ||
| ) |
Definition at line 986 of file gravi_utils.c.
References cpl_msg_info(), gravi_check_shutter(), gravi_data_get_header, and header.
Referenced by gravi_compute_gain(), and gravi_compute_profile().
| cpl_error_code gravi_dump_the_boss | ( | double | ra, |
| double | dec | ||
| ) |
Definition at line 1217 of file gravi_utils.c.
References cpl_msg_info(), gravi_dec_to_rad(), and gravi_ra_to_rad().
Referenced by gravi_create_oitarget_table().
| const char * gravi_get_license | ( | void | ) |
Get the pipeline copyright and license.
The function returns a pointer to the statically allocated license string. This string should not be modified using the returned pointer.
Definition at line 104 of file gravi_utils.c.
Referenced by cpl_plugin_get_info().
| int gravi_get_region | ( | cpl_table * | img_det, |
| int | base, | ||
| char | phase, | ||
| int | pol | ||
| ) |
Find the region matching base, phase and pol.
| imaging_detector | The IMAGING_DETECTOR table |
| base | The requested base (0..5) |
| phase | The requested phase ('A','B','C' or 'D') |
| pol | The requested pol (0 or 1) |
Definition at line 584 of file gravi_utils.c.
References gravi_region_get_base(), gravi_region_get_phase(), and gravi_region_get_pol().
Referenced by gravi_ellipse_meanopd_create(), gravi_p2vm_normalisation(), gravi_visdata_fromellipse(), gravi_wave_fibre(), gravi_wave_fit_2d(), and if().
| int gravi_get_shutter | ( | cpl_propertylist * | header, |
| int | tel | ||
| ) |
Definition at line 923 of file gravi_utils.c.
References GRAVI_SHUTTER_KEY, header, and SHUTTER_KEY.
Referenced by gravi_check_shutter().
| int gravi_get_shutter_baseid | ( | cpl_propertylist * | header | ) |
Definition at line 970 of file gravi_utils.c.
References gravi_check_shutter(), and header.
| int gravi_get_shutter_id | ( | cpl_propertylist * | header | ) |
Definition at line 956 of file gravi_utils.c.
References gravi_check_shutter(), and header.
Referenced by gravi_compute_profile().
| int * gravi_image_extract_dimension | ( | cpl_image * | img_profile | ) |
Compute startx and nx of the illuminated part of the image.
| img_profile | The input image to look at |
The function collapse the vertical (y) dimension and run a median filter over x. Then the limits are defined by the region when the the median filter is larger than 0.1 x MAX
Definition at line 727 of file gravi_utils.c.
Referenced by gravi_compute_profile().
| double gravi_imagelist_get_flux | ( | const cpl_imagelist * | imglist | ) |
Return the total flux in imagelist.
| imglist | The input imagelist |
Compute the total flux by looping on image.
Definition at line 1117 of file gravi_utils.c.
Referenced by gravi_extract_spectrum().
| cpl_error_code gravi_lkdt_get_sequence | ( | cpl_table * | oi_table, |
| cpl_size | ntel, | ||
| cpl_size * | first, | ||
| cpl_size * | nobs | ||
| ) |
Return the longuest sequence with constant LKDT.
| oi_table | The table to explore |
| ntel | The number of sample per obs (4 or 6) |
| first | Return the first obs of the sequence |
| nobs | Return the nb of obs in the sequence |
Search for the longuest sequence for which the LKDT_MET_FC are the same for the ntel beams. If several are of the same length, the first is returned.
Definition at line 1145 of file gravi_utils.c.
References ntel.
Referenced by gravi_disp_cleanup().
| cpl_error_code gravi_msg_warning | ( | const char * | component, |
| const char * | msg | ||
| ) |
Definition at line 127 of file gravi_utils.c.
Referenced by gravi_average_dark(), gravi_average_vis(), gravi_compute_argon_pos(), gravi_compute_disp(), gravi_compute_signals(), gravi_data_detector_cleanup(), gravi_extract_spectrum(), gravi_preproc_acqcam(), gravi_reduce_acqcam(), gravi_vis_resamp(), gravi_vis_smooth(), and gravity_postprocess().
| int gravi_region_get_base | ( | cpl_table * | imaging_detector, |
| int | region | ||
| ) |
Return the base of a region.
| imaging_detector | The IMAGING_DETECTOR table |
| region | The region (0..47) |
The function returns a integer from 0 to 5 (or -1 on failure) If REGNAME is 12-A-C, the function returns 0 If REGNAME is 21-A-C, the function returns 0 If REGNAME is 23-A-C, the function returns 3 If REGNAME is 34-A-C, the function returns 5 ...
Definition at line 361 of file gravi_utils.c.
References GRAVI_NBASE.
Referenced by gravi_get_region(), gravi_p2vm_normalisation(), gravi_p2vm_phase_correction(), gravi_wave_fit_individual(), gravi_wave_scan(), and gravi_wave_test_image().
| int gravi_region_get_base_sign | ( | cpl_table * | imaging_detector, |
| int | base | ||
| ) |
Return the sign of a base by looking at the PORT order.
| imaging_detector | The IMAGING_DETECTOR table |
| base | The base (0..5) |
The sign is defined by the order of the beam in the PORT column. If the first PORT is the largest, the sign is -1. If the first port is the smallest, the sign is +1.
Definition at line 399 of file gravi_utils.c.
References GRAVI_BASE_NAME, and GRAVI_NBASE.
Referenced by gravi_ellipse_meanopd_create(), gravi_wave_fibre(), and gravi_wave_scan().
| char gravi_region_get_phase | ( | cpl_table * | imaging_detector, |
| int | region | ||
| ) |
Return the phase character of a region.
| imaging_detector | The IMAGING_DETECTOR table |
| region | The region (0..47) |
The function returns 'A', 'B', 'C' or 'D' If REGNAME is 12-A-C, the function returns 'A' If REGNAME is 12-B-C, the function returns 'B' If REGNAME is 12-C-C, the function returns 'C' If REGNAME is 12-D-C, the function returns 'D'
Definition at line 551 of file gravi_utils.c.
Referenced by gravi_get_region().
| int gravi_region_get_phaseid | ( | cpl_table * | imaging_detector, |
| int | region | ||
| ) |
Return the phase id of a region.
| imaging_detector | The IMAGING_DETECTOR table |
| region | The region (0..47) |
The function returns 0 to 3 (or -1 on failure). If REGNAME is 12-A-C, the function returns 0 If REGNAME is 12-B-C, the function returns 1 If REGNAME is 12-C-C, the function returns 2 If REGNAME is 12-D-C, the function returns 3
Definition at line 479 of file gravi_utils.c.
| int gravi_region_get_pol | ( | cpl_table * | imaging_detector, |
| int | region | ||
| ) |
Return the polarisation id of a region.
| imaging_detector | The IMAGING_DETECTOR table |
| region | The region (0..47) |
The function returns 0 or 1 (or -1 on failure). If REGNAME is 12-A-C, the function returns 0 If REGNAME is 12-A-S, the function returns 0 If REGNAME is 12-A-P, the function returns 1
Definition at line 445 of file gravi_utils.c.
Referenced by gravi_compute_p2vm(), gravi_compute_p2vmred(), gravi_create_oiwave_table_ft(), gravi_get_region(), gravi_interpolate_spectrum_table(), gravi_p2vm_phase_correction(), gravi_wave_fit_2d(), and gravi_wave_test_image().
| int gravi_region_get_tel | ( | cpl_table * | imaging_detector, |
| int | region, | ||
| int | beam | ||
| ) |
Return the telescope id (0,1,2,3) in a beam of a region.
| imaging_detector | The table IMAGING_DETECTOR |
| region | The region to query |
| beam | The beam to query (0 or 1) |
If REGNAME is 34-A-C, the function return 2 for beam 0 and 3 for beam 1 If REGNAME is 21-B-S, the function return 1 for beam 0 and 0 for beam 1 ...
Definition at line 512 of file gravi_utils.c.
Referenced by gravi_compute_profile().
| double gravi_spectrum_get_flux | ( | const cpl_table * | table | ) |
Return the total flux in DATA# regions.
| table | The input table |
Compute the total flux on DATA# regions by looping on regions and rows.
Definition at line 1042 of file gravi_utils.c.
References GRAVI_DATA, and gravi_spectrum_get_nregion().
Referenced by gravi_align_spectrum(), and gravi_extract_spectrum().
| cpl_size gravi_spectrum_get_nregion | ( | const cpl_table * | table | ) |
Definition at line 1018 of file gravi_utils.c.
References GRAVI_DATA.
Referenced by gravi_compute_argon_pos(), gravi_compute_argon_wave(), gravi_imglist_sc_collapse(), gravi_interpolate_spectrum_table(), gravi_p2vm_mean_spectrum(), and gravi_spectrum_get_flux().
| cpl_size gravi_spectrum_get_nwave | ( | const cpl_table * | table | ) |
Definition at line 1013 of file gravi_utils.c.
Referenced by gravi_align_spectrum(), gravi_compute_argon_pos(), gravi_compute_p2vmred(), gravi_create_oiwave_table_ft(), gravi_ellipse_meanopd_create(), gravi_extract_spectrum(), gravi_interpolate_spectrum_table(), gravi_opds_calibration(), and gravi_wave_scan().
| short gravi_sta_index | ( | int | gravi_input, |
| cpl_table * | optical_train_table, | ||
| cpl_table * | array_geometry_table | ||
| ) |
Retrieve STA_INDEX corresponding to a given input.
| gravi_input | GRAVITY input index (1..4) |
Definition at line 828 of file gravi_utils.c.
References cpl_msg_debug(), FREE, GRAVI_LABINPUT_1, GRAVI_LABINPUT_2, GRAVI_LABINPUT_3, GRAVI_LABINPUT_4, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_p2vmred().
| cpl_table * gravi_table_oi_create | ( | int | nwave, |
| int | nrow, | ||
| const char * | oi_name | ||
| ) |
Create the oi table (oi_vis, oi_vis2, oi_t3)
| nwave | The size of the wavelength |
| nrow | The number of acquisitions or of the file using to compute the visibilities |
| oi_name | The name of the table to create |
The function returns a cpl_table
Definition at line 153 of file gravi_utils.c.
References CPLCHECK_NUL, gravi_msg_function_exit, gravi_msg_function_start, GRAVI_OI_FLUX_EXT, GRAVI_OI_T3_EXT, GRAVI_OI_VIS2_EXT, and GRAVI_OI_VIS_EXT.
Referenced by gravi_compute_p2vmred(), gravi_compute_vis(), and gravi_p2vm_transmission().
| int gravi_wave_get_nlambda | ( | cpl_table * | wave_data, |
| double | lambda_min, | ||
| double | lambda_max | ||
| ) |
Get the number of spectral element between lambdamin et lambdamax.
| wave_table | The table loaded from the IMAGING_DETECTOR field |
| lambda_min | The number of the first telescope |
| lambda_max | The number of the second telescope |
The function returns a integer
Definition at line 611 of file gravi_utils.c.
References cpl_msg_info(), CPLCHECK_INT, FREE, GRAVI_DATA, and wave_data.
Referenced by gravi_create_oiwave_table_sc().
| char GRAVI_BASE_NAME[6][3] = {"12","13","14","23","24","34"} |
Definition at line 57 of file gravi_utils.c.
Referenced by gravi_compute_rejection(), gravi_compute_signals(), gravi_compute_snr(), gravi_compute_tf(), gravi_compute_vis_qc(), gravi_copy_p2vm_qcs(), gravi_p2vm_normalisation(), gravi_region_get_base_sign(), gravi_test_tracking_ratio(), gravi_wave_correct_dispersion(), gravi_wave_fibre(), gravi_wave_fit_2d(), and gravi_wave_test_image().
| int GRAVI_BASE_TEL[GRAVI_NBASE][2] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} } |
Definition at line 56 of file gravi_utils.c.
Referenced by gravi_compute_opdc_state(), gravi_compute_p2vm(), gravi_compute_p2vmred(), gravi_compute_snr(), gravi_compute_tau0(), gravi_fit_dispersion(), gravi_fit_fddl_lin(), gravi_get_base_from_tel(), gravi_get_basesign_from_tel(), gravi_opds_compute_guess(), gravi_p2vm_normalisation(), gravi_p2vm_phase_correction(), gravi_phase_fit_opdmet(), gravi_vis_bootstrap_snr_and_delay(), gravi_vis_create_acq_sc(), gravi_vis_create_f1f2_ft(), gravi_vis_create_f1f2_sc(), gravi_vis_create_met_ft(), gravi_vis_create_met_sc(), gravi_vis_create_opddisp_sc(), gravi_vis_create_opdguess_sc(), gravi_vis_create_pfactor_ft(), gravi_vis_create_pfactor_sc(), and gravi_visdata_fromellipse().
| int GRAVI_CLO_BASE[4][3] = {{0,3,1}, {0,4,2}, {1,5,2}, {3,5,4}} |
Definition at line 68 of file gravi_utils.c.
Referenced by gravi_opds_correct_closures(), and gravi_t3_average_bootstrap().
| char GRAVI_CLO_NAME[4][4] = {"123", "124", "134", "234"} |
Definition at line 65 of file gravi_utils.c.
Referenced by gravi_compute_signals(), gravi_compute_vis_qc(), and gravi_copy_p2vm_qcs().
| int GRAVI_CLO_TEL[4][3] = {{0,1,2}, {0,1,3}, {0,2,3}, {1,2,3}} |
Definition at line 64 of file gravi_utils.c.
Referenced by gravi_compute_p2vmred(), gravi_t3_average_bootstrap(), and gravi_vis_create_pfactor_sc().
| char GRAVI_DATA[50][7] |
Definition at line 71 of file gravi_utils.c.
Referenced by gravi_compute_argon_pos(), gravi_compute_argon_wave(), gravi_compute_p2vm(), gravi_compute_p2vmred(), gravi_compute_profile(), gravi_create_oiwave_table_ft(), gravi_ellipse_meanopd_create(), gravi_extract_spectrum(), gravi_imglist_sc_collapse(), gravi_interpolate_spectrum_table(), gravi_p2vm_mean_spectrum(), gravi_smooth_preproc(), gravi_spectrum_get_flux(), gravi_spectrum_get_nregion(), gravi_table_ft_format(), gravi_visdata_fromellipse(), gravi_wave_fibre(), gravi_wave_fit_2d(), gravi_wave_fit_individual(), gravi_wave_get_nlambda(), gravi_wave_qc(), gravi_wave_scan(), gravi_wave_test_image(), and if().
| char GRAVI_DATAERR[50][10] |
Definition at line 79 of file gravi_utils.c.
Referenced by gravi_compute_p2vm(), gravi_compute_p2vmred(), gravi_extract_spectrum(), gravi_imglist_sc_collapse(), gravi_interpolate_spectrum_table(), gravi_p2vm_mean_spectrum(), and gravi_table_ft_format().
| int GRAVI_LABINPUT[4] = {7,5,3,1} |
Definition at line 88 of file gravi_utils.c.
Referenced by gravi_conf_get_iss(), and gravi_conf_get_telname().
| int GRAVI_TRI_BASE[GRAVI_NBASE][2][2] = { {{1,3},{2,4}}, {{0,3},{2,5}}, {{0,4},{1,5}}, {{0,1},{4,5}}, {{0,2},{3,5}}, {{1,2},{3,4}}} |
Definition at line 60 of file gravi_utils.c.
Referenced by gravi_compute_opdc_state(), gravi_phase_correct_closures_new(), and gravi_vis_bootstrap_snr_and_delay().
| int GRAVI_TRI_SIGN[GRAVI_NBASE][2][2] = { {{1,-1},{1,-1}}, {{1,1},{1,-1}}, {{1,1},{1,1}}, {{-1,1},{1,-1}}, {{-1,1},{1,1}}, {{-1,1},{-1,1}} } |
Definition at line 61 of file gravi_utils.c.
Referenced by gravi_phase_correct_closures_new(), and gravi_vis_bootstrap_snr_and_delay().