58#define MODULE_ID "XSH_MARK_TELL"
71 puts(
"Unitary test of xsh_mark_tell");
72 puts(
"Usage: test_xsh_mark_tell [options] S1D TELLLIST");
75 puts(
" --help : What you see" ) ;
76 puts(
"\nInput Files" ) ;
77 puts(
"S1D : 1D spectrum file");
78 puts(
"TELL_MASK : telluric mask");
88 while (( opt = getopt_long (argc, argv,
107 const char* spectrum_name = NULL;
110 FILE* fulldatfile = NULL;
116 check (spectrum_name = cpl_frame_get_filename( spectrum_frame));
118 xsh_msg(
"Spectrum frame : %s", spectrum_name);
124 fulldatfile = fopen(
"s1d_with_tell.dat",
"w");
125 for(i=0; i< spectrum->
size; i++){
129 xsh_msg(
"Save file s1d_with_tell.dat");
130 fclose( fulldatfile);
137int main(
int argc,
char **argv)
141 const char *s1d_name = NULL;
142 cpl_frame *s1d_frame = NULL;
143 const char *mask_name = NULL;
144 cpl_frame *mask_frame = NULL;
149 cpl_msg_set_level(CPL_MSG_DEBUG);
155 if ( (argc - optind) > 1 ) {
156 s1d_name = argv[optind];
157 mask_name = argv[optind+1];
165 xsh_msg(
"S1D File : %s ", s1d_name);
166 xsh_msg(
"Tell mask File : %s ", mask_name);
175 if (cpl_error_get_code() != CPL_ERROR_NONE) {
int main()
Unit test of xsh_bspline_interpol.
static void analyse_spectrum(cpl_frame *spectrum_frame)
static struct option long_options[]
void xsh_mark_tell(cpl_frame *s1d_frame, cpl_frame *tellmask_frame)
Mark telluric in spectrum.
xsh_spectrum * xsh_spectrum_load(cpl_frame *s1d_frame)
Load a 1D spectrum structure.
int * xsh_spectrum_get_qual(xsh_spectrum *s)
Get qual of spectrum.
double * xsh_spectrum_get_flux(xsh_spectrum *s)
Get flux of spectrum.
void xsh_spectrum_free(xsh_spectrum **s)
free memory associated to an 1D spectrum
#define xsh_error_dump(level)
#define XSH_ASSURE_NOT_NULL(pointer)
#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
static void HandleOptions(int argc, char **argv)
#define TESTS_XSH_FRAME_CREATE(frame, tag, name)
#define TESTS_INIT(DRL_ID)