SourceXtractorPlusPlus  0.15
Please provide a description of the project.
PyFitsFile.cpp
Go to the documentation of this file.
1 
18 #include "SEUtils/VariantCast.h"
20 #include <boost/algorithm/string.hpp>
21 
22 namespace SourceXtractor {
23 
25  m_file = std::make_shared<FitsFile>(filename, false);
26 }
27 
30 
31  for(auto num : m_file->getImageHdus()) {
32  v.push_back(num-1);
33  }
34 
35  return v;
36 }
37 
39  const auto& headers = m_file->getHDUHeaders(hdu+1);
41 
42  for (auto& i : headers) {
43  auto key = i.first;
44  auto value = VariantCast<std::string>(i.second.m_value);
45  boost::trim(key);
46  boost::trim(value);
47  headers_str[key] = value;
48  }
49 
50  return headers_str;
51 }
52 
53 }
std::string
STL class.
PyFitsFile.h
SourceXtractor::PyFitsFile::getHeaders
std::map< std::string, std::string > getHeaders(int hdu) const
Definition: PyFitsFile.cpp:38
conf.filename
string filename
Definition: conf.py:63
std::vector< int >
std::vector::push_back
T push_back(T... args)
SourceXtractor::PyFitsFile::getImageHdus
std::vector< int > getImageHdus() const
Definition: PyFitsFile.cpp:28
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::PyFitsFile::m_file
std::shared_ptr< FitsFile > m_file
Definition: PyFitsFile.h:46
std::map< std::string, std::string >
VariantCast.h
SourceXtractor::PyFitsFile::PyFitsFile
PyFitsFile(const std::string &filename)
Definition: PyFitsFile.cpp:24