Test Remove Crh Multi function(s)

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 const char * Options = "?"
static struct option long_options []
static xsh_instrumentinstrument = NULL
static xsh_clipping_param crh_clipping
static int nbImages = 4
static int nbCr = 1
static int totCr = 0
static int Debug = 0
static int imgSize = 10
static double bgMin = 80.
static double bgMax = 90.
static double sigma = 4.0

Define Documentation

#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.


Enumeration Type Documentation

anonymous enum
Enumerator:
NIMG_OPT 
NBCR_OPT 
DEBUG_OPT 
SIZE_OPT 
BGMIN_OPT 
BGMAX_OPT 
SIGMA_OPT 
HELP_OPT 

Definition at line 75 of file test-xsh_remove_crh_multiple.c.


Function Documentation

static cpl_frameset * createFakeFrames ( XSH_INSTRCONFIG iconfig  )  [static]
static void HandleOptions ( int  argc,
char **  argv 
) [static]
static void Help ( void   )  [static]

Definition at line 256 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.

Returns:
0 iff success

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 323 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_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]

Variable Documentation

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().

Definition at line 99 of file test-xsh_remove_crh_multiple.c.

Referenced by main(), xsh_linear(), xsh_mbias(), xsh_mdark(), and xsh_mflat().

int Debug = 0 [static]

Definition at line 103 of file test-xsh_remove_crh_multiple.c.

Referenced by verifCr().

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

const char* Options = "?" [static]

Definition at line 84 of file test-xsh_remove_crh_multiple.c.

double sigma = 4.0 [static]
int totCr = 0 [static]

Definition at line 102 of file test-xsh_remove_crh_multiple.c.

Referenced by createFakeFrames(), and verifCr().


Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1