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_list * | create_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) |
xsh_instrument * | create_instrument (const char *filename) |
Variables | |
static float | Flux [WIDTH] |
static cpl_polynomial * | poly_plus = NULL |
static cpl_polynomial * | poly_minus = NULL |
Module including several functions used by various test programs.
#define COEFF0_MINUS 10. |
Definition at line 434 of file tests.c.
Referenced by create_rectify_nod_list().
#define COEFF0_PLUS 30. |
Definition at line 430 of file tests.c.
Referenced by create_rectify_nod_list().
#define COEFF1_MINUS 0.03 |
Definition at line 435 of file tests.c.
Referenced by create_rectify_nod_list().
#define COEFF1_PLUS 0.03 |
Definition at line 431 of file tests.c.
Referenced by create_rectify_nod_list().
#define FIRST_LAMBDA 500.0 |
Definition at line 422 of file tests.c.
Referenced by create_rectify_nod_list().
#define FIRST_SLIT -5 |
Definition at line 426 of file tests.c.
Referenced by create_rectify_nod_list().
#define HALF_WIDTH 2 |
Definition at line 438 of file tests.c.
Referenced by create_rectify_nod_list().
#define LAST_LAMBDA 510.0 |
Definition at line 423 of file tests.c.
Referenced by create_rectify_nod_list().
#define LAST_SLIT 5 |
Definition at line 427 of file tests.c.
Referenced by create_rectify_nod_list().
#define NB_LAMBDA 100 |
Definition at line 421 of file tests.c.
Referenced by create_rectify_nod_list().
#define NB_SLIT 40 |
Definition at line 425 of file tests.c.
Referenced by create_rectify_nod_list().
#define WIDTH 5 |
Definition at line 437 of file tests.c.
Referenced by create_rectify_nod_list().
void add_to_order_list | ( | xsh_order_list * | list, | |
int | order, | |||
int | absorder, | |||
cpl_polynomial * | poly, | |||
int | xdelta, | |||
int | starty, | |||
int | endy | |||
) |
Definition at line 396 of file tests.c.
References xsh_order::absorder, xsh_order::cenpoly, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order::endy, xsh_order_list::list, xsh_order::order, and xsh_order::starty.
Referenced by main().
xsh_instrument* create_instrument | ( | const char * | filename | ) |
Definition at line 584 of file tests.c.
References check, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_free_propertylist(), xsh_instrument_new(), xsh_instrument_set_arm(), and xsh_pfits_get_pcatg().
Referenced by main().
cpl_image* create_order_image | ( | xsh_order_list * | list, | |
int | nx, | |||
int | ny | |||
) |
Definition at line 325 of file tests.c.
References xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order_list::list, xsh_order_list::size, and xsh_order::starty.
Referenced by main().
xsh_order_list* create_order_list | ( | int | norder, | |
xsh_instrument * | instrument | |||
) |
Definition at line 374 of file tests.c.
References xsh_order_list::header, xsh_order_list::instrument, xsh_order_list::list, xsh_order_list::size, XSH_CALLOC, XSH_NEW_PROPERTYLIST, and xsh_order_list_free().
Referenced by main().
cpl_frame* create_rectify_nod_list | ( | int | sign, | |
const char * | fname, | |||
xsh_instrument * | instr | |||
) |
Definition at line 445 of file tests.c.
References check, COEFF0_MINUS, COEFF0_PLUS, COEFF1_MINUS, COEFF1_PLUS, xsh_instrument::config, xsh_rec::data1, xsh_rec::errs1, FIRST_LAMBDA, FIRST_SLIT, Flux, HALF_WIDTH, xsh_rec_list::header, xsh_rec_list::instrument, xsh_rec::lambda, LAST_LAMBDA, LAST_SLIT, xsh_rec_list::list, NB_LAMBDA, NB_SLIT, xsh_rec::nlambda, xsh_rec::nslit, xsh_rec::order, order, XSH_INSTRCONFIG::order_min, XSH_INSTRCONFIG::orders, poly_minus, poly_plus, xsh_rec::qual1, xsh_rec_list::size, xsh_rec::slit, step, WIDTH, XSH_CALLOC, XSH_GET_TAG_FROM_ARM, xsh_msg_dbg_high, XSH_NEW_PROPERTYLIST, XSH_ORDER2D, xsh_rec_list_free(), and xsh_rec_list_save().
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).
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 193 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).
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 256 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 540 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 | ) |
cpl_image* xsh_test_create_bias_image | ( | const char * | name, | |
int | nx, | |||
int | ny, | |||
xsh_instrument * | instrument | |||
) |
Definition at line 68 of file tests.c.
References XSH_INSTRCONFIG::conad, XSH_INSTRCONFIG::ron, setHeader(), xsh_instrument::update, xsh_free_propertylist(), xsh_instrument_get_config(), xsh_msg, XSH_PRE_DATA_BPP, and XSH_PRE_DATA_TYPE.
Referenced by main().
cpl_frame* xsh_test_create_frame | ( | const char * | name, | |
int | nx, | |||
int | ny, | |||
const char * | tag, | |||
cpl_frame_group | group, | |||
xsh_instrument * | instrument | |||
) |
Definition at line 98 of file tests.c.
References check, setHeader(), XSH_ASSURE_NOT_NULL, xsh_free_image(), xsh_free_propertylist(), xsh_instrument_get_config(), XSH_PRE_DATA_BPP, and XSH_PRE_DATA_TYPE.
Referenced by main().
float Flux[WIDTH] [static] |
{ 20., 40., 100., 40., 20. }
Definition at line 440 of file tests.c.
Referenced by create_rectify_nod_list().
cpl_polynomial * poly_minus = NULL [static] |
Definition at line 443 of file tests.c.
Referenced by create_rectify_nod_list().
cpl_polynomial* poly_plus = NULL [static] |
Definition at line 443 of file tests.c.
Referenced by create_rectify_nod_list().