Tests Tools
[Unit Tests]

Defines

#define NB_LAMBDA   100
#define FIRST_LAMBDA   500.0
#define LAST_LAMBDA   510.0
#define NB_SLIT   40
#define FIRST_SLIT   -5
#define LAST_SLIT   5
#define POS_PLUS   30
#define COEFF0_PLUS   30.
#define COEFF1_PLUS   0.03
#define POS_CENTER   30
#define POS_MINUS   5
#define COEFF0_MINUS   10.
#define COEFF1_MINUS   0.03
#define WIDTH   5
#define HALF_WIDTH   2

Functions

cpl_image * xsh_test_create_bias_image (const char *name, int nx, int ny, xsh_instrument *instrument)
cpl_frame * xsh_test_create_frame (const char *name, int nx, int ny, const char *tag, cpl_frame_group group, xsh_instrument *instrument)
void tests_set_defaults (cpl_parameterlist *parlist)
 Set unset parameters to default value.
cpl_propertylist * mkHeader (XSH_INSTRCONFIG *iconfig, int nx, int ny, double exptime)
void setHeader (cpl_propertylist *header, XSH_INSTRCONFIG *iconfig, int nx, int ny, double exptime)
cpl_image * create_order_image (xsh_order_list *list, int nx, int ny)
xsh_order_listcreate_order_list (int norder, xsh_instrument *instrument)
void add_to_order_list (xsh_order_list *list, int order, int absorder, cpl_polynomial *poly, int xdelta, int starty, int endy)
cpl_frame * create_rectify_nod_list (int sign, const char *fname, xsh_instrument *instr)
cpl_frameset * sof_to_frameset (const char *sof_name)

Variables

static float Flux [WIDTH]
static cpl_polynomial * poly_plus = NULL
static cpl_polynomial * poly_minus = NULL

Detailed Description

Module including several functions used by various test programs.


Define Documentation

#define COEFF0_MINUS   10.

Definition at line 432 of file tests.c.

Referenced by create_rectify_nod_list().

#define COEFF0_PLUS   30.

Definition at line 428 of file tests.c.

Referenced by create_rectify_nod_list().

#define COEFF1_MINUS   0.03

Definition at line 433 of file tests.c.

Referenced by create_rectify_nod_list().

#define COEFF1_PLUS   0.03

Definition at line 429 of file tests.c.

Referenced by create_rectify_nod_list().

#define FIRST_LAMBDA   500.0

Definition at line 420 of file tests.c.

Referenced by create_rectify_nod_list().

#define FIRST_SLIT   -5

Definition at line 424 of file tests.c.

Referenced by create_rectify_nod_list().

#define HALF_WIDTH   2

Definition at line 436 of file tests.c.

Referenced by create_rectify_nod_list().

#define LAST_LAMBDA   510.0

Definition at line 421 of file tests.c.

Referenced by create_rectify_nod_list().

#define LAST_SLIT   5

Definition at line 425 of file tests.c.

Referenced by create_rectify_nod_list().

#define NB_LAMBDA   100

Definition at line 419 of file tests.c.

Referenced by create_rectify_nod_list().

#define NB_SLIT   40

Definition at line 423 of file tests.c.

Referenced by create_rectify_nod_list().

#define POS_CENTER   30

Definition at line 430 of file tests.c.

#define POS_MINUS   5

Definition at line 431 of file tests.c.

#define POS_PLUS   30

Definition at line 427 of file tests.c.

#define WIDTH   5

Definition at line 435 of file tests.c.

Referenced by create_rectify_nod_list().


Function Documentation

void add_to_order_list ( xsh_order_list list,
int  order,
int  absorder,
cpl_polynomial *  poly,
int  xdelta,
int  starty,
int  endy 
)
cpl_image* create_order_image ( xsh_order_list list,
int  nx,
int  ny 
)
xsh_order_list* create_order_list ( int  norder,
xsh_instrument instrument 
)
cpl_frame* create_rectify_nod_list ( int  sign,
const char *  fname,
xsh_instrument instr 
)
cpl_propertylist* mkHeader ( XSH_INSTRCONFIG iconfig,
int  nx,
int  ny,
double  exptime 
)

Create a header and Set the Basic Keywords of xsh images according to the instrument configuration. Some parameters of the instrument are overrriden (nx, ny, exptime).

Parameters:
iconfig Structure describing the instrument configuration
nx Nb of pixels in X (overrides the default configuration)
ny Nb of pixels in Y (overrides the default configuration)
exptime Exposure time
Returns:
Pointer to the created propertylist

Definition at line 192 of file tests.c.

References check_msg, XSH_INSTRCONFIG::conad, XSH_INSTRCONFIG::ovscx, XSH_INSTRCONFIG::ovscy, XSH_INSTRCONFIG::prscx, XSH_INSTRCONFIG::prscy, XSH_INSTRCONFIG::ron, XSH_CONAD, XSH_CRPIX1, XSH_CRPIX2, XSH_CRVAL1, XSH_CRVAL2, XSH_DET_GAIN, XSH_EXPTIME, XSH_OUT_NX, XSH_OUT_NY, XSH_OVSCX, XSH_OVSCY, XSH_PRSCX, XSH_PRSCY, XSH_PSZX, XSH_PSZY, XSH_RON, XSH_WIN_BINX, and XSH_WIN_BINY.

Referenced by createFakeFrames(), and main().

void setHeader ( cpl_propertylist *  header,
XSH_INSTRCONFIG iconfig,
int  nx,
int  ny,
double  exptime 
)

Set the Basic Keywords of xsh images according to the instrument configuration. Some parameters of the instrument are overrriden (nx, ny, exptime).

Parameters:
header the property list to update
iconfig Structure describing the instrument configuration
nx Nb of pixels in X (overrides the default configuration)
ny Nb of pixels in Y (overrides the default configuration)
exptime Exposure time

Definition at line 255 of file tests.c.

References XSH_INSTRCONFIG::bitpix, check_msg, XSH_INSTRCONFIG::conad, XSH_INSTRCONFIG::ovscx, XSH_INSTRCONFIG::ovscy, XSH_INSTRCONFIG::prscx, XSH_INSTRCONFIG::prscy, XSH_INSTRCONFIG::pxspace, XSH_INSTRCONFIG::ron, XSH_ASSURE_NOT_NULL, XSH_CHIP_NX, XSH_CHIP_NY, XSH_CONAD, XSH_DET_GAIN, XSH_DET_PXSPACE, XSH_EXPTIME, XSH_OUT_NX, XSH_OUT_NY, XSH_OVSCX, XSH_OVSCY, XSH_PRSCX, XSH_PRSCY, XSH_PSZX, XSH_PSZY, XSH_RON, XSH_WIN_BINX, and XSH_WIN_BINY.

Referenced by create_frame(), xsh_test_create_bias_image(), and xsh_test_create_frame().

cpl_frameset* sof_to_frameset ( const char *  sof_name  ) 

Definition at line 538 of file tests.c.

References check, XSH_ASSURE_NOT_NULL, xsh_free_frameset(), and xsh_msg.

Referenced by main().

void tests_set_defaults ( cpl_parameterlist *  parlist  ) 

Set unset parameters to default value.

Parameters:
parlist A parameter list
Returns:
0 iff success

The function initializes the provided parameter list by setting the current parameter values to the default parameter values.

Definition at line 144 of file tests.c.

References assure.

cpl_image* xsh_test_create_bias_image ( const char *  name,
int  nx,
int  ny,
xsh_instrument instrument 
)
cpl_frame* xsh_test_create_frame ( const char *  name,
int  nx,
int  ny,
const char *  tag,
cpl_frame_group  group,
xsh_instrument instrument 
)

Variable Documentation

float Flux[WIDTH] [static]
Initial value:
 {
  20., 40., 100., 40., 20. }

Definition at line 438 of file tests.c.

Referenced by create_rectify_nod_list().

cpl_polynomial * poly_minus = NULL [static]

Definition at line 441 of file tests.c.

Referenced by create_rectify_nod_list().

cpl_polynomial* poly_plus = NULL [static]

Definition at line 441 of file tests.c.

Referenced by create_rectify_nod_list().


Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1