Defines | |
#define | MODULE_ID "XSH_REMOVE_CRH_MULTIPLE" |
#define | CR_PIX_VALUE 32000. |
#define | CR_PLACE_X 5 |
#define | CR_PLACE_Y 5 |
Enumerations | |
enum | { NIMG_OPT, NBCR_OPT, DEBUG_OPT, SIZE_OPT, BGMIN_OPT, BGMAX_OPT, SIGMA_OPT, HELP_OPT } |
Functions | |
static void | Help (void) |
static void | HandleOptions (int argc, char **argv) |
static cpl_frameset * | createFakeFrames (XSH_INSTRCONFIG *iconfig) |
static int | verifCr (cpl_frame *medframe) |
int | main (int argc, char **argv) |
Unit test of xsh_remove_crh_multiple. | |
Variables | |
static struct option | long_options [] |
static xsh_instrument * | instrument = NULL |
static xsh_clipping_param | crh_clipping |
static int | nbImages = 4 |
static int | nbCr = 1 |
static int | totCr = 0 |
static int | imgSize = 10 |
static double | bgMin = 80. |
static double | bgMax = 90. |
static double | sigma = 4.0 |
#define CR_PIX_VALUE 32000. |
Definition at line 71 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames().
#define CR_PLACE_X 5 |
Definition at line 109 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames().
#define CR_PLACE_Y 5 |
Definition at line 110 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames().
#define MODULE_ID "XSH_REMOVE_CRH_MULTIPLE" |
Definition at line 68 of file test-xsh_remove_crh_multiple.c.
anonymous enum |
Definition at line 75 of file test-xsh_remove_crh_multiple.c.
static cpl_frameset * createFakeFrames | ( | XSH_INSTRCONFIG * | iconfig | ) | [static] |
Definition at line 123 of file test-xsh_remove_crh_multiple.c.
References bgMax, bgMin, CR_PIX_VALUE, CR_PLACE_X, CR_PLACE_Y, imgSize, mkHeader(), nbCr, nbImages, totCr, xsh_free_image(), xsh_free_propertylist(), and xsh_msg.
Referenced by main().
static void HandleOptions | ( | int | argc, | |
char ** | argv | |||
) | [static] |
Definition at line 275 of file test-xsh_remove_crh_multiple.c.
References bgMax, BGMAX_OPT, bgMin, BGMIN_OPT, DEBUG_OPT, Help(), imgSize, long_options, nbCr, NBCR_OPT, nbImages, NIMG_OPT, sigma, SIGMA_OPT, SIZE_OPT, XSH_DEBUG_LEVEL_HIGH, XSH_DEBUG_LEVEL_LOW, and xsh_debug_level_set().
Referenced by main().
static void Help | ( | void | ) | [static] |
Definition at line 258 of file test-xsh_remove_crh_multiple.c.
References TEST_END.
Referenced by HandleOptions().
int main | ( | int | argc, | |
char ** | argv | |||
) |
Unit test of xsh_remove_crh_multiple.
Test behaviour of xsh_remove_crh_multiple function. Create fake frames including predefined Cosmic rays. Call xsh_prepare. Then in turn call xsh_remove_crh_multi and verify that the output is compatible with the CR created.
< Median frame, result of remove_crh
Definition at line 325 of file test-xsh_remove_crh_multiple.c.
References assure, check, check_msg, createFakeFrames(), xsh_clipping_param::frac, HandleOptions(), MODULE_ID, xsh_clipping_param::niter, xsh_clipping_param::res_max, sigma, xsh_clipping_param::sigma, sof_to_frameset(), TEST_END, TESTS_INIT, verifCr(), XSH_ARM_UVB, XSH_DEBUG_LEVEL_MEDIUM, xsh_debug_level_set(), xsh_dfs_set_groups(), xsh_dfs_split_in_group(), xsh_error_dump, xsh_free_frame(), xsh_free_frameset(), xsh_instrument_free(), xsh_instrument_get_config(), xsh_instrument_new(), xsh_instrument_set_arm(), xsh_instrument_set_decode_bp(), xsh_instrument_set_lamp(), xsh_instrument_set_mode(), xsh_instrument_set_recipe_id(), XSH_LAMP_QTH, XSH_MODE_IFU, xsh_msg, XSH_NEW_FRAMESET, xsh_prepare(), and xsh_remove_crh_multiple().
static int verifCr | ( | cpl_frame * | medframe | ) | [static] |
Definition at line 179 of file test-xsh_remove_crh_multiple.c.
References assure, check_msg, imgSize, totCr, xsh_bpmap_count(), xsh_msg, xsh_pre_free(), and xsh_pre_load().
Referenced by main().
double bgMax = 90. [static] |
Definition at line 106 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames(), and HandleOptions().
double bgMin = 80. [static] |
Definition at line 105 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames(), and HandleOptions().
xsh_clipping_param crh_clipping [static] |
Definition at line 99 of file test-xsh_remove_crh_multiple.c.
Referenced by main(), xsh_linear(), and xsh_mdark().
int imgSize = 10 [static] |
Definition at line 104 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames(), HandleOptions(), and verifCr().
xsh_instrument* instrument = NULL [static] |
Definition at line 98 of file test-xsh_remove_crh_multiple.c.
Referenced by main(), xsh_2dmap(), xsh_absorp(), xsh_cfg_recover_driver(), xsh_dfs_set_groups(), xsh_flexcomp(), xsh_geom_ifu(), xsh_instrument_new(), xsh_linear(), xsh_lingain(), xsh_mbias(), xsh_mdark(), xsh_mflat(), xsh_model(), xsh_model_anneal(), xsh_model_first_anneal(), xsh_model_reduce(), xsh_orderpos(), xsh_predict(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), xsh_scired_slit_stare(), xsh_util_afc(), xsh_util_apply_response(), xsh_util_bpmap_coadd(), xsh_util_bpmap_nl_raw2pre(), xsh_util_compute_response(), xsh_util_crh_single(), xsh_util_efficiency(), xsh_util_efficiency1d(), xsh_util_efficiency2d(), xsh_util_guess_xy(), xsh_util_ifu_build_cube(), xsh_util_ima_arith(), xsh_util_integrate(), xsh_util_physmod(), and xsh_wavecal().
struct option long_options[] [static] |
{ {"nimg", required_argument, 0, NIMG_OPT}, {"nbcr", required_argument, 0, NBCR_OPT}, {"size", required_argument, 0, SIZE_OPT}, {"bgmin", required_argument, 0, BGMIN_OPT}, {"bgmax", required_argument, 0, BGMAX_OPT}, {"sigma", required_argument, 0, SIGMA_OPT}, {"debug", required_argument, 0, DEBUG_OPT}, {"help", 0, 0, HELP_OPT}, {0, 0, 0, 0} }
Definition at line 86 of file test-xsh_remove_crh_multiple.c.
Referenced by HandleOptions().
int nbCr = 1 [static] |
Definition at line 101 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames(), and HandleOptions().
int nbImages = 4 [static] |
Definition at line 100 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames(), and HandleOptions().
double sigma = 4.0 [static] |
Definition at line 107 of file test-xsh_remove_crh_multiple.c.
Referenced by expb_df(), expb_f(), flag_noisy_pixels(), HandleOptions(), irplib_vector_ksigma(), main(), xsh_array_clip_mean(), xsh_array_clip_median(), xsh_array_clip_poly1d(), xsh_bspline_fit(), xsh_bspline_fit_data(), xsh_bspline_fit_data2(), xsh_center_cube(), xsh_detmon_gain_table_fill_row(), xsh_get_xcorrel_peak(), xsh_gsl_fit_gaussian(), xsh_image_extract_optimal(), xsh_image_gaussian_fit_y(), xsh_localize_ifu_slitlet(), and xsh_localize_obj_auto().
int totCr = 0 [static] |
Definition at line 102 of file test-xsh_remove_crh_multiple.c.
Referenced by createFakeFrames(), and verifCr().