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 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 sinfoni_free_vector (cpl_vector **v)
 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 assure, check, 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.

Referenced by sinfo_new_find_distortions().

void sinfo_free_array cpl_array **  i  ) 
 

Deallocate an array and set the pointer to NULL.

Parameters:
i array to deallocate

Definition at line 259 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 380 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 371 of file sinfo_utils_wrappers.c.

Referenced by sinfo_new_cubes_coadd(), sinfo_new_objnod(), and sinfo_utl_cube_combine().

void sinfo_free_double double **  d  ) 
 

Deallocate a vector and set the pointer to NULL.

Parameters:
d double to deallocate

Definition at line 362 of file sinfo_utils_wrappers.c.

Referenced by sinfo_new_cubes_build(), sinfo_new_cubes_coadd(), sinfo_new_find_distortions(), sinfo_new_objnod(), and 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 352 of file sinfo_utils_wrappers.c.

Referenced by sinfo_free_float_array(), sinfo_new_cubes_build(), sinfo_new_cubes_coadd(), sinfo_new_dark(), sinfo_new_nst(), sinfo_new_objnod(), sinfo_table_shift_column_poly(), sinfo_table_shift_column_spline3(), 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 412 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 333 of file sinfo_utils_wrappers.c.

Referenced by sinfo_cub_stk_frames(), sinfo_new_sci_stk_frames(), and 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 323 of file sinfo_utils_wrappers.c.

Referenced by sinfo_cub_stk_frames(), sinfo_get_dummy_obj_sky_stacked_and_cubes(), sinfo_new_cubes_build(), sinfo_new_cubes_coadd(), sinfo_new_dark(), sinfo_new_find_distortions(), sinfo_new_get_dummy_obj_sky_stacked(), sinfo_new_lamp_flats(), sinfo_new_nst(), sinfo_new_objnod(), sinfo_new_prepare_stacked_frames(), sinfo_new_psf(), sinfo_new_sci_stk_frames(), sinfo_new_stdstar(), and sinfo_new_wave_cal_slit2().

void sinfo_free_image cpl_image **  i  ) 
 

Deallocate an image and set the pointer to NULL.

Parameters:
i Image to deallocate

Definition at line 250 of file sinfo_utils_wrappers.c.

Referenced by sinfo_free_image_array(), sinfo_get_dummy_obj_sky_stacked_and_cubes(), sinfo_new_cubes_build(), sinfo_new_cubes_coadd(), sinfo_new_dark(), sinfo_new_find_distortions(), sinfo_new_get_dummy_obj_sky_stacked(), sinfo_new_get_dummy_sky(), sinfo_new_lamp_flats(), sinfo_new_nst(), sinfo_new_objnod(), sinfo_new_prepare_stacked_frames(), sinfo_new_psf(), sinfo_new_slit_pos(), sinfo_new_stdstar(), sinfo_new_wave_cal_slit2(), 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_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 390 of file sinfo_utils_wrappers.c.

References sinfo_free_array_image(), and sinfo_free_image().

Referenced by sinfo_new_lamp_flats(), sinfo_new_prepare_stacked_frames(), and sinfo_new_stdstar().

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 274 of file sinfo_utils_wrappers.c.

Referenced by sinfo_new_cubes_build(), sinfo_new_cubes_coadd(), sinfo_new_dark(), sinfo_new_get_dummy_sky(), sinfo_new_lamp_flats(), sinfo_new_nst(), sinfo_new_objnod(), sinfo_new_prepare_stacked_frames(), sinfo_new_psf(), sinfo_new_stdstar(), 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 343 of file sinfo_utils_wrappers.c.

Referenced by sinfo_new_dark(), sinfo_new_find_distortions(), and sinfo_new_lamp_flats().

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 267 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 315 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 297 of file sinfo_utils_wrappers.c.

Referenced by sinfo_new_find_distortions().

void sinfo_free_propertylist cpl_propertylist **  p  ) 
 

Deallocate a property list and set the pointer to NULL.

Parameters:
p Property list to deallocate

Definition at line 289 of file sinfo_utils_wrappers.c.

Referenced by sinfo_auto_size_cube2(), sinfo_auto_size_cube3(), sinfo_get_dummy_obj_sky_stacked_and_cubes(), sinfo_new_cubes_build(), sinfo_new_cubes_coadd(), sinfo_new_dark(), sinfo_new_get_dummy_obj_sky_stacked(), sinfo_new_get_dummy_sky(), sinfo_new_objnod(), sinfo_new_psf(), sinfo_new_stdstar(), sinfo_pfits_get_ditndit(), 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.

Parameters:
s Stats object to deallocate

Definition at line 443 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 282 of file sinfo_utils_wrappers.c.

Referenced by sinfo_extract_table_rows(), sinfo_new_cubes_build(), sinfo_new_cubes_coadd(), sinfo_new_dark(), sinfo_new_find_distortions(), sinfo_new_lamp_flats(), sinfo_new_nst(), sinfo_new_objnod(), sinfo_new_prepare_stacked_frames(), sinfo_new_psf(), sinfo_new_slit_pos(), sinfo_new_stdstar(), sinfo_new_wave_cal_slit2(), sinfo_table_shift_column_int(), sinfo_table_shift_column_poly(), sinfo_table_shift_column_spline3(), 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 assure, check, passure, 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 assure, check, and 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 assure, check, and 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 468 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 459 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 451 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 306 of file sinfo_utils_wrappers.c.

void sinfoni_free_vector cpl_vector **  v  ) 
 

Deallocate a vector and set the pointer to NULL.

Parameters:
v Vector to deallocate

Definition at line 435 of file sinfo_utils_wrappers.c.

Referenced by sinfo_new_dark(), and sinfo_new_nst().


Generated on Wed Jan 17 08:33:45 2007 for SINFONI Pipeline Reference Manual by  doxygen 1.4.4