CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
FITSwrapper.h
Go to the documentation of this file.
1 /*******************************************************************
2  * Copyright (C) 2010 by Federico Marulli *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful,*
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  *******************************************************************/
20 
35 #ifndef __FITSwrap__
36 #define __FITSwrap__
37 
38 #include "Kernel.h"
39 
40 #ifdef HAVE_CONFIG_H
41 #include "config.h"
42 #endif
43 
44 
45 namespace cbl {
46 
47  namespace wrapper {
48 
67  namespace ccfits {
68 
89  std::vector<std::vector<double>> read_table_fits (const std::string input_fits, const std::vector<std::string> column_names, const int next=1, const double fill_value=cbl::par::defaultDouble);
90 
102  void write_table_fits (const std::string output_dir, const std::string file_fits, const std::vector<std::string> column_names, const std::vector<std::vector<double>> table, const std::vector<std::string> column_units={});
103 
104  }
105  }
106 }
107 
108 #endif
Useful generic functions.
static const double defaultDouble
default double value
Definition: Constants.h:348
std::vector< std::vector< double > > read_table_fits(const std::string input_fits, const std::vector< std::string > column_names, const int next=1, const double fill_value=cbl::par::defaultDouble)
function to read a table from a fits file
Definition: FITSwrapper.cpp:45
void write_table_fits(const std::string output_dir, const std::string file_fits, const std::vector< std::string > column_names, const std::vector< std::vector< double >> table, const std::vector< std::string > column_units={})
function that writes a table on a fits file
Definition: FITSwrapper.cpp:88
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38