GRAVI Pipeline Reference Manual 1.7.2
Loading...
Searching...
No Matches
Macros | Functions
gravi_cpl.h File Reference
#include <cpl.h>

Go to the source code of this file.

Macros

#define gravi_table_get_value(table, name, row, value)   cpl_array_get (cpl_table_get_array (table,name,row), value, NULL)
 
#define gravi_table_set_value(table, name, row, value, val)   cpl_array_set (cpl_table_get_data_array (table,name)[row], value, val);
 

Functions

cpl_array ** gravi_array_new_list (int n, cpl_type type, int size)
 Allocate a list of arrays, pre-filled with 0.0.
 
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)
 
double gravi_table_get_column_mean (cpl_table *table, const char *name, int base, int nbase)
 
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_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)
 
int gravi_array_threshold_min (cpl_array *array, double lo_cut)
 
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_array * gravi_array_smooth (cpl_array *input, int nsmooth)
 
cpl_array * gravi_array_rebin (const cpl_array *input, const cpl_array *errs, cpl_table *oi_wave_sc, cpl_table *oi_wave_ft)
 
cpl_array * gravi_array_create_inverse (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_normalize_complex (cpl_array *input)
 
cpl_error_code gravi_array_phase_unwrap (cpl_array *input)
 
cpl_error_code gravi_array_phase_wrap (cpl_array *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_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_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_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.
 
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_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)
 
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_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_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_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)
 
cpl_matrix * get_matrix_from_vector (cpl_vector *, cpl_vector *)
 Copy the content of two vector into a newly allocated 2D matrix.
 
cpl_imagelist * gravi_imagelist_from_column (cpl_table *table_data, const char *data_x)
 Create an imagelist from a column array in table.
 
cpl_imagelist * gravi_imagelist_wrap_column (cpl_table *table_data, const char *data_x)
 Wrap a column array of a table into an imagelist.
 
cpl_error_code gravi_imagelist_unwrap_images (cpl_imagelist *imglist)
 Unwrap an imagelist an all its images.
 
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_vector * gravi_table_get_vector (cpl_table *, cpl_size, const char *)
 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_array * gravi_array_wrap_image (cpl_image *)
 Wrap the data of na image into an array.
 
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_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)
 
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.
 
double gravi_image_get_quantile (const cpl_image *img, double value)
 Compute the quantile of an image.
 
double gravi_array_get_quantile (cpl_array *arr, double value)
 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.
 
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.
 
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_array * gravi_table_get_column_dimension (const cpl_table *table, const char *name)
 Return an array ready for cpl_table_set_column_dimension.
 
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.
 

Macro Definition Documentation

◆ gravi_table_get_value

#define gravi_table_get_value (   table,
  name,
  row,
  value 
)    cpl_array_get (cpl_table_get_array (table,name,row), value, NULL)

Definition at line 49 of file gravi_cpl.h.

◆ gravi_table_set_value

#define gravi_table_set_value (   table,
  name,
  row,
  value,
  val 
)    cpl_array_set (cpl_table_get_data_array (table,name)[row], value, val);

Definition at line 50 of file gravi_cpl.h.