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 #if !defined(XSH_DATA_STAR_FLUX_H)
00027 #define XSH_DATA_STAR_FLUX_H
00028
00029
00030 #include <cpl.h>
00031
00032 #define XSH_STAR_FLUX_LIST_COLNAME_WAVELENGTH "LAMBDA"
00033 #define XSH_STAR_FLUX_LIST_COLNAME_FLUX "FLUX"
00034
00035 typedef struct {
00036 int size ;
00037 cpl_propertylist * header ;
00038 double * lambda ;
00039 double * flux ;
00040 } xsh_star_flux_list ;
00041
00042
00043 cpl_error_code
00044 xsh_star_flux_list_filter_median(xsh_star_flux_list * result,
00045 int hsize );
00046
00047 cpl_error_code
00048 xsh_star_flux_list_filter_lowpass(xsh_star_flux_list * result,
00049 cpl_lowpass filter_type,
00050 int hsize );
00051
00052 xsh_star_flux_list * xsh_star_flux_list_load( cpl_frame * star_frame ) ;
00053 xsh_star_flux_list * xsh_star_flux_list_load_spectrum( cpl_frame * star_frame );
00054
00055 void xsh_star_flux_list_free( xsh_star_flux_list ** list ) ;
00056 xsh_star_flux_list * xsh_star_flux_list_create( int size ) ;
00057 cpl_frame * xsh_star_flux_list_save( xsh_star_flux_list * list,
00058 const char * filename,
00059 const char * tag ) ;
00060 cpl_frame *
00061 xsh_star_flux_list_save_order( xsh_star_flux_list * list,
00062 const char * filename,
00063 const char * tag,
00064 const int order );
00065
00066 double * xsh_star_flux_list_get_lambda( xsh_star_flux_list * list ) ;
00067 double * xsh_star_flux_list_get_flux( xsh_star_flux_list * list ) ;
00068 cpl_error_code
00069 xsh_star_flux_list_dump_ascii( xsh_star_flux_list * list, const char* filename );
00070 cpl_error_code
00071 xsh_star_flux_list_divide( xsh_star_flux_list * result, xsh_star_flux_list * factor);
00072 xsh_star_flux_list* xsh_star_flux_list_duplicate( xsh_star_flux_list * list );
00073 void xsh_star_flux_list_extrapolate_wave_end( xsh_star_flux_list * list , const double wmax);
00074
00075 cpl_error_code
00076 xsh_star_flux_list_to_frame( xsh_star_flux_list* list, cpl_frame* frame);
00077 #endif