|
GRAVI Pipeline Reference Manual 1.9.2
|
Functions | |
| double | pythag (double, double) |
| cpl_matrix * | svdcmp (cpl_matrix *, cpl_vector *, cpl_matrix *) |
| int | gravi_array_threshold_min (cpl_array *array, double lo_cut) |
| cpl_array ** | gravi_array_new_list (int n, cpl_type type, int size) |
| Allocate a list of arrays, pre-filled with 0.0. | |
| cpl_error_code | gravi_table_interpolate_column (cpl_table *to_table, const char *to_x, const char *to_y, const cpl_table *from_table, const char *from_x, const char *from_y) |
| double | gravi_table_get_column_flagged_mean (cpl_table *table, const char *name) |
| Function to compute the mean of a column table with arrays. | |
| double | gravi_table_get_column_flagged_max (cpl_table *table, const char *name) |
| Function to compute the maximum of a column table with arrays. | |
| double | gravi_table_get_column_mean (cpl_table *table, const char *name, int base, int nbase) |
| double | gravi_table_get_column_std (cpl_table *table, const char *name, int base, int nbase) |
| cpl_array * | gravi_table_get_column_sum_array (cpl_table *table, const char *name, int base, int nbase) |
| cpl_array * | gravi_table_get_column_mean_array (cpl_table *table, const char *name, int base, int nbase) |
| double ** | gravi_table_get_data_array_double (cpl_table *table, const char *name) |
| float ** | gravi_table_get_data_array_float (cpl_table *table, const char *name) |
| float complex ** | gravi_table_get_data_array_float_complex (cpl_table *table, const char *name) |
| double complex ** | gravi_table_get_data_array_double_complex (cpl_table *table, const char *name) |
| int ** | gravi_table_get_data_array_int (cpl_table *table, const char *name) |
| cpl_array * | gravi_array_init_double (long n, double value) |
| cpl_array * | gravi_array_init_int (long n, int value) |
| cpl_array * | gravi_array_init_double_complex (long n, double complex value) |
| cpl_array * | gravi_array_init_float_complex (long n, float complex value) |
| cpl_array * | gravi_array_wrap_complex (cpl_array *input_re, cpl_array *input_im) |
| cpl_array * | gravi_array_wrap_float_complex (cpl_array *input_re, cpl_array *input_im) |
| cpl_array * | gravi_array_compute_norm2 (cpl_array *input_re, cpl_array *input_im) |
| cpl_error_code | gravi_table_set_array_double_complex (cpl_table *table, const char *name, cpl_size row, cpl_array *visR, cpl_array *visI) |
| cpl_error_code | gravi_table_set_array_phase (cpl_table *table, const char *name, cpl_size row, cpl_array *phase) |
| cpl_error_code | gravi_table_set_string_fixlen (cpl_table *table, const char *name, int row, const char *value, int len) |
| Set string in table, ensuring fixed length (right space padding). see cpl_table_set_string. | |
| cpl_array * | gravi_array_rebin (const cpl_array *input, const cpl_array *errs, cpl_table *oi_wave_sc, cpl_table *oi_wave_ft) |
| cpl_error_code | gravi_table_add_columns (cpl_table *oi_vis1, const char *name1, cpl_table *oi_vis2, const char *name2) |
| cpl_error_code | gravi_table_runint_column (cpl_table *oi_vis, const char *input_name, const char *output_name, int nsmooth, int nbase) |
| cpl_error_code | gravi_table_smooth_column (cpl_table *oi_vis, const char *input_name, const char *output_name, int nsmooth, int nbase) |
| cpl_array * | gravi_table_create_sigma_array (cpl_table *oi_wave) |
| cpl_array * | gravi_table_create_wave_array (cpl_table *oi_wave) |
| cpl_error_code | gravi_array_normalize_complex (cpl_array *input) |
| cpl_array * | gravi_array_create_inverse (cpl_array *input) |
| cpl_error_code | gravi_array_phase_unwrap (cpl_array *input) |
| cpl_error_code | gravi_array_phase_wrap (cpl_array *input) |
| cpl_array * | gravi_array_cexp (double complex factor, const cpl_array *input) |
| Compute the complex exponention of an array: cexp (factor * input) | |
| cpl_error_code | gravi_array_multiply_phasor (cpl_array *input, double complex factor, cpl_array *phase) |
| Multiply a REAL phase to a COMPLEX array, in-place: input = input * cexp (factor * phase) | |
| cpl_error_code | gravi_array_add_phasor (cpl_array *input, double complex factor, cpl_array *phase) |
| Add a REAL phase to a COMPLEX array, in-place: input = input + cexp (factor * phase) | |
| cpl_error_code | gravi_array_add_phasors (cpl_array *input, cpl_array *add, cpl_array *sub) |
| Add a pair of COMPLEX arrays to a COMPLEX array, in-place: input = input + add*conj(sub) | |
| cpl_error_code | gravi_array_add_phase (cpl_array *input, double factor, cpl_array *phase) |
| Add a REAL phase to a REAL phase array, in-place: input = input + factor * phase. | |
| cpl_error_code | gravi_array_multiply_conj (cpl_array *input1, cpl_array *input2) |
| cpl_array * | gravi_array_smooth (cpl_array *input_array, int DIT_smooth) |
| cpl_error_code | gravi_array_get_group_delay_loop (cpl_array **input, cpl_array **flag, cpl_array *sigma, double *gd, cpl_size nrow, double max_width, int verbose) |
| Optimized computation of GDELAY for a list of arrays. | |
| cpl_error_code | gravi_table_compute_group_delay (cpl_table *table, const char *input, const char *flag, const char *output, cpl_table *oi_wave) |
| int | gravi_table_are_equal (cpl_table *first, cpl_table *second) |
| Check if two tables have the same content. | |
| cpl_error_code | gravi_table_new_column (cpl_table *table, const char *name, const char *unit, cpl_type type) |
| cpl_error_code | gravi_table_new_column_array (cpl_table *table, const char *name, const char *unit, cpl_type type, cpl_size size) |
| cpl_error_code | gravi_table_init_column_array (cpl_table *table, const char *name, const char *unit, cpl_type type, cpl_size size) |
| cpl_error_code | gravi_imagelist_unwrap_images (cpl_imagelist *imglist) |
| Unwrap an imagelist an all its images. | |
| cpl_imagelist * | gravi_imagelist_wrap_column (cpl_table *table_data, const char *data_x) |
| Wrap a column array of a table into an imagelist. | |
| double | gravi_image_get_noise_window (cpl_image *img, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury) |
| Estimate the median noise in a window. This noise is estimated as the median{img**2}**0.5, so that it is a robust estimate. | |
| cpl_image * | gravi_image_collapse_median_x (cpl_image *img, cpl_size drop_from, cpl_size drop_to) |
| collapse image along the x direction, droping a part of the image | |
| cpl_error_code | gravi_image_subtract_collapse (cpl_image *img, const cpl_image *collapse, int direction) |
| cpl_error_code | gravi_image_subtract_window (cpl_image *img1, const cpl_image *img2, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, cpl_size llx2, cpl_size lly2) |
| cpl_error_code | gravi_image_replace_window (cpl_image *img1, const cpl_image *img2, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, cpl_size llx2, cpl_size lly2) |
| cpl_image * | gravi_image_from_column (cpl_table *table_data, const char *data_x, cpl_size row) |
| Create an image from a column array in table. | |
| cpl_imagelist * | gravi_imagelist_from_column (cpl_table *table_data, const char *data_x) |
| Create an imagelist from a column array in table. | |
| cpl_array * | gravi_table_get_column_dimension (const cpl_table *table, const char *name) |
| Return an array ready for cpl_table_set_column_dimension. | |
| cpl_array * | gravi_array_wrap_image (cpl_image *img) |
| Wrap the data of na image into an array. | |
| cpl_matrix * | get_matrix_from_vector (cpl_vector *vector1, cpl_vector *vector2) |
| Copy the content of two vector into a newly allocated 2D matrix. | |
| cpl_vector * | gravi_table_get_vector (cpl_table *spectrum_data, cpl_size index, const char *regname) |
Create a vector from the row index of the column regname. | |
| cpl_vector * | gravi_table_get_vector_scalar (cpl_table *table, const char *name, cpl_size base, cpl_size nbase) |
| cpl_vector * | gravi_table_get_vector_diff (cpl_table *spectrum_data, int index, const char *regname1, const char *regname2) |
Create a vector from the row index of the column regname. | |
| cpl_error_code | gravi_image_fill (cpl_image *img, double value) |
| Fill entire image with value. | |
| cpl_image * | gravi_image_wrap_matrix (cpl_matrix *matrix) |
| Wrap matrix into an image (data not duplicated) | |
| cpl_image * | gravi_image_from_matrix (cpl_matrix *matrix) |
| cpl_image * | gravi_image_wrap_vector (cpl_vector *vector) |
| Wrap vector into an image (data not duplicated) | |
| cpl_image * | gravi_image_from_vector (cpl_vector *vector) |
| double | gravi_image_get_quantile (const cpl_image *img, double thr) |
| Compute the quantile of an image. | |
| double | gravi_array_get_quantile (cpl_array *arr, double thr) |
| Compute the value of the vector corresponding to the quantile 'thr' (0 < thr < 1) | |
| cpl_vector * | gravi_vector_median (const cpl_vector *vector, cpl_size hw) |
| Return the running median of a vector, with special care for the boundaray, that are filled with the value at nw and size-hw. Running median is created with cpl_vector_filter_median_create or cpl_vector_get_median if size is less than hw*2+3. | |
| cpl_error_code | gravi_vector_abs (cpl_vector *vector) |
| Return the running median of a vector, with special care for the boundaray, that are filled with the value at nw and size-hw. Running median is created with cpl_vector_filter_median_create or cpl_vector_get_median if size is less than hw*2+3. | |
| cpl_size | gravi_vector_get_maxpos (cpl_vector *vector) |
| Return the index of maximum in a vector. If several indexes exists with the maximum value, the smallest index is returned. | |
| double | gravi_vector_get_mean_clip (cpl_vector *vector_in, double percent, double nsigma) |
| Return the mean of a vector after extrema and RMS clipping. | |
| cpl_vector * | gravi_vector_extract (const cpl_vector *vector, int start, int step) |
| Extract part of a vector. | |
| cpl_error_code | gravi_vector_unwrap_with_guess (cpl_vector *vector, cpl_vector *ref, double ref_to_phase) |
| Unwrap a phase vector following a guess vector. The difference is actually unwrap and shall thus be slowly evolving. The operration if performed in-place. | |
| cpl_error_code | gravi_table_multiply_scalar (cpl_table *table, const char *name, int base, int nbase, double value) |
| Multiply scalar or array column by scalar. | |
| cpl_error_code | gravi_table_add_scalar (cpl_table *table, const char *name, int base, int nbase, double value) |
| Multply scalar or array column by scalar. | |
| cpl_matrix * | gravi_matrix_interpolate_col (cpl_matrix *matrix, cpl_vector *xref, cpl_vector *xout) |
| Linear interpolation of matrix column. | |
| cpl_matrix * | gravi_matrix_invertSV_create (cpl_matrix *a_in) |
| Invers a matrix with singular value decomposition. | |
| cpl_table * | gravi_table_extract_time_interval (cpl_table *table, double start, double end) |
| Extract rows from table based on the TIME column. | |
This module implements some interactions with cpl objects to address specific gravity needs. The manipulated cpl object are cpl_matrix, cpl_array, cpl_table and cpl_image
| cpl_matrix * get_matrix_from_vector | ( | cpl_vector * | vector1, |
| cpl_vector * | vector2 | ||
| ) |
Copy the content of two vector into a newly allocated 2D matrix.
| vector1 | |
| vector2 |
Definition at line 2185 of file gravi_cpl.c.
Referenced by gravi_ellipse_phase_create().
| cpl_error_code gravi_array_add_phase | ( | cpl_array * | input, |
| double | factor, | ||
| cpl_array * | phase | ||
| ) |
Add a REAL phase to a REAL phase array, in-place: input = input + factor * phase.
Definition at line 1241 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_p2vm_phase_correction(), and gravi_vis_create_phaseref_sc().
| cpl_error_code gravi_array_add_phasor | ( | cpl_array * | input, |
| double complex | factor, | ||
| cpl_array * | phase | ||
| ) |
Add a REAL phase to a COMPLEX array, in-place: input = input + cexp (factor * phase)
Definition at line 1185 of file gravi_cpl.c.
References CPLCHECK_MSG.
| cpl_error_code gravi_array_add_phasors | ( | cpl_array * | input, |
| cpl_array * | add, | ||
| cpl_array * | sub | ||
| ) |
Add a pair of COMPLEX arrays to a COMPLEX array, in-place: input = input + add*conj(sub)
Definition at line 1211 of file gravi_cpl.c.
References CPLCHECK_MSG.
| cpl_array * gravi_array_cexp | ( | double complex | factor, |
| const cpl_array * | input | ||
| ) |
Compute the complex exponention of an array: cexp (factor * input)
Definition at line 1137 of file gravi_cpl.c.
Referenced by gravi_apply_tf_phi(), and gravi_p2vm_phase_correction().
| cpl_array * gravi_array_compute_norm2 | ( | cpl_array * | input_re, |
| cpl_array * | input_im | ||
| ) |
Definition at line 688 of file gravi_cpl.c.
Referenced by gravi_vis_average_bootstrap().
| cpl_array * gravi_array_create_inverse | ( | cpl_array * | input | ) |
Definition at line 1071 of file gravi_cpl.c.
References CPLCHECK_NUL.
| cpl_error_code gravi_array_get_group_delay_loop | ( | cpl_array ** | input, |
| cpl_array ** | flag, | ||
| cpl_array * | sigma, | ||
| double * | gd, | ||
| cpl_size | nrow, | ||
| double | max_width, | ||
| int | verbose | ||
| ) |
Optimized computation of GDELAY for a list of arrays.
| input | Pointer to arrays (complex coherent flux) |
| flag | Pointer to arrays (flag to discard data), can be NULL |
| sigma | Array with the wavenumbers [m] |
| gd | Pointer to output GDELAYs [m] |
| nrow | Size of input and gd |
| max_width | Maximum opd to explore [m] |
| verbose | Flag to dump the computation time in log |
For each input array, the group-delay in [m] as the maximum of |Env(x)| where Env(x) = < visdata(lbd) * exp(2i.pi * x / lbd) > with <> sum over lbd
This is optimized to run on a column of arrays:
Definition at line 1403 of file gravi_cpl.c.
References cpl_msg_debug(), CPLCHECK_MSG, FREE, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_average_self_visphi(), gravi_compute_vis(), gravi_p2vm_phase_correction(), and gravi_table_compute_group_delay().
| double gravi_array_get_quantile | ( | cpl_array * | arr, |
| double | thr | ||
| ) |
Compute the value of the vector corresponding to the quantile 'thr' (0 < thr < 1)
Definition at line 2511 of file gravi_cpl.c.
Referenced by gravi_p2vm_normalisation().
| cpl_array * gravi_array_init_double | ( | long | n, |
| double | value | ||
| ) |
Definition at line 597 of file gravi_cpl.c.
Referenced by gravi_create_oiarray_table(), gravi_flux_create_met_sc(), gravi_t3_average_bootstrap(), gravi_vis_average_amp(), gravi_vis_average_bootstrap(), gravi_vis_average_phi(), gravi_vis_compute_column_mean(), gravi_vis_create_met_sc(), and gravi_vis_create_vfactor_sc().
| cpl_array * gravi_array_init_double_complex | ( | long | n, |
| double complex | value | ||
| ) |
Definition at line 619 of file gravi_cpl.c.
Referenced by gravi_t3_average_bootstrap(), gravi_vis_average_phi(), gravi_vis_compute_column_mean(), gravi_vis_create_met_sc(), and gravi_vis_create_vfactor_sc().
| cpl_array * gravi_array_init_float_complex | ( | long | n, |
| float complex | value | ||
| ) |
Definition at line 630 of file gravi_cpl.c.
| cpl_array * gravi_array_init_int | ( | long | n, |
| int | value | ||
| ) |
Definition at line 608 of file gravi_cpl.c.
| cpl_error_code gravi_array_multiply_conj | ( | cpl_array * | input1, |
| cpl_array * | input2 | ||
| ) |
Definition at line 1262 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_p2vm_phase_correction().
| cpl_error_code gravi_array_multiply_phasor | ( | cpl_array * | input, |
| double complex | factor, | ||
| cpl_array * | phase | ||
| ) |
Multiply a REAL phase to a COMPLEX array, in-place: input = input * cexp (factor * phase)
Definition at line 1159 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_average_self_visphi(), gravi_compute_disp(), gravi_compute_vis(), gravi_p2vm_phase_correction(), and gravi_vis_create_phaseref_sc().
| cpl_array ** gravi_array_new_list | ( | int | n, |
| cpl_type | type, | ||
| int | size | ||
| ) |
Allocate a list of arrays, pre-filled with 0.0.
Definition at line 93 of file gravi_cpl.c.
References FREE.
Referenced by gravi_average_self_visphi(), gravi_flux_average_bootstrap(), gravi_t3_average_bootstrap(), and gravi_vis_average_bootstrap().
| cpl_error_code gravi_array_normalize_complex | ( | cpl_array * | input | ) |
Definition at line 1053 of file gravi_cpl.c.
References CPLCHECK_MSG.
| cpl_error_code gravi_array_phase_unwrap | ( | cpl_array * | input | ) |
Definition at line 1088 of file gravi_cpl.c.
References CPLCHECK_INT.
Referenced by gravi_compute_disp(), and gravi_metrology_drs().
| cpl_error_code gravi_array_phase_wrap | ( | cpl_array * | input | ) |
Definition at line 1119 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_vis_create_imagingref_sc(), gravi_vis_create_opddisp_sc(), and gravi_vis_create_phaseref_sc().
| cpl_array * gravi_array_rebin | ( | const cpl_array * | input, |
| const cpl_array * | errs, | ||
| cpl_table * | oi_wave_sc, | ||
| cpl_table * | oi_wave_ft | ||
| ) |
Definition at line 792 of file gravi_cpl.c.
References CPLCHECK_NUL, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_normalize_sc_to_ft().
| cpl_array * gravi_array_smooth | ( | cpl_array * | input_array, |
| int | DIT_smooth | ||
| ) |
Definition at line 1285 of file gravi_cpl.c.
Referenced by gravi_metrology_drs(), gravi_metrology_telfc(), and gravi_smooth_preproc().
| int gravi_array_threshold_min | ( | cpl_array * | array, |
| double | lo_cut | ||
| ) |
Definition at line 71 of file gravi_cpl.c.
Referenced by gravi_t3_average_bootstrap(), and gravi_vis_average_bootstrap().
| cpl_array * gravi_array_wrap_complex | ( | cpl_array * | input_re, |
| cpl_array * | input_im | ||
| ) |
Definition at line 641 of file gravi_cpl.c.
Referenced by gravi_table_set_array_double_complex(), and gravi_vis_average_bootstrap().
| cpl_array * gravi_array_wrap_float_complex | ( | cpl_array * | input_re, |
| cpl_array * | input_im | ||
| ) |
Definition at line 664 of file gravi_cpl.c.
| cpl_array * gravi_array_wrap_image | ( | cpl_image * | img | ) |
Wrap the data of na image into an array.
| img | The image to wrap |
img. cpl_array_unwrap(). Definition at line 2141 of file gravi_cpl.c.
References CPLCHECK_NUL.
Referenced by gravi_compute_dark(), and gravi_compute_profile().
| cpl_image * gravi_image_collapse_median_x | ( | cpl_image * | img, |
| cpl_size | drop_from, | ||
| cpl_size | drop_to | ||
| ) |
collapse image along the x direction, droping a part of the image
| img | image |
| drop_from | follow FITS convention start at 1 |
| drop_to | follow FITS convention start at 1 |
The returned image has size nx=1 and the same ny as the input image. It should be desallocated with cpl_image_delete
Definition at line 1884 of file gravi_cpl.c.
References FREE, gravi_msg_function_exit, and gravi_msg_function_start.
| cpl_error_code gravi_image_fill | ( | cpl_image * | img, |
| double | value | ||
| ) |
Fill entire image with value.
Definition at line 2398 of file gravi_cpl.c.
| cpl_image * gravi_image_from_column | ( | cpl_table * | table_data, |
| const char * | data_x, | ||
| cpl_size | row | ||
| ) |
Create an image from a column array in table.
| table_data | The input table |
| data_x | The column name |
| row | The row to extract |
The array is copied into image of same type. The returned pointer shall be deleted with cpl_image_delete
FIXME: to be optimized
Definition at line 2052 of file gravi_cpl.c.
References gravi_imagelist_unwrap_images(), gravi_imagelist_wrap_column(), gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_gain(), and gravi_compute_profile().
| cpl_image * gravi_image_from_matrix | ( | cpl_matrix * | matrix | ) |
Definition at line 2423 of file gravi_cpl.c.
| cpl_image * gravi_image_from_vector | ( | cpl_vector * | vector | ) |
Definition at line 2451 of file gravi_cpl.c.
| double gravi_image_get_noise_window | ( | cpl_image * | img, |
| cpl_size | llx, | ||
| cpl_size | lly, | ||
| cpl_size | urx, | ||
| cpl_size | ury | ||
| ) |
Estimate the median noise in a window. This noise is estimated as the median{img**2}**0.5, so that it is a robust estimate.
Definition at line 1839 of file gravi_cpl.c.
References CPLCHECK_MSG, FREE, gravi_msg_function_exit, and gravi_msg_function_start.
| double gravi_image_get_quantile | ( | const cpl_image * | img, |
| double | thr | ||
| ) |
Compute the quantile of an image.
| img | input image |
| thr | quantile fraction (0 < thr < 1) |
Compute the value of the image corresponding to the quantile fraction 'thr', that is such that their is nx*ny*thr pixels with values lower the returned value.
Definition at line 2477 of file gravi_cpl.c.
Referenced by gravi_compute_badpix(), and gravi_compute_biasmask().
| cpl_error_code gravi_image_replace_window | ( | cpl_image * | img1, |
| const cpl_image * | img2, | ||
| cpl_size | llx, | ||
| cpl_size | lly, | ||
| cpl_size | urx, | ||
| cpl_size | ury, | ||
| cpl_size | llx2, | ||
| cpl_size | lly2 | ||
| ) |
Definition at line 2004 of file gravi_cpl.c.
References cpl_msg_info(), gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_acqcam_pupil_v2().
| cpl_error_code gravi_image_subtract_collapse | ( | cpl_image * | img, |
| const cpl_image * | collapse, | ||
| int | direction | ||
| ) |
Definition at line 1921 of file gravi_cpl.c.
References CPLCHECK_MSG, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_data_detector_cleanup().
| cpl_error_code gravi_image_subtract_window | ( | cpl_image * | img1, |
| const cpl_image * | img2, | ||
| cpl_size | llx, | ||
| cpl_size | lly, | ||
| cpl_size | urx, | ||
| cpl_size | ury, | ||
| cpl_size | llx2, | ||
| cpl_size | lly2 | ||
| ) |
Definition at line 1971 of file gravi_cpl.c.
References gravi_msg_function_exit, and gravi_msg_function_start.
| cpl_image * gravi_image_wrap_matrix | ( | cpl_matrix * | matrix | ) |
Wrap matrix into an image (data not duplicated)
Definition at line 2415 of file gravi_cpl.c.
| cpl_image * gravi_image_wrap_vector | ( | cpl_vector * | vector | ) |
Wrap vector into an image (data not duplicated)
Definition at line 2443 of file gravi_cpl.c.
| cpl_imagelist * gravi_imagelist_from_column | ( | cpl_table * | table_data, |
| const char * | data_x | ||
| ) |
Create an imagelist from a column array in table.
| table_data | The input table |
| data_x | The column name |
The array of each row are copied into image of their type, and append into the returned imagelist. The returned pointer shall be deleted with cpl_imagelist_delete
FIXME: to be optimized
Definition at line 2084 of file gravi_cpl.c.
References gravi_imagelist_unwrap_images(), gravi_imagelist_wrap_column(), gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_gain().
| cpl_error_code gravi_imagelist_unwrap_images | ( | cpl_imagelist * | imglist | ) |
Unwrap an imagelist an all its images.
| imglist | The imagelist to unwrap |
All the images of imaglist are unwrapped, that is the data remain allocated but the image structure is deleted (see cpl_image_unwrap). Then the imagelist structure itself is deleted with cpl_imagelist_delete.
Definition at line 1727 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_compute_dark(), gravi_compute_p2vm(), gravi_compute_profile(), gravi_image_from_column(), gravi_imagelist_from_column(), gravi_imglist_sc_collapse(), and gravi_wave_test_image().
| cpl_imagelist * gravi_imagelist_wrap_column | ( | cpl_table * | table_data, |
| const char * | data_x | ||
| ) |
Wrap a column array of a table into an imagelist.
| table_data | The input table |
| data_x | The column name |
The array of each row are wrapped into image of their type, and append into the returned imagelist. The returned pointer shall be deleted with gravi_imagelist_unwrap_images
Definition at line 1757 of file gravi_cpl.c.
References CPLCHECK_NUL, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_dark(), gravi_compute_p2vm(), gravi_compute_profile(), gravi_image_from_column(), gravi_imagelist_from_column(), gravi_imglist_sc_collapse(), and gravi_wave_test_image().
| cpl_matrix * gravi_matrix_interpolate_col | ( | cpl_matrix * | matrix, |
| cpl_vector * | xref, | ||
| cpl_vector * | xout | ||
| ) |
Linear interpolation of matrix column.
| matrix | The input matrix to interpolate (size n,m) |
| xref | The vector of current x axis (size m) |
| xout | The vector of target x axis (size k) |
The routine interpolate each column of the matrix using cpl_bivector_interpolate_linear
Definition at line 2867 of file gravi_cpl.c.
References CPLCHECK_NUL, FREE, gravi_msg_function_exit, and gravi_msg_function_start.
| cpl_matrix * gravi_matrix_invertSV_create | ( | cpl_matrix * | a_in | ) |
Invers a matrix with singular value decomposition.
| a_in | The input matrix to invert |
Definition at line 2921 of file gravi_cpl.c.
References CPLCHECK_NUL, gravi_msg_function_exit, gravi_msg_function_start, and svdcmp().
Referenced by gravi_compute_p2vm(), and gravi_compute_p2vmred().
| cpl_error_code gravi_table_add_columns | ( | cpl_table * | oi_vis1, |
| const char * | name1, | ||
| cpl_table * | oi_vis2, | ||
| const char * | name2 | ||
| ) |
Definition at line 840 of file gravi_cpl.c.
References cpl_msg_debug(), CPLCHECK_MSG, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_disp(), and gravi_compute_snr().
| cpl_error_code gravi_table_add_scalar | ( | cpl_table * | table, |
| const char * | name, | ||
| int | base, | ||
| int | nbase, | ||
| double | value | ||
| ) |
Multply scalar or array column by scalar.
| table | The table to modify in-place |
| name | The name of the column to modify |
| base | The starting row |
| nbase | The row increment |
| value | Value to add |
Each row in base::nbase (pythonic notation) of the column name is being added by value.
Definition at line 2816 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_opds_compute_guess().
| int gravi_table_are_equal | ( | cpl_table * | first, |
| cpl_table * | second | ||
| ) |
Check if two tables have the same content.
| first | table to compare |
| second | table to compare |
Definition at line 1585 of file gravi_cpl.c.
References cpl_msg_debug(), cpl_msg_info(), FREE, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_data_append().
| cpl_error_code gravi_table_compute_group_delay | ( | cpl_table * | table, |
| const char * | input, | ||
| const char * | flag, | ||
| const char * | output, | ||
| cpl_table * | oi_wave | ||
| ) |
Definition at line 1535 of file gravi_cpl.c.
References CPLCHECK_MSG, FREE, gravi_array_get_group_delay_loop(), gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_new_column().
Referenced by gravi_compute_signals(), and gravi_fit_dispersion().
| cpl_array * gravi_table_create_sigma_array | ( | cpl_table * | oi_wave | ) |
Definition at line 1024 of file gravi_cpl.c.
References CPLCHECK_NUL.
Referenced by gravi_p2vm_phase_correction().
| cpl_array * gravi_table_create_wave_array | ( | cpl_table * | oi_wave | ) |
Definition at line 1037 of file gravi_cpl.c.
References CPLCHECK_NUL.
| cpl_table * gravi_table_extract_time_interval | ( | cpl_table * | table, |
| double | start, | ||
| double | end | ||
| ) |
Extract rows from table based on the TIME column.
| table | input table |
| start,end | max and min accepted time. |
Definition at line 3261 of file gravi_cpl.c.
References gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_vis().
| cpl_array * gravi_table_get_column_dimension | ( | const cpl_table * | table, |
| const char * | name | ||
| ) |
Return an array ready for cpl_table_set_column_dimension.
| table | The input table |
| name | The column name |
The return array (CPL_TYPE_INT) is of size the number returned by cpl_table_get_column_dimensions, and each values corresponds to the dimension returned by cpl_table_get_column_dimension
Definition at line 2114 of file gravi_cpl.c.
| double gravi_table_get_column_flagged_max | ( | cpl_table * | table, |
| const char * | name | ||
| ) |
Function to compute the maximum of a column table with arrays.
| table | The table to get the maximum of the column |
| name | The name of the column to average |
This function computes the maximum of a column table which contains arrays. It ignores flagged values, i.e., those ones in which the column 'FLAG' in the same table contains invalid elements. Note that the flagging is evaluated on a per array element basis. Also note that the maximum is computed for all rows.
Definition at line 290 of file gravi_cpl.c.
Referenced by gravi_idp_compute().
| double gravi_table_get_column_flagged_mean | ( | cpl_table * | table, |
| const char * | name | ||
| ) |
Function to compute the mean of a column table with arrays.
| table | The table to get the averaged column |
| name | The name of the column to average |
This function computes the mean of a column table which contains arrays. It ignores flagged values, i.e., those ones in which the column 'FLAG' in the same table contains invalid elements. Note that the flagging is evaluated on a per array element basis. Also note that all the rows are averaged, there is no stride like it is done in gravi_table_get_column_mean.
Definition at line 217 of file gravi_cpl.c.
Referenced by gravi_idp_compute().
| double gravi_table_get_column_mean | ( | cpl_table * | table, |
| const char * | name, | ||
| int | base, | ||
| int | nbase | ||
| ) |
Definition at line 343 of file gravi_cpl.c.
References FREE.
Referenced by gravi_compute_signals(), gravi_compute_snr(), gravi_compute_vis_qc(), gravi_fit_dispersion(), and gravi_opds_compute_guess().
| cpl_array * gravi_table_get_column_mean_array | ( | cpl_table * | table, |
| const char * | name, | ||
| int | base, | ||
| int | nbase | ||
| ) |
Definition at line 449 of file gravi_cpl.c.
| double gravi_table_get_column_std | ( | cpl_table * | table, |
| const char * | name, | ||
| int | base, | ||
| int | nbase | ||
| ) |
Definition at line 388 of file gravi_cpl.c.
Referenced by gravi_acqcam_field(), and gravi_fit_dispersion().
| cpl_array * gravi_table_get_column_sum_array | ( | cpl_table * | table, |
| const char * | name, | ||
| int | base, | ||
| int | nbase | ||
| ) |
Definition at line 427 of file gravi_cpl.c.
Referenced by gravi_compute_outliers(), gravi_flux_average_bootstrap(), and gravi_vis_average_bootstrap().
| double ** gravi_table_get_data_array_double | ( | cpl_table * | table, |
| const char * | name | ||
| ) |
Definition at line 473 of file gravi_cpl.c.
References CPLCHECK_NUL.
Referenced by gravi_flux_create_fddllin_sc(), gravi_metrology_telfc(), and gravi_visdata_fromellipse().
| double complex ** gravi_table_get_data_array_double_complex | ( | cpl_table * | table, |
| const char * | name | ||
| ) |
Definition at line 546 of file gravi_cpl.c.
References CPLCHECK_NUL.
Referenced by gravi_fit_dispersion().
| float ** gravi_table_get_data_array_float | ( | cpl_table * | table, |
| const char * | name | ||
| ) |
Definition at line 497 of file gravi_cpl.c.
References CPLCHECK_NUL.
Referenced by gravi_compute_tau0().
| float complex ** gravi_table_get_data_array_float_complex | ( | cpl_table * | table, |
| const char * | name | ||
| ) |
Definition at line 521 of file gravi_cpl.c.
References CPLCHECK_NUL.
| int ** gravi_table_get_data_array_int | ( | cpl_table * | table, |
| const char * | name | ||
| ) |
Definition at line 570 of file gravi_cpl.c.
References CPLCHECK_NUL.
| cpl_vector * gravi_table_get_vector | ( | cpl_table * | spectrum_data, |
| cpl_size | index, | ||
| const char * | regname | ||
| ) |
Create a vector from the row index of the column regname.
| spectrum_table | The table loaded from the SPECTRUM_DATA field |
| regname | The column's name on the table |
| index | The index on the row (0 for a scalar column) |
Create a vector from the row index of the column regname The returned vector must be deallocated.
Definition at line 2235 of file gravi_cpl.c.
References FREE.
Referenced by gravi_compute_p2vm(), gravi_ellipse_meanopd_create(), gravi_p2vm_normalisation(), gravi_wave_fibre(), gravi_wave_scan(), and if().
| cpl_vector * gravi_table_get_vector_diff | ( | cpl_table * | spectrum_data, |
| int | index, | ||
| const char * | regname1, | ||
| const char * | regname2 | ||
| ) |
Create a vector from the row index of the column regname.
| spectrum_table | The table loaded from the SPECTRUM_DATA field |
| index | The index on the row |
| regname1 | The column's name on the table |
| regname2 | The column's name on the table |
Create a vector from the row index of the column regname The returned vector must be deallocated.
Definition at line 2356 of file gravi_cpl.c.
| cpl_vector * gravi_table_get_vector_scalar | ( | cpl_table * | table, |
| const char * | name, | ||
| cpl_size | base, | ||
| cpl_size | nbase | ||
| ) |
Definition at line 2291 of file gravi_cpl.c.
References FREE.
| cpl_error_code gravi_table_init_column_array | ( | cpl_table * | table, |
| const char * | name, | ||
| const char * | unit, | ||
| cpl_type | type, | ||
| cpl_size | size | ||
| ) |
Definition at line 1692 of file gravi_cpl.c.
References FREE.
Referenced by gravi_fit_dispersion(), gravi_metrology_telfc(), gravi_table_interpolate_column(), and gravi_vis_create_pfactor_ft().
| cpl_error_code gravi_table_interpolate_column | ( | cpl_table * | to_table, |
| const char * | to_x, | ||
| const char * | to_y, | ||
| const cpl_table * | from_table, | ||
| const char * | from_x, | ||
| const char * | from_y | ||
| ) |
Definition at line 121 of file gravi_cpl.c.
References CPLCHECK_MSG, FREE, gravi_msg_function_exit, gravi_msg_function_start, gravi_table_get_value, gravi_table_init_column_array(), and gravi_table_set_value.
Referenced by gravi_compute_disp().
| cpl_error_code gravi_table_multiply_scalar | ( | cpl_table * | table, |
| const char * | name, | ||
| int | base, | ||
| int | nbase, | ||
| double | value | ||
| ) |
Multiply scalar or array column by scalar.
| table | The table to modify in-place |
| name | The name of the column to modify |
| base | The starting row |
| nbase | The row increment |
| value | Value to multiply |
Each row in base::nbase (pythonic notation) of the column name is being multiplied by value.
Definition at line 2766 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_compute_disp().
| cpl_error_code gravi_table_new_column | ( | cpl_table * | table, |
| const char * | name, | ||
| const char * | unit, | ||
| cpl_type | type | ||
| ) |
Definition at line 1656 of file gravi_cpl.c.
References cpl_msg_info().
Referenced by gravi_acqcam_field(), gravi_acqcam_set_pupil_table_v2(), gravi_compute_argon_pos(), gravi_compute_disp(), gravi_compute_opdc_state(), gravi_compute_rejection(), gravi_compute_signals(), gravi_compute_vis(), gravi_eop_load_finals2000A(), gravi_flux_create_acq_sc(), gravi_flux_create_average(), gravi_flux_create_fddllin_sc(), gravi_flux_create_fddlpos_sc(), gravi_flux_create_met_sc(), gravi_flux_create_totalflux_sc(), gravi_metrology_acq(), gravi_metrology_tac(), gravi_metrology_telfc(), gravi_opds_calibration(), gravi_opds_compute_guess(), gravi_signal_create_sync(), gravi_table_compute_group_delay(), gravi_vis_compute_interspectre(), gravi_vis_compute_isdelay(), gravi_vis_compute_mean_phasor(), gravi_vis_compute_snr(), gravi_vis_create_acq_sc(), gravi_vis_create_lockratio_sc(), gravi_vis_create_met_ft(), gravi_vis_create_met_sc(), gravi_vis_create_opddisp_sc(), gravi_vis_create_opdguess_sc(), gravi_vis_create_opdsc_ft(), gravi_vis_create_pfactor_sc(), gravi_vis_create_vfactor_sc(), and gravi_visdata_fromellipse().
| cpl_error_code gravi_table_new_column_array | ( | cpl_table * | table, |
| const char * | name, | ||
| const char * | unit, | ||
| cpl_type | type, | ||
| cpl_size | size | ||
| ) |
Definition at line 1678 of file gravi_cpl.c.
Referenced by gravi_compute_argon_pos(), gravi_compute_argon_wave(), gravi_compute_disp(), gravi_compute_p2vmred(), gravi_fit_fddl_lin(), gravi_flux_create_met_sc(), gravi_metrology_tac(), 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_phaseref_ft(), gravi_vis_create_phaseref_sc(), gravi_vis_create_vfactor_sc(), gravi_visdata_fromellipse(), and gravi_wave_scan().
| cpl_error_code gravi_table_runint_column | ( | cpl_table * | oi_vis, |
| const char * | input_name, | ||
| const char * | output_name, | ||
| int | nsmooth, | ||
| int | nbase | ||
| ) |
Definition at line 911 of file gravi_cpl.c.
References CPLCHECK_MSG, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_compute_snr(), and gravi_table_smooth_column().
| cpl_error_code gravi_table_set_array_double_complex | ( | cpl_table * | table, |
| const char * | name, | ||
| cpl_size | row, | ||
| cpl_array * | visR, | ||
| cpl_array * | visI | ||
| ) |
Definition at line 714 of file gravi_cpl.c.
References CPLCHECK_MSG, and gravi_array_wrap_complex().
Referenced by gravi_vis_average_bootstrap().
| cpl_error_code gravi_table_set_array_phase | ( | cpl_table * | table, |
| const char * | name, | ||
| cpl_size | row, | ||
| cpl_array * | phase | ||
| ) |
Definition at line 738 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_average_self_visphi(), gravi_compute_vis(), gravi_t3_average_bootstrap(), gravi_vis_average_bootstrap(), and gravi_vis_average_phi().
| cpl_error_code gravi_table_set_string_fixlen | ( | cpl_table * | table, |
| const char * | name, | ||
| int | row, | ||
| const char * | value, | ||
| int | len | ||
| ) |
Set string in table, ensuring fixed length (right space padding). see cpl_table_set_string.
| len,the | specified maximum length of the string. |
Definition at line 769 of file gravi_cpl.c.
References CPLCHECK_MSG, FREE, gravi_msg_function_exit, and gravi_msg_function_start.
Referenced by gravi_create_oiarray_table(), and gravi_create_oitarget_table().
| cpl_error_code gravi_table_smooth_column | ( | cpl_table * | oi_vis, |
| const char * | input_name, | ||
| const char * | output_name, | ||
| int | nsmooth, | ||
| int | nbase | ||
| ) |
Definition at line 1004 of file gravi_cpl.c.
References gravi_msg_function_exit, gravi_msg_function_start, and gravi_table_runint_column().
Referenced by gravi_compute_signals(), and gravi_compute_snr().
| cpl_error_code gravi_vector_abs | ( | cpl_vector * | vector | ) |
Return the running median of a vector, with special care for the boundaray, that are filled with the value at nw and size-hw. Running median is created with cpl_vector_filter_median_create or cpl_vector_get_median if size is less than hw*2+3.
| vector | Input vector (size) |
| hw | Same parameter as in cpl_vector_filter_median_create |
Definition at line 2588 of file gravi_cpl.c.
Referenced by gravi_create_outlier_flag_sc().
| cpl_vector * gravi_vector_extract | ( | const cpl_vector * | vector, |
| int | start, | ||
| int | step | ||
| ) |
Extract part of a vector.
| vector | Input vector (size) |
| start | Starting index (0...size-1) |
| step | Step index, so the returned values are every step |
Definition at line 2696 of file gravi_cpl.c.
Referenced by if().
| cpl_size gravi_vector_get_maxpos | ( | cpl_vector * | vector | ) |
Return the index of maximum in a vector. If several indexes exists with the maximum value, the smallest index is returned.
| vector | Input vector (size) |
Definition at line 2614 of file gravi_cpl.c.
Referenced by gravi_wave_scan().
| double gravi_vector_get_mean_clip | ( | cpl_vector * | vector_in, |
| double | percent, | ||
| double | nsigma | ||
| ) |
Return the mean of a vector after extrema and RMS clipping.
| vector_in | input vector |
| percent | 0-1, fraction of extremes values rejected |
| nsigma | sigma clipping |
Definition at line 2642 of file gravi_cpl.c.
References FREE.
Referenced by gravi_data_detector_cleanup().
| cpl_vector * gravi_vector_median | ( | const cpl_vector * | vector, |
| cpl_size | hw | ||
| ) |
Return the running median of a vector, with special care for the boundaray, that are filled with the value at nw and size-hw. Running median is created with cpl_vector_filter_median_create or cpl_vector_get_median if size is less than hw*2+3.
| vector | Input vector (size) |
| hw | Same parameter as in cpl_vector_filter_median_create |
Definition at line 2547 of file gravi_cpl.c.
Referenced by gravi_create_outlier_flag_sc().
| cpl_error_code gravi_vector_unwrap_with_guess | ( | cpl_vector * | vector, |
| cpl_vector * | ref, | ||
| double | ref_to_phase | ||
| ) |
Unwrap a phase vector following a guess vector. The difference is actually unwrap and shall thus be slowly evolving. The operration if performed in-place.
| vector | to unwrap [rad] |
| ref | is the guess |
| ref_to_phase | is the coefficient to convert ref into [rad] |
Definition at line 2719 of file gravi_cpl.c.
References CPLCHECK_MSG.
Referenced by gravi_ellipse_meanopd_create(), and gravi_wave_fibre().
| double pythag | ( | double | a, |
| double | b | ||
| ) |
Definition at line 2980 of file gravi_cpl.c.
Referenced by svdcmp().
| cpl_matrix * svdcmp | ( | cpl_matrix * | a_in, |
| cpl_vector * | w, | ||
| cpl_matrix * | v | ||
| ) |
Definition at line 2995 of file gravi_cpl.c.
References gravi_msg_function_exit, gravi_msg_function_start, IMIN, pythag(), and SIGN.
Referenced by gravi_matrix_invertSV_create().