EleFits  5.0.0
A modern C++ API on top of CFITSIO

◆ access() [1/2]

const T & access ( long  index)

Access the HDU at given 0-based index.

Template Parameters
TThe type of HDU or header or data unit handler, i.e. ImageHdu, ImageRaster, BintableHdu, BintableColumns, Hdu or Header to just handle metadata.
Returns
A reference to the HDU reader-writer.

The default handler is Hdu, in which case the returned HDU can still be cast to another handler, e.g.:

const auto &ext = f.access<>(1);
ext.as<ImageHdu>().readRaster<float>();
See also
operator[]