Utility functions (wrappers)

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.

Detailed Description

This module contains wrapper functions, convenience functions and simple extensions of CPL functions.


Function Documentation

cpl_table* sinfo_extract_table_rows ( const cpl_table *  t,
const char *  column,
cpl_table_select_operator  operator,
double  value 
)

Extract table rows.

Parameters:
t Table
column Column name
operator Logical operator
value Value used for comparison
Returns:
A new table containing the extracted rows

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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  ) 
void sinfo_free_image_array ( cpl_image ***  a,
const int  n 
)

Deallocate an image array and set the pointer to NULL.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
p Polynomial to deallocate

Definition at line 306 of file sinfo_utils_wrappers.c.

void sinfo_free_propertylist ( cpl_propertylist **  p  ) 
void sinfo_free_stats ( cpl_stats **  s  ) 

Deallocate a stats object and set the pointer to NULL.

Parameters:
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.

Parameters:
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.

Parameters:
t Table
column Column name
operator Logical operator
value Value used for comparison
Returns:
Number of selected rows

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.

Parameters:
t Table
column Column name
reverse Flag indicating if column values are sorted descending (CPL_TRUE) or ascending (CPL_FALSE)
Returns:
CPL_ERROR_NONE iff OK

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.

Parameters:
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)
Returns:
CPL_ERROR_NONE iff OK

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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().


Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1