utilities


Defines

#define dtiny(a)   ((a)<0?(a)> -1.e-30:(a)<1.e-30)
#define median_WIRTH(a, n)   sinfo_kth_smallest(a,n,(((n)&1)?((n)/2):(((n)/2)-1)))
#define TOL   1.0e-5
#define SINFO_PYTHAG(a, b)
#define SINFO_MAX(a, b)
#define SINFO_SIGN(a, b)   ((b) >= 0.0 ? fabs(a) : -fabs(a))
#define NR_END   1
#define FREE_ARG   char*

Functions

gsl_poly_complex_workspacesinfo_gsl_poly_complex_workspace_alloc (size_t n)
void sinfo_gsl_poly_complex_workspace_free (gsl_poly_complex_workspace *w)
int sinfo_gsl_poly_complex_solve (const double *a, size_t n, gsl_poly_complex_workspace *w, gsl_complex_packed_ptr z)
void sinfo_fpol (float x, float *p, int np)
void sinfo_svb_kas (float **u, float w[], float **v, int m, int n, float b[], float x[])
void sinfo_svd_variance (float **v, int ma, float w[], float **cvm)
void sinfo_svd_fitting (float *x, float *y, float *sig, int ndata, float *a, int ma, float **u, float **v, float *w, float **cvm, float *chisq, void(*funcs)(float, float *, int))
void sinfo_svd_compare (float **a, int m, int n, float w[], float **v)
void sinfo_nerror (const char error_text[])
float * sinfo_vector (long nl, long nh)
void sinfo_free_vector (float *v, long nl)
float ** sinfo_matrix (long nrl, long nrh, long ncl, long nch)
void sinfo_free_matrix (float **m, long nrl, long ncl)
int sinfo_table_column_dump (cpl_table *t, const char *name, cpl_type type)
int sinfo_check_input_data (object_config *cfg)
int sinfo_auto_size_cube3 (char **framelist, const int nframes, float *ref_offx, float *ref_offy, int *size_x, int *size_y)
 Computes size of coadded cube.
int sinfo_auto_size_cube2 (object_config *cfg, float *ref_offx, float *ref_offy)
 Computes size of coadded cube.
float * sinfo_read_distances (object_config *cfg)
 Read slitlets distances.
float ** sinfo_read_slitlets_edges (object_config *cfg)
 Read slitlets edges.
cpl_imagelist * sinfo_new_cube_getvig (cpl_imagelist *cube_in, int loleft_x, int loleft_y, int upright_x, int upright_y)
 Extract a rectangular zone from a cube into another cube.
cpl_image * sinfo_new_image_getvig (cpl_image *image_in, int loleft_x, int loleft_y, int upright_x, int upright_y)
 Extract a rectangular zone from an image into another image.
long sinfo_round_double (double x)
 Round a number to the nearest integer.

Detailed Description

TBD

TBD

TBD

TBD

TBD

TBD

TBD

TBD

TBD

TBD

TBD

TBD

TBD


Function Documentation

int sinfo_auto_size_cube2 object_config cfg,
float *  ref_offx,
float *  ref_offy
 

Computes size of coadded cube.

Parameters:
cfg inpout parameters configuration
ref_offx inpout reference offset array
ref_offy inpout reference offset array
Returns:
size of coadded cube

Definition at line 173 of file sinfo_utilities_scired.c.

References object_config::framelist, sinfo_free_propertylist(), sinfo_msg, sinfo_msg_warning, sinfo_pfits_get_cumoffsetx(), sinfo_pfits_get_cumoffsety(), object_config::size_x, and object_config::size_y.

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

int sinfo_auto_size_cube3 char **  framelist,
const int  nframes,
float *  ref_offx,
float *  ref_offy,
int *  size_x,
int *  size_y
 

Computes size of coadded cube.

Parameters:
framelist input frame list
nframes number of input frames
ref_offx input reference offset array
ref_offy input reference offset array
size_x output coadded cube x size
size_y output coadded cube y size
Returns:
size of coadded cube

Definition at line 97 of file sinfo_utilities_scired.c.

References sinfo_free_propertylist(), sinfo_msg, sinfo_msg_debug, sinfo_msg_warning, sinfo_pfits_get_cumoffsetx(), and sinfo_pfits_get_cumoffsety().

Referenced by sinfo_utl_cube_combine().

cpl_imagelist* sinfo_new_cube_getvig cpl_imagelist *  cube_in,
int  loleft_x,
int  loleft_y,
int  upright_x,
int  upright_y
 

Extract a rectangular zone from a cube into another cube.

Parameters:
cube_in Input cube
loleft_x Lower left X coordinate
loleft_y Lower left Y coordinate
upright_x Upper right X coordinate
upright_y Upper right Y coordinate
Returns:
1 newly allocated cube.
The input coordinates define the extracted region by giving the coordinates of the lower left and upper right corners (inclusive).

Coordinates must be provided in the FITS convention: lower left corner of the image is at (1,1), x growing from left to right, y growing from bottom to top.

The same rectangle is extracted from each plane in the input cube, and appended to the output cube.

The returned cube contains pixel copies of the input pixels. It must be freed using cube_del().

Definition at line 373 of file sinfo_utilities_scired.c.

References sinfo_msg_error, and sinfo_new_image_getvig().

Referenced by sinfo_new_cubes_coadd(), and sinfo_new_objnod().

cpl_image* sinfo_new_image_getvig cpl_image *  image_in,
int  loleft_x,
int  loleft_y,
int  upright_x,
int  upright_y
 

Extract a rectangular zone from an image into another image.

Parameters:
image_in Input image
loleft_x Lower left X coordinate
loleft_y Lower left Y coordinate
upright_x Upper right X coordinate
upright_y Upper right Y coordinate
Returns:
1 newly allocated image.
The input coordinates define the extracted region by giving the coordinates of the lower left and upper right corners (inclusive).

Coordinates must be provided in the FITS convention: lower left corner of the image is at (1,1), x growing from left to right, y growing from bottom to top.

Definition at line 441 of file sinfo_utilities_scired.c.

References sinfo_msg_error.

Referenced by sinfo_new_cube_getvig().

float* sinfo_read_distances object_config cfg  ) 
 

Read slitlets distances.

Parameters:
cfg inpout parameters configuration
Returns:
array with slitlet distances

Definition at line 242 of file sinfo_utilities_scired.c.

References object_config::distlist, object_config::nslits, sinfo_msg, sinfo_msg_error, and sinfo_new_array_set_value().

Referenced by sinfo_new_cubes_build(), and sinfo_new_objnod().

float** sinfo_read_slitlets_edges object_config cfg  ) 
 

Read slitlets edges.

Parameters:
cfg inpout parameters configuration
Returns:
array with slitlet edges

Definition at line 298 of file sinfo_utilities_scired.c.

References object_config::nslits, object_config::poslist, sinfo_msg_error, sinfo_new_2Dfloatarray(), and sinfo_new_array2D_set_value().

Referenced by sinfo_new_cubes_build(), and sinfo_new_objnod().

long sinfo_round_double double  x  ) 
 

Round a number to the nearest integer.

Parameters:
x The number to round
Returns:
Nearest integer
This is implemented as a function rather than a macro to avoid multiple evaluations of expressions that have side effects.

Definition at line 83 of file sinfo_utils.c.

Referenced by sinfo_select_table_rows().


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