SourceXtractorPlusPlus 0.18
SourceXtractor++, the next generation SExtractor
FitsFile.h
Go to the documentation of this file.
1
18/*
19 * FitsFile.h
20 *
21 * Created on: Jun 9, 2020
22 * Author: mschefer
23 */
24
25#ifndef _SEFRAMEWORK_FITS_FITSFILE_H_
26#define _SEFRAMEWORK_FITS_FITSFILE_H_
27
28#include <boost/filesystem/path.hpp>
29#include <fitsio.h>
30#include <map>
31#include <string>
32#include <vector>
33
35
36namespace SourceXtractor {
37
43class FitsFile {
44public:
45 FitsFile(const boost::filesystem::path& path, bool writeable);
46
47 FitsFile(FitsFile&&) = default;
48
49 virtual ~FitsFile();
50
51 fitsfile* getFitsFilePtr();
52
53 const std::vector<int>& getImageHdus() const;
54
56
57 void refresh();
58
59private:
60 boost::filesystem::path m_path;
62 std::unique_ptr<fitsfile, void (*)(fitsfile*)> m_fits_ptr;
65
66 void open();
67 void loadInfo();
68 void loadFitsHeader();
69 void loadHeadFile();
70};
71
72} // namespace SourceXtractor
73
74#endif /* _SEFRAMEWORK_FITS_FITSFILE_H_ */
represents access to a whole FITS file and handles loading and caching FITS headers
Definition: FitsFile.h:43
std::unique_ptr< fitsfile, void(*)(fitsfile *)> m_fits_ptr
Definition: FitsFile.h:62
boost::filesystem::path m_path
Definition: FitsFile.h:60
FitsFile(FitsFile &&)=default
std::map< std::string, MetadataEntry > & getHDUHeaders(int hdu)
Definition: FitsFile.cpp:110
std::vector< std::map< std::string, MetadataEntry > > m_headers
Definition: FitsFile.h:64
fitsfile * getFitsFilePtr()
Definition: FitsFile.cpp:102
std::vector< int > m_image_hdus
Definition: FitsFile.h:63
FitsFile(const boost::filesystem::path &path, bool writeable)
Definition: FitsFile.cpp:93
const std::vector< int > & getImageHdus() const
Definition: FitsFile.cpp:106
Path::Item path