Functions | |
cpl_error_code | sinfo_sort_table_1 (cpl_table *t, const char *column, cpl_boolean reverse) |
Sort a table by one column. | |
cpl_error_code | sinfo_sort_table_2 (cpl_table *t, const char *column1, const char *column2, cpl_boolean reverse1, cpl_boolean reverse2) |
Sort a table by two columns. | |
cpl_table * | sinfo_extract_table_rows (const cpl_table *t, const char *column, cpl_table_select_operator operator, double value) |
Extract table rows. | |
int | sinfo_select_table_rows (cpl_table *t, const char *column, cpl_table_select_operator operator, double value) |
Select table rows. | |
void | sinfo_free_parameter (cpl_parameter **p) |
Deallocate an image and set the pointer to NULL. | |
void | sinfo_free_apertures (cpl_apertures **a) |
Deallocate an aperture and set the pointer to NULL. | |
void | sinfo_free_image (cpl_image **i) |
Deallocate an image and set the pointer to NULL. | |
void | sinfoni_free_vector (cpl_vector **v) |
Deallocate an image and set the pointer to NULL. | |
void | sinfo_free_array (cpl_array **i) |
Deallocate an array and set the pointer to NULL. | |
void | sinfo_free_mask (cpl_mask **m) |
Deallocate an image mask and set the pointer to NULL. | |
void | sinfo_free_imagelist (cpl_imagelist **i) |
Deallocate an image list and set the pointer to NULL. | |
void | sinfo_free_table (cpl_table **t) |
Deallocate a table and set the pointer to NULL. | |
void | sinfo_free_propertylist (cpl_propertylist **p) |
Deallocate a property list and set the pointer to NULL. | |
void | sinfo_free_polynomial (cpl_polynomial **p) |
Deallocate a polynomial and set the pointer to NULL. | |
void | sinfoni_free_matrix (cpl_matrix **m) |
Deallocate a matrix and set the pointer to NULL. | |
void | sinfo_free_parameterlist (cpl_parameterlist **p) |
Deallocate a parameter list and set the pointer to NULL. | |
void | sinfo_free_frameset (cpl_frameset **f) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_frame (cpl_frame **f) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_int (int **i) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_float (float **f) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_double (double **d) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_array_imagelist (cpl_imagelist ***a) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_array_image (cpl_image ***a) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_image_array (cpl_image ***a, const int n) |
Deallocate an image array and set the pointer to NULL. | |
void | sinfo_free_float_array (float ***a, const int n) |
Deallocate an array of float arrays and set the pointer to NULL. | |
void | sinfo_free_my_vector (cpl_vector **v) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_bivector (cpl_bivector **bv) |
Deallocate a vector and set the pointer to NULL. | |
void | sinfo_free_stats (cpl_stats **s) |
Deallocate a stats object and set the pointer to NULL. | |
void | sinfo_unwrap_vector (cpl_vector **v) |
Unwrap a vector and set the pointer to NULL. | |
void | sinfo_unwrap_matrix (cpl_matrix **m) |
Unwrap a matrix and set the pointer to NULL. | |
void | sinfo_unwrap_bivector_vectors (cpl_bivector **b) |
Unwrap a bi-vector and set the pointer to NULL. |
This module contains wrapper functions, convenience functions and simple extensions of CPL functions.
cpl_table* sinfo_extract_table_rows | ( | const cpl_table * | t, | |
const char * | column, | |||
cpl_table_select_operator | operator, | |||
double | value | |||
) |
Extract table rows.
t | Table | |
column | Column name | |
operator | Logical operator | |
value | Value used for comparison |
A table row is extracted if and only if the value in column is in the relation operator to the specified value. The specified column must have type CPL_TYPE_DOUBLE or CPL_TYPE_INT. If integer, the integer nearest to value is used for the comparison.
Also see cpl_table_and_selected_<type>()
.
Definition at line 138 of file sinfo_utils_wrappers.c.
References sinfo_free_table(), and sinfo_select_table_rows().
void sinfo_free_apertures | ( | cpl_apertures ** | a | ) |
Deallocate an aperture and set the pointer to NULL.
a | parameter to deallocate |
Definition at line 240 of file sinfo_utils_wrappers.c.
void sinfo_free_array | ( | cpl_array ** | i | ) |
Deallocate an array and set the pointer to NULL.
i | array to deallocate |
Definition at line 268 of file sinfo_utils_wrappers.c.
void sinfo_free_array_image | ( | cpl_image *** | a | ) |
Deallocate a vector and set the pointer to NULL.
a | array to deallocate |
Definition at line 389 of file sinfo_utils_wrappers.c.
Referenced by sinfo_free_image_array().
void sinfo_free_array_imagelist | ( | cpl_imagelist *** | a | ) |
Deallocate a vector and set the pointer to NULL.
a | array to deallocate |
Definition at line 380 of file sinfo_utils_wrappers.c.
Referenced by sinfo_utl_cube_combine().
void sinfo_free_bivector | ( | cpl_bivector ** | bv | ) |
Deallocate a vector and set the pointer to NULL.
bv | Vector to deallocate |
Definition at line 455 of file sinfo_utils_wrappers.c.
Referenced by sinfo_strehl_compute_one().
void sinfo_free_double | ( | double ** | d | ) |
Deallocate a vector and set the pointer to NULL.
d | double to deallocate |
Definition at line 371 of file sinfo_utils_wrappers.c.
Referenced by sinfo_utl_cube_combine().
void sinfo_free_float | ( | float ** | f | ) |
Deallocate a vector and set the pointer to NULL.
f | float to deallocate |
Definition at line 361 of file sinfo_utils_wrappers.c.
Referenced by sinfo_free_float_array(), and sinfo_utl_cube_combine().
void sinfo_free_float_array | ( | float *** | a, | |
const int | n | |||
) |
Deallocate an array of float arrays and set the pointer to NULL.
a | array to deallocate | |
n | array size |
Definition at line 421 of file sinfo_utils_wrappers.c.
References sinfo_free_float().
void sinfo_free_frame | ( | cpl_frame ** | f | ) |
Deallocate a vector and set the pointer to NULL.
f | Frame to deallocate |
Definition at line 342 of file sinfo_utils_wrappers.c.
Referenced by sinfo_utl_cube2spectrum().
void sinfo_free_frameset | ( | cpl_frameset ** | f | ) |
Deallocate a vector and set the pointer to NULL.
f | Frame set to deallocate |
Definition at line 332 of file sinfo_utils_wrappers.c.
Referenced by sinfo_new_wave_cal_slit2().
void sinfo_free_image | ( | cpl_image ** | i | ) |
Deallocate an image and set the pointer to NULL.
i | Image to deallocate |
Definition at line 250 of file sinfo_utils_wrappers.c.
Referenced by sinfo_compute_psf(), sinfo_free_image_array(), sinfo_get_bkg_4corners(), sinfo_new_wave_cal_slit2(), sinfo_remove_crh_single(), sinfo_skycor(), sinfo_utl_cube2ima(), sinfo_utl_cube2spectrum(), sinfo_utl_cube_arith(), sinfo_utl_cube_combine(), sinfo_utl_spectrum_divide_by_blackbody(), sinfo_utl_spectrum_wavelength_shift(), and sinfo_vector_to_image().
void sinfo_free_image_array | ( | cpl_image *** | a, | |
const int | n | |||
) |
Deallocate an image array and set the pointer to NULL.
a | array to deallocate | |
n | array size |
Definition at line 399 of file sinfo_utils_wrappers.c.
References sinfo_free_array_image(), and sinfo_free_image().
void sinfo_free_imagelist | ( | cpl_imagelist ** | i | ) |
Deallocate an image list and set the pointer to NULL.
i | Image list to deallocate |
Definition at line 283 of file sinfo_utils_wrappers.c.
Referenced by sinfo_skycor(), sinfo_utl_cube2ima(), sinfo_utl_cube2spectrum(), sinfo_utl_cube_arith(), and sinfo_utl_cube_combine().
void sinfo_free_int | ( | int ** | i | ) |
Deallocate a vector and set the pointer to NULL.
i | int to deallocate |
Definition at line 352 of file sinfo_utils_wrappers.c.
void sinfo_free_mask | ( | cpl_mask ** | m | ) |
Deallocate an image mask and set the pointer to NULL.
m | Mask to deallocate |
Definition at line 276 of file sinfo_utils_wrappers.c.
void sinfo_free_my_vector | ( | cpl_vector ** | v | ) |
Deallocate a vector and set the pointer to NULL.
v | Vector to deallocate |
Definition at line 444 of file sinfo_utils_wrappers.c.
void sinfo_free_parameter | ( | cpl_parameter ** | p | ) |
Deallocate an image and set the pointer to NULL.
p | parameter to deallocate |
Definition at line 230 of file sinfo_utils_wrappers.c.
void sinfo_free_parameterlist | ( | cpl_parameterlist ** | p | ) |
Deallocate a parameter list and set the pointer to NULL.
p | Parameter list to deallocate |
Definition at line 324 of file sinfo_utils_wrappers.c.
void sinfo_free_polynomial | ( | cpl_polynomial ** | p | ) |
Deallocate a polynomial and set the pointer to NULL.
p | Polynomial to deallocate |
Definition at line 306 of file sinfo_utils_wrappers.c.
void sinfo_free_propertylist | ( | cpl_propertylist ** | p | ) |
Deallocate a property list and set the pointer to NULL.
p | Property list to deallocate |
Definition at line 298 of file sinfo_utils_wrappers.c.
Referenced by sinfo_pfits_get_exptime(), sinfo_pfits_get_pixelscale(), sinfo_sort_table_1(), sinfo_sort_table_2(), sinfo_utl_cube2ima(), sinfo_utl_cube2spectrum(), sinfo_utl_cube_arith(), sinfo_utl_cube_combine(), sinfo_utl_spectrum_divide_by_blackbody(), and sinfo_utl_spectrum_wavelength_shift().
void sinfo_free_stats | ( | cpl_stats ** | s | ) |
Deallocate a stats object and set the pointer to NULL.
s | Stats object to deallocate |
Definition at line 468 of file sinfo_utils_wrappers.c.
void sinfo_free_table | ( | cpl_table ** | t | ) |
Deallocate a table and set the pointer to NULL.
t | Table to deallocate |
Definition at line 291 of file sinfo_utils_wrappers.c.
Referenced by sinfo_extract_table_rows(), sinfo_new_wave_cal_slit2(), sinfo_skycor(), and sinfo_utl_cube2spectrum().
int sinfo_select_table_rows | ( | cpl_table * | t, | |
const char * | column, | |||
cpl_table_select_operator | operator, | |||
double | value | |||
) |
Select table rows.
t | Table | |
column | Column name | |
operator | Logical operator | |
value | Value used for comparison |
A row is selected if and only if the value in column is in the relation operator to the specified value. The specified column must have type CPL_TYPE_DOUBLE or CPL_TYPE_INT. If integer, the integer nearest to value is used for the comparison.
Also see cpl_table_and_selected_<type>()
.
Definition at line 191 of file sinfo_utils_wrappers.c.
References sinfo_round_double(), and sinfo_tostring_cpl_type().
Referenced by sinfo_extract_table_rows().
cpl_error_code sinfo_sort_table_1 | ( | cpl_table * | t, | |
const char * | column, | |||
cpl_boolean | reverse | |||
) |
Sort a table by one column.
t | Table | |
column | Column name | |
reverse | Flag indicating if column values are sorted descending (CPL_TRUE) or ascending (CPL_FALSE) |
This is a wrapper of cpl_table_sort()
.
Definition at line 60 of file sinfo_utils_wrappers.c.
References sinfo_free_propertylist().
cpl_error_code sinfo_sort_table_2 | ( | cpl_table * | t, | |
const char * | column1, | |||
const char * | column2, | |||
cpl_boolean | reverse1, | |||
cpl_boolean | reverse2 | |||
) |
Sort a table by two columns.
t | Table | |
column1 | 1st column name | |
column2 | 2nd column name | |
reverse1 | Flag indicating if 1st column values are sorted descending (true) or ascending (CPL_FALSE) | |
reverse2 | Flag indicating if 2nd column values are sorted descending (true) or ascending (CPL_TRUE) |
This is a wrapper of cpl_table_sort()
. column1 is the more significant column (i.e. values in column2 are compared, only if the values in column1 are equal).
Definition at line 97 of file sinfo_utils_wrappers.c.
References sinfo_free_propertylist().
void sinfo_unwrap_bivector_vectors | ( | cpl_bivector ** | b | ) |
Unwrap a bi-vector and set the pointer to NULL.
b | Bi-vector to deallocate |
Definition at line 493 of file sinfo_utils_wrappers.c.
void sinfo_unwrap_matrix | ( | cpl_matrix ** | m | ) |
Unwrap a matrix and set the pointer to NULL.
m | matrix to unwrap |
Definition at line 484 of file sinfo_utils_wrappers.c.
void sinfo_unwrap_vector | ( | cpl_vector ** | v | ) |
Unwrap a vector and set the pointer to NULL.
v | Vector to unwrap |
Definition at line 476 of file sinfo_utils_wrappers.c.
void sinfoni_free_matrix | ( | cpl_matrix ** | m | ) |
Deallocate a matrix and set the pointer to NULL.
m | Matrix to deallocate |
Definition at line 315 of file sinfo_utils_wrappers.c.
Referenced by sinfo_remove_crh_single().
void sinfoni_free_vector | ( | cpl_vector ** | v | ) |
Deallocate an image and set the pointer to NULL.
v | Vector to deallocate |
Definition at line 259 of file sinfo_utils_wrappers.c.
Referenced by sinfo_remove_crh_single(), and sinfo_utl_cube_arith().