00001 /* * 00002 * This file is part of the ESO X-shooter Pipeline * 00003 * Copyright (C) 2006 European Southern Observatory * 00004 * * 00005 * This library is/ free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the Free Software * 00017 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA * 00018 * */ 00019 00020 /* 00021 * $Author: amodigli $ 00022 * $Date: 2011/02/17 15:40:53 $ 00023 * $Revision: 1.7 $ 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 xsh_star_flux_list * xsh_star_flux_list_load( cpl_frame * star_frame ) ; 00048 void xsh_star_flux_list_free( xsh_star_flux_list ** list ) ; 00049 xsh_star_flux_list * xsh_star_flux_list_create( int size ) ; 00050 cpl_frame * xsh_star_flux_list_save( xsh_star_flux_list * list, 00051 const char * filename, 00052 const char * tag ) ; 00053 cpl_frame * 00054 xsh_star_flux_list_save_order( xsh_star_flux_list * list, 00055 const char * filename, 00056 const char * tag, 00057 const int order ); 00058 00059 double * xsh_star_flux_list_get_lambda( xsh_star_flux_list * list ) ; 00060 double * xsh_star_flux_list_get_flux( xsh_star_flux_list * list ) ; 00061 cpl_error_code 00062 xsh_star_flux_list_dump_ascii( xsh_star_flux_list * list, const char* filename ); 00063 00064 #endif