#include <ExtHDU.h>
Inheritance diagram for CCfits::ExtHDU::
Public Methods | |
ExtHDU (const ExtHDU &right) | |
virtual | ~ExtHDU () |
virtual void | readData (bool readFlag=false, const std::vector< string > &keys=std::vector< string >())=0 |
const string& | name () const |
virtual HDU* | clone (FITSBase *p) const=0 |
virtual void | makeThisCurrent () const |
virtual Column& | column (const string &colName) const |
virtual Column& | column (int colIndex) const |
virtual long | rows () const |
virtual void | addColumn (ValueType type, const string &columnName, long repeatWidth, const string &colUnit=string(""), long decimals=-1, size_t columnNumber=0) |
virtual void | deleteColumn (const string &columnName) |
int | version () const |
void | version (int value) |
std::string& | name () |
template<typename S> void | write (const std::vector< long > &first, long nElements, const std::valarray< S > &data, S *nullValue) |
template<typename S> void | write (long first, long nElements, const std::valarray< S > &data, S *nullValue) |
template<typename S> void | write (const std::vector< long > &first, long nElements, const std::valarray< S > &data) |
template<typename S> void | write (long first, long nElements, const std::valarray< S > &data) |
template<typename S> void | write (const std::vector< long > &firstVertex, const std::vector< long > &lastVertex, const std::valarray< S > &data) |
template<typename S> void | read (std::valarray< S > &image) |
template<typename S> void | read (std::valarray< S > &image, long first, long nElements, S *nullValue) |
template<typename S> void | read (std::valarray< S > &image, const std::vector< long > &first, long nElements, S *nullValue) |
template<typename S> void | read (std::valarray< S > &image, const std::vector< long > &firstVertex, const std::vector< long > &lastVertex, const std::vector< long > &stride) |
template<typename S> void | read (std::valarray< S > &image, long first, long nElements) |
template<typename S> void | read (std::valarray< S > &image, const std::vector< long > &first, long nElements) |
template<typename S> void | read (std::valarray< S > &image, const std::vector< long > &firstVertex, const std::vector< long > &lastVertex, const std::vector< long > &stride, S *nullValue) |
Static Public Methods | |
void | readHduName (const fitsfile *fptr, int hduIndex, string &hduName, int &hduVersion) |
Protected Methods | |
ExtHDU (FITSBase *p=0, HduType xtype=AnyHdu, const string &hduName=string(""), int version=1) | |
ExtHDU (FITSBase *p, HduType xtype, const string &hduName, int bitpix, int naxis, const std::vector< long > &axes, int version=1) | |
ExtHDU (FITSBase *p, HduType xtype, int number) | |
long | pcount () const |
void | pcount (long value) |
long | gcount () const |
void | gcount (long value) |
HduType | xtension () const |
void | xtension (HduType value) |
ExtHDU needs to have the combined public interface of Table objects and images. It achieves this by providing the same set of read and write operations as PHDU, and also providing the same operations for extracting columns from the extension as does Table [after which the column interface is accessible]. Differentiation between extension types operates by exception handling: .i.e. attempting to access image data structures on a Table object through the ExtHDU interface will or trying to return a Column reference from an Image extension will both throw an exception
|
copy constructor.
|
|
destructor.
|
|
default constructor, required as Standard Library Container content.
|
|
writing constructor. The writing constructor forces the user to supply a name for the HDU. The bitpix, naxes and naxis data required by this constructor are required FITS keywords for any HDUs. |
|
ExtHDU constructor for getting ExtHDUs by number. Necessary since EXTNAME is a reserved, not required, keyword. But a synthetic name is supplied by static ExtHDU::readHduName which is called by this constructor. |
|
add a new column to an existing table HDU.
Reimplemented in CCfits::AsciiTable, and CCfits::BinTable. |
|
virtual copy constructor.
Reimplemented from CCfits::HDU. Reimplemented in CCfits::AsciiTable, and CCfits::BinTable. |
|
return a reference to a Table column specified by column index.
This version is provided for convenience; the 'return by name' version is more efficient because columns are stored in an associative array sorted by name.
Reimplemented in CCfits::Table. |
|
return a reference to a Table column specified by name.
The overridden base class implementation ExtHDU::column throws an exception, which is thus the action to be taken if self is an image extension
Reimplemented in CCfits::Table. |
|
delete a column in a Table extension by name.
Reimplemented in CCfits::Table. |
|
set required gcount keyword value.
|
|
return required gcount keyword value.
|
|
move the fitsfile pointer to this current HDU.
This function should never need to be called by the user since it is called internally whenever required. Reimplemented from CCfits::HDU. |
|
set/return the extension name.
|
|
return the name of the extension.
|
|
set required pcount keyword value.
|
|
return required pcount keyword value.
|
|
read an image subset into valarray image, processing null values.
The image subset is defined by two vertices and a stride indicating the 'denseness' of the values to be picked in each dimension (a stride = (1,1,1,...) means picking every pixel in every dimension, whereas stride = (2,2,2,...) means picking every other value in each dimension. |
|
read an image section starting at a location specified by an n-tuple.
|
|
read an image section starting at a specified pixel.
|
|
read an image subset.
|
|
read part of an image array, processing null values.
As above except for
|
|
read part of an image array, processing null values.
Implicit data conversion is supported (i.e. user does not need to know the type of the data stored. A WrongExtensionType extension is thrown if *this is not an image.
|
|
Read image data into container.
The container image contains the entire image array after the call. This and all the other variants of read() throw a WrongExtensionType exception if called for a Table object. |
|
read data from HDU depending on readFlag and keys.
Reimplemented in CCfits::AsciiTable, and CCfits::BinTable. |
|
read extension name. Used primarily to allow extensions to be specified by HDU number and provide their name for the associative array that contains them. Alternatively, if there is no name keyword in the extension, one is synthesized from the index. |
|
return the number of rows in the extension.
Reimplemented in CCfits::Table. |
|
set the extension version number.
|
|
return the extension version number.
|
|
write a subset (generalize slice) of data to the image.
A generalized slice/subset is a subset of the image (e.g. one plane of a data cube of size <= the dimension of the cube). It is specified by two opposite vertices. The equivalent cfitsio call does not support undefined data processing so there is no version that allows a null value to be specified.
|
|
write array starting from specified pixel number, without undefined data processing.
|
|
write array starting from specified n-tuple, without undefined data processing.
|
|
write array to image starting with a specified pixel and allowing undefined data to be processed.
parameters after the first are as for version with n-tuple specifying first element. these two version are equivalent, except that it is possible for the first pixel number to exceed the range of 32-bit integers, which is how long datatype is commonly implemented. |
|
Write a set of pixels to an image extension with the first pixel specified by an n-tuple, processing undefined data.
All the overloaded versions of ExtHDU::write perform operations on *this if it is an image and throw a WrongExtensionType exception if not. Where appropriate, alternate versions allow undefined data to be processed
|
|
set the extension type.
|
|
return the extension type. allowed values are ImageHDU, AsciiTbl, and BinaryTbl |