Test Detect Arc Lines
[Unit Tests]

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 Documentation

#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
Value:
"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
Value:
"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.


Enumeration Type Documentation

anonymous enum
Enumerator:
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 

Definition at line 83 of file test-xsh_detect_arclines.c.

anonymous enum
Enumerator:
NBKPTS_OPT 
METHOD_OPT 
POS1_OPT 
HHEIGHT1_OPT 
POS2_OPT 
HHEIGHT2_OPT 
DEBUG_OPT 

Definition at line 79 of file test-xsh_subtract_sky_single.c.


Function Documentation

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]
static void HandleOptions ( int  argc,
char **  argv,
xsh_detect_arclines_param det_arc_par,
xsh_clipping_param clip_par 
) [static]
int main ( int  argc,
char **  argv 
)

Variable Documentation

struct option long_options[] [static]
Initial value:
 {
  {"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]
Initial value:
 {
  {"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().


Generated on 13 Mar 2013 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1