|
X-shooter Pipeline Reference Manual 3.8.15
|
Macros | |
| #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 | |
| static int | xsh_poisson_random (double expectedValue) |
| generates random data with Poisson distribution | |
| 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.
| 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 432 of file tests.c.
References xsh_order::absorder, xsh_order::cenpoly, xsh_order::edglopoly, xsh_order::edguppoly, endy, xsh_order::endy, xsh_order_list::list, xsh_order::order, order, starty, and xsh_order::starty.
Referenced by main().
| xsh_instrument * create_instrument | ( | const char * | filename | ) |
Definition at line 622 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 361 of file tests.c.
References xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order_list::list, nx, ny, 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 410 of file tests.c.
References xsh_order_list::header, instrument, xsh_order_list::instrument, xsh_order_list::list, norder, 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 481 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 221 of file tests.c.
References check_msg, XSH_INSTRCONFIG::conad, exptime, nx, ny, 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_DPR_CATG, XSH_DPR_TYPE, 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 288 of file tests.c.
References XSH_INSTRCONFIG::bitpix, check_msg, XSH_INSTRCONFIG::conad, exptime, nx, ny, 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_DPR_CATG, XSH_DPR_TYPE, 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 576 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 | ) |
|
static |
generates random data with Poisson distribution
AMO added (useful in unit tests)
| expectedValue | random generator goal value |
Definition at line 72 of file tests.c.
Referenced by xsh_test_create_frame().
| cpl_image * xsh_test_create_bias_image | ( | const char * | name, |
| int | nx, | ||
| int | ny, | ||
| xsh_instrument * | instrument | ||
| ) |
Definition at line 89 of file tests.c.
References XSH_INSTRCONFIG::conad, instrument, nx, ny, 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 119 of file tests.c.
References check, instrument, nx, ny, setHeader(), size, XSH_ASSURE_NOT_NULL, xsh_free_image(), xsh_free_propertylist(), xsh_instrument_get_config(), xsh_poisson_random(), XSH_PRE_DATA_BPP, and XSH_PRE_DATA_TYPE.
Referenced by main().
|
static |
Definition at line 476 of file tests.c.
Referenced by create_rectify_nod_list().
|
static |
Definition at line 479 of file tests.c.
Referenced by create_rectify_nod_list().
|
static |
Definition at line 479 of file tests.c.
Referenced by create_rectify_nod_list().