#include <PHDU.h>
Inheritance diagram for CCfits::PHDU::
Public Methods | |
virtual PHDU* | clone (FITSBase *p) const=0 |
virtual void | zero (double value) |
virtual double | zero () const |
virtual double | scale () const |
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, long first, long nElements) |
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) |
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, const std::vector< long > &firstVertex, const std::vector< long > &lastVertex, const std::vector< long > &stride, S *nullValue) |
Protected Methods | |
PHDU (const PHDU &right) | |
PHDU (FITSBase *p, int bpix, int naxis, const std::vector< long > &axes) | |
PHDU (FITSBase *p=0) |
A PHDU object is automatically instantiated and added to a FITS object when a FITS file is accessed in any way. If a new file is created without specifying the data type for the header, CCfits assumes that the file is to be used for table extensions and creates a dummy header. PHDU instances are only created by FITS ctors. In the first release of CCfits, the Primary cannot be changed once declared.
PHDU and ExtHDU provide the same interface to writing images: multiple overloads of the templated PHDU::read and PHDU::write operations provide for (a) writing image data specified in a number of ways [C-array, std::vector, std::valarray] and with input location specified by initial pixel, by n-tuple, and by rectangular subset [generalized slice]; (b) reading image data specified similarly to the write options into a std::valarray.
|
copy constructor. required for cloning primary HDUs when copying FITS files. |
|
Writing Primary HDU constructor, called by PrimaryHDU<T> class.
Constructor used for creating new PHDU (i.e. for writing data to FITS). also doubles as default constructor since all arguments have default values, which are passed to the HDU constructor |
|
Reading Primary HDU constructor. Constructor used when reading the primary HDU from an existing file. Does nothing except initialize, with the real work done by the subclass PrimaryHDU<T>. |
|
virtual copy constructor, to be implemented in subclasses.
Reimplemented from CCfits::HDU. |
|
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 subset.
|
|
read part of an image array, processing null values.
As above except for
|
|
read an image section starting at a location specified by an n-tuple.
|
|
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 an image section starting at a specified pixel.
|
|
return the BSCALE keyword value.
Reimplemented from CCfits::HDU. |
|
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 PHDU::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
|
|
return the BZERO keyword value.
Reimplemented from CCfits::HDU. |
|
Private: called by ctor. Reimplemented from CCfits::HDU. |