EleFits
4.0.1
A modern C++ API on top of CFitsIO
|
#include <FitsFileFixture.h>
Temporary MefFile with random name.
Public Member Functions | |
TemporaryMefFile () | |
Constructor. | |
Public Member Functions inherited from Euclid::Fits::MefFile | |
virtual | ~MefFile ()=default |
Destroy the object and close the file. More... | |
MefFile (const std::string &filename, FileMode permission) | |
Create a new Fits file handler with given filename and permission. More... | |
long | hduCount () const |
Get the number of HDUs. More... | |
std::vector< std::string > | readHduNames () |
Read the name of each HDU. More... | |
std::vector< std::pair< std::string, long > > | readHduNamesVersions () |
Read the name and version of each HDU. More... | |
template<class T = Hdu> | |
const T & | access (long index) |
Access the HDU at given 0-based index. More... | |
const Hdu & | operator[] (long index) |
Shortcut for access<Hdu>(long) | |
template<class T = Hdu> | |
const T & | accessFirst (const std::string &name, long version=0) |
Access the first HDU with given name, type and version. More... | |
template<class T = Hdu> | |
const T & | access (const std::string &name, long version=0) |
Access the only HDU with given name, type and version. More... | |
template<class T = Hdu> | |
const T & | accessPrimary () |
Access the Primary HDU. More... | |
const ImageHdu & | primary () |
Access the Primary HDU. More... | |
template<typename THdu = Hdu> | |
HduSelector< THdu > | select (const HduFilter &filter=HduCategory::Any) |
Select a filtered set of HDUs. More... | |
const Hdu & | initRecordExt (const std::string &name) |
Append a new Hdu (as an empty ImageHdu) with given name. More... | |
template<typename T , long n> | |
const ImageHdu & | initImageExt (const std::string &name, const Position< n > &shape) |
Append a new ImageHdu with given name and shape. More... | |
template<typename T , long n> | |
const ImageHdu & | assignImageExt (const std::string &name, const Raster< T, n > &raster) |
Append an ImageHdu with given name and data. More... | |
template<typename... Ts> | |
const BintableHdu & | initBintableExt (const std::string &name, const ColumnInfo< Ts > &... header) |
Append a BintableHdu with given name and columns info. More... | |
template<typename... Ts> | |
const BintableHdu & | assignBintableExt (const std::string &name, const Column< Ts > &... columns) |
Append a BintableHdu with given name and data. More... | |
template<typename Tuple , std::size_t count = std::tuple_size<Tuple>::value> | |
const BintableHdu & | assignBintableExt (const std::string &name, const Tuple &columns) |
Append a BintableHdu with given name and data. More... | |
Public Member Functions inherited from Euclid::Fits::FitsFile | |
FitsFile (const std::string &filename, FileMode permission) | |
Create a new Fits file handler with given filename and permission. | |
virtual | ~FitsFile () |
Destroy the object and close the file. More... | |
std::string | filename () const |
Get the file name. | |
bool | isOpen () const |
Check whether the file is open. | |
void | reopen () |
Reopen the file. More... | |
void | close () |
Close the file. More... | |
void | closeAndDelete () |
Close and delete the file. | |
Additional Inherited Members | |
Static Public Attributes inherited from Euclid::Fits::MefFile | |
static constexpr long | primaryIndex = 0 |
The index of the Primary HDU. More... | |
Protected Member Functions inherited from Euclid::Fits::MefFile | |
template<class T = Hdu> | |
const T & | appendExt (T extension) |
Append an extension. More... | |
Protected Member Functions inherited from Euclid::Fits::FitsFile | |
void | open (const std::string &filename, FileMode permission) |
Open a Fits file with given filename and permission. More... | |
Protected Attributes inherited from Euclid::Fits::MefFile | |
std::vector< std::unique_ptr< Hdu > > | m_hdus |
Vector of Hdu s (castable to ImageHdu or BintableHdu ). More... | |
Protected Attributes inherited from Euclid::Fits::FitsFile | |
fitsfile * | m_fptr |
The CFitsIO file handler. | |
std::string | m_filename |
The file name. | |
FileMode | m_permission |
The file permission. | |
bool | m_open |
An open flag to nullify m_fptr at close. | |