57#define MODULE_ID "XSH_DATA_SPECTRALFORMAT"
60 "Test the xsh_data_spectralformat function \n"\
61 " analyse SPECTRAL_FORMAT tab frames\n"\
62 "use : ./test_xsh_data_spectralformat SOF\n"\
63 " SOF => [SPECTRAL_FORMAT, ORDER_TAB_EDGES, WAVE_TAB_2D|MODEL ]\n"
78int main(
int argc,
char** argv)
81 const char *sof_name = NULL;
82 cpl_frame *spectralformat_frame = NULL;
83 cpl_frame *orderlist_frame = NULL;
84 cpl_frame *wavesol_frame = NULL;
85 cpl_frame *model_frame = NULL;
86 cpl_frameset *set = NULL;
91 cpl_msg_set_level(CPL_MSG_DEBUG);
116 cpl_frame_get_filename( spectralformat_frame));
118 cpl_frame_get_filename( orderlist_frame));
119 if (wavesol_frame != NULL){
121 cpl_frame_get_filename( wavesol_frame));
127 cpl_frame_get_filename( model_frame));
130 orderlist_frame, wavesol_frame, model_frame,
instrument));
136 if (cpl_error_get_code() != CPL_ERROR_NONE) {
int main()
Unit test of xsh_bspline_interpol.
static xsh_instrument * instrument
cpl_frameset * sof_to_frameset(const char *sof_name)
void xsh_data_check_spectralformat(cpl_frame *spectralformat_frame, cpl_frame *orderlist_frame, cpl_frame *wavesol_frame, cpl_frame *model_config_frame, xsh_instrument *instr)
Check the borders of wavelength foreach orders in spectral format.
#define xsh_error_dump(level)
void xsh_instrument_free(xsh_instrument **instrument)
free an instrument structure
#define xsh_msg(...)
Print a message on info level.
void xsh_free_frameset(cpl_frameset **f)
Deallocate a frame set and set the pointer to NULL.
int xsh_debug_level_set(int level)
set debug level
#define TESTS_INIT(DRL_ID)
cpl_frame * xsh_find_spectral_format(cpl_frameset *frames, xsh_instrument *instr)
Find spectral format frame.
cpl_frame * xsh_find_order_tab_edges(cpl_frameset *frames, xsh_instrument *instr)
Find an order tab EDGES.
cpl_frame * xsh_find_wave_tab_2d(cpl_frameset *frames, xsh_instrument *instr)
Find a wave tab 2D.
xsh_instrument * xsh_dfs_set_groups(cpl_frameset *set)
Set the group as RAW or CALIB in a frameset and return the instrument detected.
cpl_frame * xsh_find_frame_with_tag(cpl_frameset *frames, const char *tag, xsh_instrument *instr)
Find frame with a given tag.