49#define gravi_table_get_value(table,name,row,value) cpl_array_get (cpl_table_get_array (table,name,row), value, NULL)
50#define gravi_table_set_value(table,name,row,value,val) cpl_array_set (cpl_table_get_data_array (table,name)[row], value, val);
64 cpl_table * oi_wave_sc, cpl_table * oi_wave_ft);
66cpl_array *
gravi_array_cexp (
double complex factor,
const cpl_array * input);
78 cpl_size row, cpl_array * visR, cpl_array * visI);
80 cpl_size row, cpl_array * phase);
82 int row,
const char *value,
int len);
85cpl_error_code
gravi_table_new_column (cpl_table * table,
const char * name,
const char * unit, cpl_type type);
92 const cpl_table * from_table,
97 cpl_table * oi_vis2,
const char *name2);
99 const char *output_name,
int nsmooth,
int nbase);
101 const char *output_name,
int nsmooth,
int nbase);
104cpl_error_code
gravi_table_add_scalar (cpl_table * table,
const char * name,
int base,
int nbase,
double value);
112 double * gd, cpl_size nrow,
113 double max_width,
int verbose);
118 const char *output, cpl_table * oi_wave);
126 cpl_size llx, cpl_size lly,
127 cpl_size urx, cpl_size ury);
136 const char * regname1,
137 const char * regname2);
146 const cpl_image * collapse,
150 cpl_size llx, cpl_size lly,
151 cpl_size urx, cpl_size ury,
152 cpl_size llx2, cpl_size lly2);
155 cpl_size llx, cpl_size lly,
156 cpl_size urx, cpl_size ury,
157 cpl_size llx2, cpl_size lly2);
176 double percent,
double nsigma);
cpl_array * gravi_array_init_int(long n, int value)
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_array * gravi_array_smooth(cpl_array *input, int nsmooth)
cpl_table * gravi_table_extract_time_interval(cpl_table *table, double start, double end)
Extract rows from table based on the TIME column.
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_add_columns(cpl_table *oi_vis1, const char *name1, cpl_table *oi_vis2, const char *name2)
float complex ** gravi_table_get_data_array_float_complex(cpl_table *table, const char *name)
cpl_error_code gravi_table_runint_column(cpl_table *oi_vis, const char *input_name, const char *output_name, int nsmooth, int nbase)
cpl_vector * gravi_vector_extract(const cpl_vector *vector, int start, int step)
Extract part of a vector.
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_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....
cpl_array * gravi_array_create_inverse(cpl_array *input)
cpl_array * gravi_table_get_column_dimension(const cpl_table *table, const char *name)
Return an array ready for cpl_table_set_column_dimension.
double gravi_table_get_column_mean(cpl_table *table, const char *name, int base, int nbase)
cpl_image * gravi_image_wrap_matrix(cpl_matrix *matrix)
Wrap matrix into an image (data not duplicated)
cpl_error_code gravi_table_new_column(cpl_table *table, const char *name, const char *unit, cpl_type type)
double complex ** gravi_table_get_data_array_double_complex(cpl_table *table, const char *name)
cpl_image * gravi_image_from_vector(cpl_vector *vector)
cpl_array * gravi_array_cexp(double complex factor, const cpl_array *input)
Compute the complex exponention of an array: cexp (factor * input)
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_table_compute_group_delay(cpl_table *table, const char *input, const char *flag, const char *output, cpl_table *oi_wave)
cpl_array * gravi_array_init_float_complex(long n, float complex value)
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_error_code gravi_image_fill(cpl_image *img, double value)
Fill entire image with value.
cpl_matrix * gravi_matrix_invertSV_create(cpl_matrix *a_in)
Invers a matrix with singular value decomposition.
cpl_imagelist * gravi_imagelist_from_column(cpl_table *table_data, const char *data_x)
Create an imagelist from a column array in table.
cpl_error_code gravi_array_phase_unwrap(cpl_array *input)
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_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_vector_abs(cpl_vector *vector)
Return the running median of a vector, with special care for the boundaray, that are filled with the ...
double gravi_image_get_quantile(const cpl_image *img, double value)
Compute the quantile of an image.
double gravi_table_get_column_flagged_max(cpl_table *table, const char *name)
Function to compute the maximum of a column table with arrays.
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 s...
cpl_array * gravi_table_create_wave_array(cpl_table *oi_wave)
cpl_array * gravi_array_wrap_image(cpl_image *)
Wrap the data of na image into an array.
cpl_error_code gravi_table_set_array_phase(cpl_table *table, const char *name, cpl_size row, cpl_array *phase)
cpl_array * gravi_array_init_double(long n, double value)
double ** gravi_table_get_data_array_double(cpl_table *table, const char *name)
cpl_error_code gravi_array_normalize_complex(cpl_array *input)
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_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 ...
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)
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_error_code gravi_imagelist_unwrap_images(cpl_imagelist *imglist)
Unwrap an imagelist an all its images.
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_array * gravi_table_get_column_sum_array(cpl_table *table, const char *name, int base, int nbase)
cpl_image * gravi_image_from_matrix(cpl_matrix *matrix)
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_matrix * gravi_matrix_interpolate_col(cpl_matrix *matrix, cpl_vector *xref, cpl_vector *xout)
Linear interpolation of matrix column.
cpl_vector * gravi_table_get_vector(cpl_table *, cpl_size, const char *)
Create a vector from the row index of the column regname.
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_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)
int gravi_array_threshold_min(cpl_array *array, double lo_cut)
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)
double gravi_table_get_column_std(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)
cpl_error_code gravi_image_subtract_collapse(cpl_image *img, const cpl_image *collapse, int direction)
cpl_image * gravi_image_wrap_vector(cpl_vector *vector)
Wrap vector into an image (data not duplicated)
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_table_create_sigma_array(cpl_table *oi_wave)
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_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_matrix * get_matrix_from_vector(cpl_vector *, cpl_vector *)
Copy the content of two vector into a newly allocated 2D matrix.
cpl_error_code gravi_array_phase_wrap(cpl_array *input)
cpl_array * gravi_array_init_double_complex(long n, double complex value)
int ** gravi_table_get_data_array_int(cpl_table *table, const char *name)
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_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_size gravi_vector_get_maxpos(cpl_vector *vector)
Return the index of maximum in a vector. If several indexes exists with the maximum value,...
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_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)
float ** gravi_table_get_data_array_float(cpl_table *table, const char *name)
cpl_array * gravi_array_wrap_complex(cpl_array *input_re, cpl_array *input_im)
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_new_column_array(cpl_table *table, const char *name, const char *unit, cpl_type type, cpl_size size)
int gravi_table_are_equal(cpl_table *first, cpl_table *second)
Check if two tables have the same content.
cpl_error_code gravi_array_multiply_conj(cpl_array *input1, cpl_array *input2)
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