00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifdef HAVE_CONFIG_H
00027 #include <config.h>
00028 #endif
00029
00030
00035
00036
00040
00041
00042
00043 #include <math.h>
00044 #include <xsh_data_spectralformat.h>
00045 #include <xsh_data_order.h>
00046 #include <xsh_data_wavesol.h>
00047 #include <xsh_model_io.h>
00048 #include <xsh_utils.h>
00049 #include <xsh_error.h>
00050 #include <xsh_msg.h>
00051 #include <xsh_pfits.h>
00052 #include <cpl.h>
00053 #include <xsh_utils_table.h>
00054 #include <xsh_drl.h>
00055
00056
00057
00058
00059
00060
00075
00076 void
00077 xsh_data_check_spectralformat( cpl_frame *spectralformat_frame,
00078 cpl_frame *orderlist_frame, cpl_frame *wavesol_frame,
00079 cpl_frame *model_config_frame, xsh_instrument* instr)
00080 {
00081 xsh_spectralformat_list *spectralformat = NULL;
00082 xsh_order_list *orderlist = NULL;
00083 xsh_wavesol *wavesol = NULL;
00084 xsh_xs_3 model;
00085
00086 XSH_ASSURE_NOT_NULL( spectralformat_frame);
00087 XSH_ASSURE_NOT_NULL( orderlist_frame);
00088 XSH_ASSURE_NOT_NULL( instr);
00089
00090 check( spectralformat = xsh_spectralformat_list_load( spectralformat_frame,
00091 instr));
00092 check( orderlist = xsh_order_list_load( orderlist_frame, instr));
00093
00094 if ( model_config_frame != NULL) {
00095 check( xsh_model_config_load_best( model_config_frame, &model));
00096 }
00097 if ( wavesol_frame != NULL) {
00098 check( wavesol = xsh_wavesol_load( wavesol_frame, instr));
00099 }
00100
00101 check( xsh_spectralformat_check_wlimit( spectralformat, orderlist,
00102 wavesol, &model, instr));
00103
00104 cleanup:
00105 xsh_spectralformat_list_free( &spectralformat);
00106 xsh_order_list_free( &orderlist);
00107 xsh_wavesol_free( &wavesol);
00108 return;
00109 }
00110