25#ifndef _TABLE_FITSWRITER_H
26#define _TABLE_FITSWRITER_H
29#include <CCfits/FITS.h>
193 template <
typename T>
TableWriter implementation for writing tables in FITS format.
FitsWriter & operator=(const FitsWriter &)=delete
FitsWriter(const FitsWriter &)=delete
FitsWriter(FitsWriter &&)=default
FitsWriter & setFormat(Format format)
Set the FITS table format.
virtual ~FitsWriter()=default
Destructor.
void addComment(const std::string &message) override
Adds a comment to the stream.
Format
The format of the HDUs a FitsWriter creates.
@ BINARY
FITS binary table HDU format.
@ ASCII
FITS ASCII table HDU format.
std::vector< Header > m_headers
void append(const Table &table) override
FitsWriter & operator=(FitsWriter &&)=default
std::vector< std::string > m_comments
std::shared_ptr< CCfits::FITS > m_fits
void init(const Table &table) override
FitsWriter & setHduName(const std::string &name)
Set the HDU name where the table is written.
void setHeader(const std::string &key, T &&value, const std::string &comment="")
Sets a header key/value pair.
boost::variant< bool, int32_t, int64_t, float, double, std::string, std::vector< bool >, std::vector< int32_t >, std::vector< int64_t >, std::vector< float >, std::vector< double >, NdArray::NdArray< int32_t >, NdArray::NdArray< int64_t >, NdArray::NdArray< float >, NdArray::NdArray< double > > cell_type
The possible cell types.
Interface for classes writing tables.