58#define MODULE_ID "XSH_COMPUTE_ABSORP"
66 {
"threshold", required_argument, 0,
THRESH_OPT},
73 puts(
"Unitary test of xsh_compute_absorp");
74 puts(
"Usage: test_xsh_compute_absorp [options] S1D TELLLIST");
77 puts(
" --help : What you see" ) ;
78 puts(
" --filter-hsize= : Half size of filter");
79 puts(
" --threshold= : Threshold");
80 puts(
"\nInput Files" ) ;
81 puts(
"S1D : 1D spectrum file");
82 puts(
"TELLLIST : tell line list");
93 while (( opt = getopt_long (argc, argv,
99 *filter_hsize = atoi( optarg);
112int main(
int argc,
char **argv)
116 int filter_hsize = 5;
118 const char *s1d_name = NULL;
119 cpl_frame *s1d_frame = NULL;
120 const char *tell_name = NULL;
121 cpl_frame *tell_frame = NULL;
127 cpl_msg_set_level(CPL_MSG_DEBUG);
133 if ( (argc - optind) > 1 ) {
134 s1d_name = argv[optind];
135 tell_name = argv[optind+1];
143 xsh_msg(
"S1D File : %s ", s1d_name);
144 xsh_msg(
"Telllist File : %s ", tell_name);
146 xsh_msg(
"Filter hsize : %d ", filter_hsize);
157 if (cpl_error_get_code() != CPL_ERROR_NONE) {
int main()
Unit test of xsh_bspline_interpol.
static void HandleOptions(int argc, char **argv, int *filter_hsize, double *threshold)
static struct option long_options[]
cpl_frame * xsh_compute_absorp(cpl_frame *s1d_frame, cpl_frame *telllist_frame, int filter_hsize, double threshold, xsh_instrument *instr)
Compute the shift in slit between reference wavelength and others for all the slitlets.
#define xsh_error_dump(level)
void xsh_instrument_set_arm(xsh_instrument *i, XSH_ARM arm)
Set an arm on instrument structure.
void xsh_instrument_free(xsh_instrument **instrument)
free an instrument structure
xsh_instrument * xsh_instrument_new(void)
create new instrument structure
#define xsh_msg(...)
Print a message on info level.
void xsh_free_frame(cpl_frame **f)
Deallocate a frame and set the pointer to NULL.
int xsh_debug_level_set(int level)
set debug level
#define TESTS_XSH_FRAME_CREATE(frame, tag, name)
#define TESTS_INIT(DRL_ID)