EleFits
4.0.0
A modern C++ API on top of CFitsIO
|
HDU-related functions.
An HDU can be of two Types (ASCII tables are not supported):
Getter functions generally apply to the current HDU. Functions to go to an HDU return false if target HDU is already current HDU. Functions to create an HDU append it at the end of the file.
Functions | |
long | count (fitsfile *fptr) |
Read the number of HDUs in a Fits file. More... | |
long | currentIndex (fitsfile *fptr) |
Get the index of the current HDU. | |
std::string | currentName (fitsfile *fptr) |
Get the name of the current HDU. | |
long | currentVersion (fitsfile *fptr) |
Get the version of the current HDU. | |
Fits::HduCategory | currentType (fitsfile *fptr) |
Get the type of the current HDU (either Image or Bintable). More... | |
bool | currentIsPrimary (fitsfile *fptr) |
Check whether current HDU is the Primary HDU. | |
bool | gotoIndex (fitsfile *fptr, long index) |
Go to an HDU specified by its index. | |
bool | gotoName (fitsfile *fptr, const std::string &name, long version=0, Fits::HduCategory category=Fits::HduCategory::Any) |
Go to an HDU specified by its name. More... | |
bool | gotoNext (fitsfile *fptr, long step=1) |
Go to an HDU specified by incrementing the index by a given amount. | |
bool | gotoPrimary (fitsfile *fptr) |
Go to the Primary HDU. | |
bool | initPrimary (fitsfile *fptr) |
Initialize the Primary HDU if not done. | |
bool | updateName (fitsfile *fptr, const std::string &name) |
Write or update HDU name. | |
bool | updateVersion (fitsfile *fptr, long version) |
Write or update HDU version. | |
void | createMetadataExtension (fitsfile *fptr, const std::string &name) |
Create a new image HDU with empty data unit. | |
template<typename T , long n = 2> | |
void | createImageExtension (fitsfile *fptr, const std::string &name, const Fits::Position< n > &shape) |
Create a new image HDU with given name, pixel type and shape. | |
template<typename T , long n = 2> | |
void | createImageExtension (fitsfile *fptr, const std::string &name, const Fits::Raster< T, n > &raster) |
Write a Raster in a new image HDU. | |
template<typename... Ts> | |
void | createBintableExtension (fitsfile *fptr, const std::string &name, const Fits::ColumnInfo< Ts > &... infos) |
Create a new binary table HDU with given name and column infos. | |
template<typename... Ts> | |
void | createBintableExtension (fitsfile *fptr, const std::string &name, const Fits::Column< Ts > &... columns) |
Create a new binary table HDU with given name and columns. | |
template<typename Tuple , std::size_t size = std::tuple_size<Tuple>::value> | |
void | createBintableExtension (fitsfile *fptr, const std::string &name, const Tuple &table) |
Create a new binary table HDU with given name and columns. More... | |
void | deleteHdu (fitsfile *fptr, long index) |
Delete the HDU at given index. | |