Testing of the startup
[Unit Tests]

Defines

#define MODULE_ID   "XSH_CPL_FIT"
#define MODULE_ID   "XSH_CORRECT_VACUUM_TO_AIR"
#define MODULE_ID   "XSH_DETECT_LINE_POS2"
#define PI_NUMB   (3.1415926535897932384626433832795)
#define MODULE_ID   "XSH_DETECT_LINE_POS"
#define MODULE_ID   "XSH_DETECT_LINE_POS2"
#define MODULE_ID   "XSH_CPL_FIT"
#define MODULE_ID   "XSH_CPL_FIT"
#define MODULE_ID   "XSH_TOOLS_PERF"

Functions

static double xsh_resample_double (double wout, double *pw1, double *pf1, double wmin, double wmax, int size_obs)
static cpl_table * xsh_table_resample_table (cpl_table *tinp, const char *cwinp, const char *cfinp, cpl_table *tref, const char *cwref, const char *cfref)
static cpl_table * xsh_table_downsample_table (cpl_table *tinp, const char *cwinp, const char *cfinp, cpl_table *tref, const char *cwref, const char *cfref)
cpl_table * xsh_table_resample_uniform (cpl_table *tinp, const char *cwinp, const char *cfinp, const double wstp)
static cpl_table * xsh_spectrum_to_table (xsh_spectrum *s)
static cpl_error_code xsh_evaluate_tell_model (cpl_table *corr, xsh_instrument *instrument, const int ext, double *mean, double *rms)
static cpl_table * xsh_extract_ranges_to_fit (cpl_table *table_in, const char *cwav, xsh_instrument *instrument)
static cpl_error_code xsh_extract_points_to_fit (cpl_table *table, const char *cwav, const char *cratio, const int nsamples, xsh_instrument *instrument, cpl_vector **vec_wave, cpl_vector **vec_flux)
static cpl_error_code xsh_get_xcorrel_peak (cpl_vector *wcorr, cpl_vector *fcorr, XSH_GAUSSIAN_FIT *gfit, const double range, const int ext)
static cpl_table * xsh_table_select_range (cpl_table *table_in, const char *col, const double wmin, const double wmax)
cpl_error_code xsh_correl_spectra (double *flux_s, double *flux_m, const int size, const int hsearch, const double wlogstp, const double range, const int ext, XSH_GAUSSIAN_FIT *gfit)
static cpl_error_code xsh_align_model_to_spectrum (cpl_table *table_me, cpl_table *table_se, const int ext, cpl_table **table_mm)
cpl_table * xsh_telluric_model_eval (cpl_frame *frame_m, xsh_spectrum *s, xsh_instrument *instrument, cpl_size *model_idx)
int main (int argc, char **argv)
 Some test about performances.
static cpl_error_code xsh_add_fits_key_min_set (cpl_propertylist *plist)
static void xsh_gfit_tests (void)
void test_tech_eval_perf (int indice, double val)
 Some test about performances.

Detailed Description

Test some tools functions for performances check

Apply formula: lam_air = lam_vac/(1.0002735182+131.4182/lam_vac2+2.76249E8/lam_vac4)


Define Documentation

#define MODULE_ID   "XSH_TOOLS_PERF"

Definition at line 53 of file test-xsh_tools_perf.c.

#define MODULE_ID   "XSH_CPL_FIT"

Definition at line 59 of file test-xsh_telluric_cor.c.

#define MODULE_ID   "XSH_CPL_FIT"

Definition at line 55 of file test-xsh_startup.c.

#define MODULE_ID   "XSH_DETECT_LINE_POS2"

Definition at line 58 of file test-xsh_detect_line_pos2.c.

#define MODULE_ID   "XSH_DETECT_LINE_POS"

Definition at line 58 of file test-xsh_detect_line_pos.c.

#define MODULE_ID   "XSH_DETECT_LINE_POS2"

Definition at line 58 of file test-xsh_detect_line_file.c.

#define MODULE_ID   "XSH_CORRECT_VACUUM_TO_AIR"

Definition at line 56 of file test-xsh_correct_vacuum_to_air.c.

#define MODULE_ID   "XSH_CPL_FIT"

Definition at line 53 of file test-cpl_image_fit_gaussian.c.

Referenced by main().

#define PI_NUMB   (3.1415926535897932384626433832795)

Definition at line 80 of file test-xsh_detect_line_file.c.


Function Documentation

int main ( int  argc,
char **  argv 
)

Some test about performances.

Unit test of XSH_DETECT_ARCLINES.

Unit test of xsh_resid_tab.

Unit test of xsh_remove_crh_single.

Unit test of XSH_PREPARE.

Unit test of xsh_localize_obj.

Unit test of xsh_opt_extract.

Unit test of PRE module.

Unit test of xsh_flat_merge.

Unit test of xsh_extract_clean.

Unit test of xsh_data_wave_tab_2d.

Unit test of xsh_data_star_flux.

Unit test of xsh_extract.

Unit test of xsh_rectify. Needs the PRE frame, order table, wave solution, instrument, rectify parameters, the map.

Create a SLITMAP and a WAVEMAP from Set Of Files (SOF).

Unit test of xsh_bspline_interpol.

Returns:
0 if success
0 if success

Test the Data Reduction Library function XSH_CREATE_MAP

Returns:
0 if tests passed successfully

Test the PRE module.

Returns:
0 if tests passed successfully

Test the Data Reduction Library function XSH_PREPARE

Returns:
0 if success

Test behaviour of xsh_remove_crh_single function.

Returns:
0 if tests passed successfully

Test the Data Reduction Library function XSH_DETECT_ARCLINES

Definition at line 64 of file test-xsh_tools_perf.c.

References check, MODULE_ID, TEST_END, test_tech_eval_perf(), TESTS_INIT, XSH_DEBUG_LEVEL_MEDIUM, xsh_debug_level_set(), and xsh_error_dump.

void test_tech_eval_perf ( int  indice,
double  val 
)

Some test about performances.

Returns:

Definition at line 82 of file test-xsh_tools_perf.c.

References check, XSH_ASSURE_NOT_ILLEGAL, xsh_free_vector(), xsh_msg, and xsh_tools_tchebitchev_poly_eval().

Referenced by main().

static cpl_error_code xsh_add_fits_key_min_set ( cpl_propertylist *  plist  )  [static]
static cpl_error_code xsh_align_model_to_spectrum ( cpl_table *  table_me,
cpl_table *  table_se,
const int  ext,
cpl_table **  table_mm 
) [static]
cpl_error_code xsh_correl_spectra ( double *  flux_s,
double *  flux_m,
const int  size,
const int  hsearch,
const double  wlogstp,
const double  range,
const int  ext,
XSH_GAUSSIAN_FIT gfit 
)
static cpl_error_code xsh_evaluate_tell_model ( cpl_table *  corr,
xsh_instrument instrument,
const int  ext,
double *  mean,
double *  rms 
) [static]
static cpl_error_code xsh_extract_points_to_fit ( cpl_table *  table,
const char *  cwav,
const char *  cratio,
const int  nsamples,
xsh_instrument instrument,
cpl_vector **  vec_wave,
cpl_vector **  vec_flux 
) [static]
static cpl_table* xsh_extract_ranges_to_fit ( cpl_table *  table_in,
const char *  cwav,
xsh_instrument instrument 
) [static]
static cpl_error_code xsh_get_xcorrel_peak ( cpl_vector *  wcorr,
cpl_vector *  fcorr,
XSH_GAUSSIAN_FIT gfit,
const double  range,
const int  ext 
) [static]
static void xsh_gfit_tests ( void   )  [static]

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

References check, size, xsh_free_image(), xsh_image_find_barycenter(), and xsh_msg.

static double xsh_resample_double ( double  wout,
double *  pw1,
double *  pf1,
double  wmin,
double  wmax,
int  size_obs 
) [static]
static cpl_table* xsh_spectrum_to_table ( xsh_spectrum s  )  [static]
static cpl_table* xsh_table_downsample_table ( cpl_table *  tinp,
const char *  cwinp,
const char *  cfinp,
cpl_table *  tref,
const char *  cwref,
const char *  cfref 
) [static]

Definition at line 134 of file xsh_utils_response.c.

References check, and xsh_resample_double().

Referenced by xsh_align_model_to_spectrum(), and xsh_telluric_model_eval().

static cpl_table* xsh_table_resample_table ( cpl_table *  tinp,
const char *  cwinp,
const char *  cfinp,
cpl_table *  tref,
const char *  cwref,
const char *  cfref 
) [static]

Definition at line 90 of file xsh_utils_response.c.

References check, and xsh_resample_double().

Referenced by xsh_telluric_model_eval().

cpl_table* xsh_table_resample_uniform ( cpl_table *  tinp,
const char *  cwinp,
const char *  cfinp,
const double  wstp 
)

Definition at line 189 of file xsh_utils_response.c.

References check, size, and xsh_resample_double().

Referenced by xsh_align_model_to_spectrum().

static cpl_table* xsh_table_select_range ( cpl_table *  table_in,
const char *  col,
const double  wmin,
const double  wmax 
) [static]

Definition at line 511 of file xsh_utils_response.c.

Referenced by xsh_telluric_model_eval().

cpl_table* xsh_telluric_model_eval ( cpl_frame *  frame_m,
xsh_spectrum s,
xsh_instrument instrument,
cpl_size *  model_idx 
)

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