Defines | |
#define | MODULE_ID "XSH_DETECT_ARLINES" |
#define | SYNTAX |
#define | MODULE_ID "XSH_SUBTRACT_SKY_SINGLE" |
#define | SYNTAX |
Enumerations | |
enum | { HALF_WINDOW_SIZE_OPT, HALF_WINDOW_SIZE_FOR_MAX_OPT, DEG_LAMBDA_OPT, DEG_ORDER_OPT, DEG_SLIT_OPT, POLY_DEGREE_OPT, MIN_SN_OPT, CLIP_SIGMA_OPT, CLIP_NITER_OPT, CLIP_FRAC_OPT, INITIAL_CENTER_OPT, HALF_WINDOW_SIZE_RUNNING_MEDIAN_OPT } |
enum | { NBKPTS_OPT, METHOD_OPT, POS1_OPT, HHEIGHT1_OPT, POS2_OPT, HHEIGHT2_OPT, DEBUG_OPT } |
Functions | |
static void | HandleOptions (int argc, char **argv, xsh_detect_arclines_param *det_arc_par, xsh_clipping_param *clip_par) |
int | main (int argc, char **argv) |
Unit test of XSH_DETECT_ARCLINES. | |
static void | HandleOptions (int argc, char **argv, xsh_subtract_sky_single_param *sky_par) |
static void | get_max_pos (cpl_frame *frame, xsh_instrument *instrument) |
Variables | |
static struct option | long_options [] |
static const char * | Options = "?" |
static struct option | LongOptions [] |
#define MODULE_ID "XSH_SUBTRACT_SKY_SINGLE" |
Definition at line 57 of file test-xsh_subtract_sky_single.c.
#define MODULE_ID "XSH_DETECT_ARLINES" |
Definition at line 57 of file test-xsh_detect_arclines.c.
#define SYNTAX |
"Test the xsh_subtract_sky_single function\n"\ "usage :\n test_xsh_subtract_sky_single [<opt>] SCI_FRAME ORDER_TABLE SLITMAP WAVEMAP [LOCALIZATION} \n" \ "SCI_FRAME => Science frame NOCOSMIC and flat field [DIV_FF]\n"\ "ORDER_TABLE => Order table frame\n"\ "SLITMAP => Slit Map Frame\n"\ "WAVEMAP => Wave Map frame\n"\ "LOCALIZATION => Localization frame (optional)\n\n"\ "Options:\n"\ " --nbkpts=<nn> : Number of break points (default 100)\n"\ " --method=<n> : 0 => BSPLINE 1 => MEDIAN [BSPLINE]\n"\ " --pos1=<n> : Sky position 1 [0]\n"\ " --hheight1=<n> : Sky half height 1 [0]\n"\ " --pos2=<n> : Sky position 2 [0]\n"\ " --hheight2=<n> : Sky half height 2 [0]\n"\ " --debug=<n> : Level of debug LOW | MEDIUM | HIGH [MEDIUM]\n"\ "The output file (after subtraction) is 'SUBTRACTED_FLUX.fits'\n"
Definition at line 59 of file test-xsh_subtract_sky_single.c.
#define SYNTAX |
"Test the detect_arclines function\n"\ "use : ./test_xsh_detect_arclines OPTIONS FMTCHK_FRAME LINE_LIST THEMAP "\ "[GUESS_WAVE_TAB]\n"\ "FMTCHK_FRAME => the frame to detect arclines (PRE format)\n"\ "LINE_LIST => the line list\n"\ "THEMAP => the theoretical map\n"\ "GUESS_WAVE_TAB => the guess wave solution\n"\ "SPECTRAL_FORMAT_TAB => the spectral format table \n"\ "OPTIONS => \n"\ " --half_window_size : half window size (HWS) in pixel around the"\ " position to fit the gaussian (total window size = 2*HWS+1)\n"\ " --half_window_size_for_max : half window size (HWS) in pixel around the"\ " theoritical position to find the maximum flux\n"\ " --half_window_size_running_median : half window size of running "\ "median\n"\ " --deg_lambda : lambda degree in polynomial wavelength solution fit\n"\ " --deg_order : order degree in polynomial wavelength solution fit\n"\ " --deg_slit : slit degree in polynomial wavelength solution fit\n"\ " --poly_degree : Polynomial degree\n"\ " --min_sn : minimal S/N allowed\n"\ " --clip_sigma : multiple of sigma in sigma clipping\n"\ " --clip_niter : number of iterations in sigma clipping\n"\ " --clip_frac : minimal fractions of bad pixel allowed\n"
Definition at line 59 of file test-xsh_detect_arclines.c.
anonymous enum |
Definition at line 83 of file test-xsh_detect_arclines.c.
anonymous enum |
Definition at line 79 of file test-xsh_subtract_sky_single.c.
static void get_max_pos | ( | cpl_frame * | frame, | |
xsh_instrument * | instrument | |||
) | [static] |
Definition at line 140 of file test-xsh_subtract_sky_single.c.
References xsh_pre::data, x, xsh_msg, xsh_pre_free(), xsh_pre_load(), and y.
Referenced by main().
static void HandleOptions | ( | int | argc, | |
char ** | argv, | |||
xsh_subtract_sky_single_param * | sky_par | |||
) | [static] |
Definition at line 100 of file test-xsh_subtract_sky_single.c.
References DEBUG_OPT, xsh_subtract_sky_single_param::hheight1, HHEIGHT1_OPT, xsh_subtract_sky_single_param::hheight2, HHEIGHT2_OPT, LongOptions, xsh_subtract_sky_single_param::method, METHOD_OPT, xsh_subtract_sky_single_param::nbkpts1, NBKPTS_OPT, Options, xsh_subtract_sky_single_param::pos1, POS1_OPT, xsh_subtract_sky_single_param::pos2, POS2_OPT, SYNTAX, XSH_DEBUG_LEVEL_HIGH, XSH_DEBUG_LEVEL_LOW, and xsh_debug_level_set().
Referenced by main().
static void HandleOptions | ( | int | argc, | |
char ** | argv, | |||
xsh_detect_arclines_param * | det_arc_par, | |||
xsh_clipping_param * | clip_par | |||
) | [static] |
Definition at line 107 of file test-xsh_detect_arclines.c.
References CLIP_FRAC_OPT, CLIP_NITER_OPT, CLIP_SIGMA_OPT, DEG_LAMBDA_OPT, DEG_ORDER_OPT, DEG_SLIT_OPT, xsh_detect_arclines_param::fit_window_hsize, xsh_clipping_param::frac, HALF_WINDOW_SIZE_FOR_MAX_OPT, HALF_WINDOW_SIZE_OPT, HALF_WINDOW_SIZE_RUNNING_MEDIAN_OPT, long_options, xsh_detect_arclines_param::min_sn, MIN_SN_OPT, xsh_clipping_param::niter, xsh_detect_arclines_param::ordertab_deg_y, POLY_DEGREE_OPT, xsh_detect_arclines_param::running_median_hsize, xsh_detect_arclines_param::search_window_hsize, xsh_clipping_param::sigma, SYNTAX, xsh_detect_arclines_param::wavesol_deg_lambda, xsh_detect_arclines_param::wavesol_deg_order, and xsh_detect_arclines_param::wavesol_deg_slit.
int main | ( | int | argc, | |
char ** | argv | |||
) |
Unit test of XSH_DETECT_ARCLINES.
Test the Data Reduction Library function XSH_DETECT_ARCLINES
Definition at line 163 of file test-xsh_subtract_sky_single.c.
References xsh_subtract_sky_single_param::bezier_spline_order, BSPLINE_METHOD, xsh_subtract_sky_single_param::bspline_sampling, check, FINE, xsh_subtract_sky_single_param::gain, get_max_pos(), HandleOptions(), xsh_subtract_sky_single_param::hheight1, xsh_subtract_sky_single_param::hheight2, instrument, xsh_subtract_sky_single_param::kappa, xsh_subtract_sky_single_param::median_hsize, MEDIAN_METHOD, xsh_subtract_sky_single_param::method, MODULE_ID, xsh_subtract_sky_single_param::nbkpts1, xsh_subtract_sky_single_param::nbkpts2, xsh_subtract_sky_single_param::niter, xsh_subtract_sky_single_param::pos1, xsh_subtract_sky_single_param::pos2, xsh_subtract_sky_single_param::ron, SKY_METHOD_PRINT, xsh_subtract_sky_single_param::slit_edges_mask, SYNTAX, TEST_END, TESTS_INIT, TESTS_XSH_FRAME_CREATE, TESTS_XSH_INSTRUMENT_CREATE, XSH_ARM_UNDEFINED, XSH_DEBUG_LEVEL_MEDIUM, xsh_debug_level_set(), xsh_error_dump, xsh_free_frame(), xsh_free_propertylist(), XSH_GET_TAG_FROM_ARM, XSH_GET_TAG_FROM_LAMP, xsh_instrument_free(), xsh_instrument_set_decode_bp(), XSH_LAMP_UNDEFINED, XSH_LOCALIZATION, XSH_MODE_SLIT, xsh_msg, XSH_OBJECT_SLIT_STARE, XSH_ORDER_TAB_EDGES, xsh_pfits_get_arm(), XSH_SLIT_MAP, xsh_subtract_sky_single(), and XSH_WAVE_MAP.
struct option long_options[] [static] |
{ {"half_window_size", required_argument, 0, HALF_WINDOW_SIZE_OPT}, {"half_window_size_for_max", required_argument, 0, HALF_WINDOW_SIZE_FOR_MAX_OPT}, {"half_window_size_running_median", required_argument, 0, HALF_WINDOW_SIZE_RUNNING_MEDIAN_OPT}, {"deg_lambda", required_argument, 0, DEG_LAMBDA_OPT}, {"deg_order", required_argument, 0, DEG_ORDER_OPT}, {"deg_slit", required_argument, 0, DEG_SLIT_OPT}, {"poly_degree", required_argument, 0, POLY_DEGREE_OPT}, {"min_sn", required_argument, 0, MIN_SN_OPT}, {"clip_sigma", required_argument, 0, CLIP_SIGMA_OPT}, {"clip_niter", required_argument, 0, CLIP_NITER_OPT}, {"clip_frac", required_argument, 0, CLIP_FRAC_OPT}, {0, 0, 0, 0} }
Definition at line 90 of file test-xsh_detect_arclines.c.
Referenced by HandleOptions().
struct option LongOptions[] [static] |
{ {"nbkpts", required_argument, 0, NBKPTS_OPT}, {"method", required_argument, 0, METHOD_OPT}, {"pos1", required_argument, 0, POS1_OPT}, {"hheight1", required_argument, 0, HHEIGHT1_OPT}, {"pos2", required_argument, 0, POS2_OPT}, {"hheight2", required_argument, 0, HHEIGHT2_OPT}, {"debug", required_argument, 0, DEBUG_OPT}, {NULL, 0, 0, 0} }
Definition at line 89 of file test-xsh_subtract_sky_single.c.
Referenced by HandleOptions().
const char* Options = "?" [static] |
Definition at line 77 of file test-xsh_subtract_sky_single.c.
Referenced by HandleOptions().