SourceXtractorPlusPlus  0.13
Please provide a description of the project.
PyFitsFile.cpp
Go to the documentation of this file.
1 
18 #include <boost/algorithm/string.hpp>
19 
20 #include "SEUtils/VariantCast.h"
21 
23 
24 namespace SourceXtractor {
25 
28  m_file->open();
29 }
30 
33 
34  for(auto num : m_file->getImageHdus()) {
35  v.push_back(num-1);
36  }
37 
38  return v;
39 }
40 
42  const auto& headers = m_file->getHDUHeaders(hdu+1);
44 
45  for (auto& i : headers) {
46  auto key = i.first;
47  auto value = VariantCast<std::string>(i.second.m_value);
48  boost::trim(key);
49  boost::trim(value);
50  headers_str[key] = value;
51  }
52 
53  return headers_str;
54 }
55 
56 }
std::string
STL class.
PyFitsFile.h
SourceXtractor::PyFitsFile::getHeaders
std::map< std::string, std::string > getHeaders(int hdu) const
Definition: PyFitsFile.cpp:41
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:31
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::FitsFileManager::getInstance
static std::shared_ptr< FitsFileManager > getInstance()
Definition: FitsFileManager.h:47
SourceXtractor::PyFitsFile::m_file
std::shared_ptr< FitsFile > m_file
Definition: PyFitsFile.h:55
std::map< std::string, std::string >
VariantCast.h
SourceXtractor::PyFitsFile::PyFitsFile
PyFitsFile(const std::string &filename)
Definition: PyFitsFile.cpp:26