#include <FitsFileFixture.h>
Temporary MefFile with random name.
Public Member Functions | |
TemporaryMefFile () | |
Constructor. | |
Public Member Functions inherited from 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 & | find (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... | |
const ImageHdu & | primary () |
Access the Primary HDU. More... | |
template<typename THdu = Hdu> | |
HduSelector< THdu > | filter (const HduFilter &categories=HduCategory::Any) |
Get an iterable object which represents a filtered set of HDUs. More... | |
template<typename T = unsigned char> | |
const ImageHdu & | appendImageHeader (const std::string &name="", const RecordSeq &records={}) |
Append a new image extension with empty data unit (NAXIS = 0 ). | |
template<typename T , long N = 2> | |
const ImageHdu & | appendNullImage (const std::string &name, const RecordSeq &records, const Position< N > &shape) |
Append and new image extension and fill the data unit with null values. More... | |
template<typename TRaster > | |
const ImageHdu & | appendImage (const std::string &name, const RecordSeq &records, const TRaster &raster) |
Append and write a new image extension. More... | |
template<typename... TInfos> | |
const BintableHdu & | appendBintableHeader (const std::string &name="", const RecordSeq &records={}, const TInfos &... infos) |
Append a binary table extension with empty data unit (0 rows and possibly 0 columns). | |
template<typename... TInfos> | |
const BintableHdu & | appendNullBintable (const std::string &name, const RecordSeq &records, long rowCount, const TInfos &... infos) |
Append a binary table extension and fill it with null values. More... | |
template<typename... TColumns> | |
const BintableHdu & | appendBintable (const std::string &name="", const RecordSeq &records={}, const TColumns &... columns) |
Append and write a new binary table extension. | |
template<typename TColumns , std::size_t Size = std::tuple_size<TColumns>::value> | |
const BintableHdu & | appendBintable (const std::string &name, const RecordSeq &records, const TColumns &columns) |
Append and write a new binary table extension. | |
template<class T = Hdu> | |
const T & | accessFirst (const std::string &name, long version=0) |
Deprecated alias for backward compatibility. More... | |
template<typename THdu = Hdu> | |
HduSelector< THdu > | select (const HduFilter &categories=HduCategory::Any) |
Deprecated alias for backward compatibility. 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 TRaster > | |
const ImageHdu & | assignImageExt (const std::string &name, const TRaster &raster) |
Append an ImageHdu with given name and data. More... | |
template<typename... TInfos> | |
const BintableHdu & | initBintableExt (const std::string &name, const TInfos &... header) |
Append a BintableHdu with given name and columns info. More... | |
template<typename... TColumns> | |
const BintableHdu & | assignBintableExt (const std::string &name, const TColumns &... columns) |
Append a BintableHdu with given name and data. More... | |
template<typename TTuple , std::size_t Size = std::tuple_size<TTuple>::value> | |
const BintableHdu & | assignBintableExt (const std::string &name, const TTuple &columns) |
Append a BintableHdu with given name and data. More... | |
Public Member Functions inherited from 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. | |
fitsfile * | handoverToCfitsio () |
Get CFITSIO's fitsfile* . More... | |
Additional Inherited Members | |
Static Public Attributes inherited from MefFile | |
static constexpr long | primaryIndex = 0 |
The index of the Primary HDU. More... | |
Related Functions inherited from FitsFile | |
bool | fileExists (const std::string &filename) |
Check whether a file exists. | |