Loading...
Searching...
No Matches
hdu.h
Go to the documentation of this file.
//# hdu.h:
//# Copyright (C) 1993,1994,1995,1996,1997,1999,2000,2002,2003
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef FITS_HDU_H
#define FITS_HDU_H
# include <casacore/casa/aips.h>
# include <casacore/fits/FITS/fits.h>
# include <casacore/fits/FITS/blockio.h>
# include <casacore/casa/BasicSL/String.h>
# include <casacore/casa/Arrays/Vector.h>
//# # include <stdarg.h> // If we ever wan to put varargs support back
namespace casacore { //# NAMESPACE CASACORE - BEGIN
class FitsInput;
class FitsOutput;
//<summary> base class that defines a HDU </summary>
//<synopsis>
// The class HeaderDataUnit contains what is common to all
// header-data-units, including the collection of keywords.
// From this class a number of FITS header-data-units are
// derived, each of them with their own rich assortment of
// functions for accessing and manipulating data of specific types.
//
// The following inheritence hierarchy illustrates the current
// derived classes:
//<srcblock>
//
// HeaderDataUnit
// / |
// / |
// PrimaryArray ExtensionHeaderDataUnit
// / | \ |
// / | \ |
// PrimaryGroup | ImageExtension |
// | |
// PrimaryTable BinaryTableExtension
// /
// /
// AsciiTableExtension
//</srcblock>
//</synopsis>
class HeaderDataUnit {
friend std::ostream & operator << (std::ostream &, HeaderDataUnit &);
public:
virtual ~HeaderDataUnit();
Int dims() const { return no_dims; }
Int dim(int n) const { return (0<no_dims && n<no_dims ? dimn[n] : 0); }
OFF_T fitsdatasize() const { return fits_data_size; }
FITS::ValueType datatype() const { return data_type; }
Int fitsitemsize() const { return fits_item_size; }
Int localitemsize() const { return local_item_size; }
FITS::HDUType hdutype() const { return hdu_type; }
// error handling and error codes that can be returned
//<group>
enum HDUErrs { OK, NOMEM, MISSKEY, BADBITPIX, NOAXISN,
NOPCOUNT, NOGCOUNT, BADPCOUNT, BADGCOUNT, NOGROUPS,
BADNAXIS, BADREC, BADTYPE, BADRULES, BADSIZE, BADOPER,
BADCONV, BADIO };
int err() const { return err_status; }
//</group>
// skipping one or more HDU's
//<group>
int skip(uInt n);
int skip();
//</group>
// write the current header
int write_hdr(FitsOutput &);
// Determines the HDU type and the data type
// Parameterss: keyword list, hdu type, data type, error handler and
// error status.
// Returns False if a serious error was detected, otherwise True
static Bool determine_type(FitsKeywordList &, FITS::HDUType &,
FITS::ValueType &, FITSErrorHandler, HDUErrs &);
// Compute the total size of the data associated with an HDU.
// The number of dimensions is also determined. This routine
// assumes that hdu type has been appropriately set, but it may
// be changed in the process. Data type is also determined.
// Returns False if a serious error was detected, otherwise True
static Bool compute_size(FitsKeywordList &, OFF_T &, Int &,
FITS::HDUType &, FITS::ValueType &, FITSErrorHandler, HDUErrs &);
// Operations on the HDU's keyword list
//<group>
ConstFitsKeywordList &kwlist(){ return constkwlist_;}
// return the header of the chdu as a vector of String. You can
// force the strings to be length 80 (padded with spaces)
Vector<String> kwlist_str(Bool length80=False);
void firstkw() { kwlist_.first(); }
void lastkw() { kwlist_.last(); }
const FitsKeyword *nextkw() { return kwlist_.next(); }
const FitsKeyword *prevkw() { return kwlist_.prev(); }
const FitsKeyword *currkw() { return kwlist_.curr(); }
const FitsKeyword *kw(int n) { return kwlist_(n); }
//# 07/21/98 AKH Added const to quite Apogee warnings:
const FitsKeyword *kw(const FITS::ReservedName &n) {
return kwlist_(n); }
const FitsKeyword *nextkw(FITS::ReservedName &n) {
return kwlist_.next(n); }
const FitsKeyword *kw(FITS::ReservedName &n, int i) {
return kwlist_(n,i); }
const FitsKeyword *nextkw(FITS::ReservedName &n, int i) {
return kwlist_.next(n,i); }
const FitsKeyword *kw(const char *n) { return kwlist_(n); }
const FitsKeyword *nextkw(const char *n) { return kwlist_.next(n); }
void mk(FITS::ReservedName k, Bool v, const char *c = 0);
void mk(FITS::ReservedName k, const char *v = 0, const char *c = 0);
void mk(FITS::ReservedName k, Int v, const char *c = 0);
void mk(FITS::ReservedName k, double v, const char *c = 0);
void mk(int n, FITS::ReservedName k, Bool v, const char *c = 0);
void mk(int n, FITS::ReservedName k, const char *v, const char *c = 0);
void mk(int n, FITS::ReservedName k, Int v, const char *c = 0);
void mk(int n, FITS::ReservedName k, double v, const char *c = 0);
void mk(const char *n, Bool v, const char *c = 0);
void mk(const char *n, const char *v = 0, const char *c = 0);
void mk(const char *n, Int v, const char *c = 0);
void mk(const char *n, float v, const char *c = 0);
void mk(const char *n, double v, const char *c = 0);
void mk(const char *n, Int r, Int i, const char *c = 0);
void mk(const char *n, float r, float i, const char *c = 0);
void mk(const char *n, double r, double i, const char *c = 0);
void spaces(const char *n = 0, const char *c = 0);
void comment(const char *n = 0, const char *c = 0);
void history(const char *c = 0);
//</group>
Bool notnull(double x) const { return double_null < x ? True : False; }
Bool notnull(char *s) const { return ! s ? False : (s[0] != '\0' ? True : False); }
Bool notnull(Int l) const { return Int_null < l ? True : False; }
protected:
// For input -- ~ should delete the keyword list: kwflag = 1
HeaderDataUnit(FitsInput &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// For output -- ~ should not delete keyword list: kwflag = 0
// 07/21/98 AKH Clarification: HeaderDataUnit has a copy of the
// FitsKeywordList, and should delete it. The kwflag
// comments above are not important now.
HeaderDataUnit(FitsKeywordList &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler,
FitsInput * = 0);
// constructor for objects that write only required keyword to fits file.
// the write method to call by these object should be those for the specific
// hdu, such as write_bintbl_hdr().
HeaderDataUnit(FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler,
FitsInput * = 0);
// for write required keywords only to use.
bool init_data_unit( FITS::HDUType t );
FitsKeywordList &kwlist_;
ConstFitsKeywordList constkwlist_;
void posEnd();
FitsInput *fin;
FITSErrorHandler errfn;
HDUErrs err_status;
void errmsg(HDUErrs, const char *);
Int no_dims; // number of dimensions
Int *dimn; // size of dimension N
//uInt fits_data_size; // size in bytes of total amount of data
OFF_T fits_data_size; // size in bytes of total amount of data
FITS::ValueType data_type; // type of data - derived from BITPIX
Int fits_item_size; // size in bytes of an item of FITS data
Int local_item_size; // size in bytes of an item of local data
FITS::HDUType hdu_type; // type of header/data unit
char pad_char; // char to pad FITS data block
//<group>
char * assign(FITS::ReservedName);
char * assign(FITS::ReservedName, int);
double asgdbl(FITS::ReservedName, double);
double asgdbl(FITS::ReservedName, int, double);
//</group>
double double_null;
char char_null;
Int Int_null;
public:
int get_hdr(FITS::HDUType, FitsKeywordList &);
int read_data(char *, Int);
int write_data(FitsOutput &, char *, Int);
OFF_T read_all_data(char *);
int write_all_data(FitsOutput &, char *);
};
inline std::ostream & operator << (std::ostream &o, HeaderDataUnit &h) {
return o << h.kwlist_; }
inline void HeaderDataUnit::mk(FITS::ReservedName k, Bool v, const char *c) {
posEnd(); kwlist_.mk(k,v,c); }
inline void HeaderDataUnit::mk(FITS::ReservedName k, const char *v,
const char *c) { posEnd(); kwlist_.mk(k,v,c); }
inline void HeaderDataUnit::mk(FITS::ReservedName k, Int v, const char *c) {
posEnd(); kwlist_.mk(k,v,c); }
inline void HeaderDataUnit::mk(FITS::ReservedName k, double v, const char *c) {
posEnd(); kwlist_.mk(k,v,c); }
inline void HeaderDataUnit::mk(int n, FITS::ReservedName k, Bool v,
const char *c) { posEnd(); kwlist_.mk(n,k,v,c); }
inline void HeaderDataUnit::mk(int n, FITS::ReservedName k, const char *v,
const char *c) { posEnd(); kwlist_.mk(n,k,v,c); }
inline void HeaderDataUnit::mk(int n, FITS::ReservedName k, Int v,
const char *c) { posEnd(); kwlist_.mk(n,k,v,c); }
inline void HeaderDataUnit::mk(int n, FITS::ReservedName k, double v,
const char *c) { posEnd(); kwlist_.mk(n,k,v,c); }
inline void HeaderDataUnit::mk(const char *n, Bool v, const char *c) {
posEnd(); kwlist_.mk(n,v,c); }
inline void HeaderDataUnit::mk(const char *n, const char *v, const char *c) {
posEnd(); kwlist_.mk(n,v,c); }
inline void HeaderDataUnit::mk(const char *n, Int v, const char *c) {
posEnd(); kwlist_.mk(n,v,c); }
inline void HeaderDataUnit::mk(const char *n, float v, const char *c) {
posEnd(); kwlist_.mk(n,v,c); }
inline void HeaderDataUnit::mk(const char *n, double v, const char *c) {
posEnd(); kwlist_.mk(n,v,c); }
inline void HeaderDataUnit::mk(const char *n, Int r, Int i, const char *c) {
posEnd(); kwlist_.mk(n,r,i,c); }
inline void HeaderDataUnit::mk(const char *n, float r, float i, const char *c) {
posEnd(); kwlist_.mk(n,r,i,c); }
inline void HeaderDataUnit::mk(const char *n, double r, double i,
const char *c) { posEnd(); kwlist_.mk(n,r,i,c); }
inline void HeaderDataUnit::spaces(const char *n, const char *c) {
posEnd(); kwlist_.spaces(n,c); }
inline void HeaderDataUnit::comment(const char *n, const char *c) {
posEnd(); kwlist_.comment(n,c); }
inline void HeaderDataUnit::history(const char *c) {
posEnd(); kwlist_.history(c); }
//<summary> templated primary array base class of given type </summary>
//<synopsis>
// A Primary Data Array is represented by the following:
//<srcblock>
// <Type> data_array [NAXIS1][NAXIS2]...[NAXISN]
//</srcblock>
//
// For a PrimaryArray, dims() gives the number of dimensions
// and dim(i) gives the value of the i-th dimension
//
// WARNING! Multi-dimensional arrays are stored in FORTRAN order,
// NOT in C order. Options on the store, copy, and move functions exist
// to convert from one order to the other, if that is necessary.
//
//
// It is important to understand the proper sequence of operations with
// respect to I/O and data access. For input, the `read()' functions
// allocate an internal buffer of the appropriate size, if not already
// allocated, as well as reading and converting data; a `read()' function
// must be performed prior to accessing the data, i. e. before executing
// any `()', `data()', `copy()', or `move()' function. For output, the
// `store()' function similarly allocates an internal buffer before
// transfering data, and must be executed prior to any data access or
// `write()' function. Note: If you call any version of store(), do not
// call set_next().
//
// Writing portions of an array at a time, rather than the entire array,
// is a special case. The `set_next()' function is provided for this
// purpose. It declares the intention to write out the next N elements and
// must be executed prior to any `data()' function. It allocates a buffer
// of appropriate size, if not already allocated. Again, via the `data()'
// functions, one accesses the array as if the entire array were in
// memory. The `write()' function always writes the number of current
// elements in the internal buffer. The sequence of operations for each
// portion of the array written would be:
// <ul>
// <li> `set_next(N)',
// <li> fill the array using `data(N)' or other `data()' functions
// <li> `write(fout)'.
// </ul>
// The `set_next()' function must NOT be used with
// `read()' or `store()' functions; unpredictable results will occur.
//<example>
// The following example illustrates the output cases.
//
// Suppose we have an image array with 512 rows and 1024 columns
// stored in C-order. The C declaration would be:
//<srcblock>
// int source[1024][512];
//</srcblock>
// To write out the entire array:
//<srcblock>
// FitsOutput fout; // some properly constructed FitsOutput
// PrimaryArray<FitsLong> pa; // some properly constructed PrimaryArray
// pa.store(source,CtoF);
// pa.write(fout);
//</srcblock>
//
// Suppose we wanted to write out the two-dimensional image array a column
// at a time, rather than write out the entire array. For FITS, dim(0)
// is 512, dim(1) is 1024. The following code fragment writes one column
// at a time in the proper FITS Fortran-order.
//
//<srcblock>
// for (i = 0; i < dim(1); ++i) {
// pa.set_next(dim(0));
// for (j = 0; j < dim(0); ++j)
// data(j,i) = source[i][j];
// pa.write(fout);
// }
//</srcblock>
//</example>
//
//</synopsis>
template <class TYPE>
class PrimaryArray : public HeaderDataUnit {
public:
typedef TYPE ElementType;
// constructor from a FitsInput
PrimaryArray(FitsInput &, FITSErrorHandler= FITSError::defaultHandler);
// constructor from a FitsKeywordList
PrimaryArray(FitsKeywordList &,
FITSErrorHandler= FITSError::defaultHandler);
// constructor does not require a FitsKeywordList. call write_priArr_hdr() after construction.
PrimaryArray(FITSErrorHandler= FITSError::defaultHandler);
// destructor
virtual ~PrimaryArray();
// General access routines for a primary array
//<group>
double bscale() const { return bscale_x; }
double bzero() const { return bzero_x; }
char *bunit() const { return bunit_x; }
Bool isablank() const { return isablank_x; }
Int blank() const { return blank_x; }
char *ctype(int n) const { return ctype_x[n]; }
double crpix(int n) const { return crpix_x[n]; }
double crota(int n) const { return crota_x[n]; }
double crval(int n) const { return crval_x[n]; }
double cdelt(int n) const { return cdelt_x[n]; }
double datamax() const { return datamax_x; }
double datamin() const { return datamin_x; }
OFF_T nelements() const { return totsize; }
//</group>
// The overloaded operator functions `()' all return physical data, i. e.,
// data to which bscale() and bzero() have been applied, via the formula
//<srcblock>
// physical_data[i] = bscale() * raw_data[i] + bzero().
//</srcblock>
//<group>
double operator () (int, int, int, int, int) const;
double operator () (int, int, int, int) const;
double operator () (int, int, int) const;
double operator () (int, int) const;
double operator () (int) const;
//</group>
// The various `data()' functions allow one to access and set the raw data
// itself.
//<group>
TYPE & data(int, int, int, int, int);
TYPE & data(int, int, int, int);
TYPE & data(int, int, int);
TYPE & data(int, int);
TYPE & data(int);
//</group>
// The `store()', `move()' and `copy()' functions allow bulk data
// transfer between the internal FITS array and an external data
// storage area. The external storage must have already been allocated
// and it is assumed that the entire data array is in memory.
// `store()' transfers raw data at `source' into the FITS array; an
// allowable option is CtoF, which specifies to convert the array from
// C-order to Fortran-order. `move()' is the opposite of `store()'.
// `move()' transfers raw data from the FITS array to `target'; an
// allowable option is FtoC, which specifies to convert the array from
// Fortran-order to C-order. `copy()' is similar to `move()' except
// that what is copied is physical data and not raw data; the physical
// data can be either double or float. copy() also turns blanks into
// NaN's.
//<group>
int store(const TYPE *source, FITS::FitsArrayOption = FITS::NoOpt);
void copy(double *target, FITS::FitsArrayOption = FITS::NoOpt) const;
void copy(float *target, FITS::FitsArrayOption = FITS::NoOpt) const;
void move(TYPE *target, FITS::FitsArrayOption = FITS::NoOpt) const;
// <group>
// Use these versions if you are reading/writing "chunk by
// chunk." No FtoC option is available. You are responsible for
// ensuring that npixels corresponds to he number actually read or
// written. Note that copy() turns blanks into NaN's.
int store(const TYPE *source, int npixels);
void copy(double *target, int npixels) const;
void copy(float *target, int npixels) const;
void move(TYPE *target, int npixels) const;
// </group>
// </group>
//<group>
int write_priArr_hdr( FitsOutput &fout, int simple, int bitpix,
int naxis, long naxes[], int extend );
//</group>
// The `read()' and `write()' functions control reading and writing data
// from the external FITS I/O medium into the FITS array. Appropriate
// conversions are made between FITS and local data representations. One
// can read the entire array into memory, or one can only read portions of
// the array. In the latter case, one must specify that the next N
// elements are to be read or written. Note that the number of elements
// must be specified, NOT the number of bytes. If one reads portions of
// the array, as opposed to the entire array, only that portion is in
// memory at a given time. One can still access the elements of the array
// via the `()' and `data()' functions, as if the entire array was in
// memory; obviously care must be taken in this case to access only those
// portions that are actually in memory.
//<group>
virtual int read();
virtual int read( int );
virtual int write(FitsOutput &);
virtual OFF_T set_next(OFF_T);
//</group>
//### if these, even as interspersed comments, cxx2html repeats the global
//# group info..
//# read: read entire array into memory
//# read() read next N elements into memory
//# write; write current data
//# set_next(): prepare to write next N elements
protected:
// construct from a FitsInput with given HDU type
PrimaryArray(FitsInput &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// construct from a FitsKeywordList with given HDU type
PrimaryArray(FitsKeywordList &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// construct witout FitsKeywordList for given HDU type( for ImageExtension and PrimaryGroup)
PrimaryArray(FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
double bscale_x;
double bzero_x;
char *bunit_x;
Bool isablank_x;
Int blank_x;
char **ctype_x;
double *crpix_x;
double *crota_x;
double *crval_x;
double *cdelt_x;
double datamax_x;
double datamin_x;
OFF_T totsize;
int *factor; // factors needed to compute array position offsets
// compute a linear offset from array indicies
//<group>
int offset(int, int) const;
int offset(int, int, int) const;
int offset(int, int, int, int) const;
int offset(int, int, int, int, int) const;
//</group>
OFF_T alloc_elems; // current number of allocated elements
OFF_T beg_elem; // offset of first element in the buffer
OFF_T end_elem; // offset of last element in the buffer
// the allocated array
TYPE *array;
void pa_assign();
};
typedef PrimaryArray<unsigned char> BytePrimaryArray;
typedef PrimaryArray<short> ShortPrimaryArray;
typedef PrimaryArray<FitsLong> LongPrimaryArray;
typedef PrimaryArray<float> FloatPrimaryArray;
typedef PrimaryArray<double> DoublePrimaryArray;
//<summary> IMAGE extension of given type </summary>
//<templating>
// <li> typedef ImageExtension<unsigned char> ByteImageExtension;
// <li> typedef ImageExtension<short> ShortImageExtension;
// <li> typedef ImageExtension<FitsLong> LongImageExtension;
// <li> typedef ImageExtension<float> FloatImageExtension;
// <li> typedef ImageExtension<double> DoubleImageExtension;
//</templating>
template <class TYPE>
class ImageExtension : public PrimaryArray<TYPE> {
public:
typedef TYPE ElementType;
ImageExtension(FitsInput &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
ImageExtension(FitsKeywordList &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// constructor for header consisted required keywords only
ImageExtension(FITSErrorHandler errhandler = FITSError::defaultHandler);
~ImageExtension();
char *xtension() { return xtension_x; }
char *extname() { return extname_x; }
Int extver() { return extver_x; }
Int extlevel() { return extlevel_x; }
Int pcount() { return pcount_x; }
Int gcount() { return gcount_x; }
// write required keywords for ImageExtension
int write_imgExt_hdr( FitsOutput &fout,
int bitpix, int naxis, long *naxes);
protected:
char *xtension_x;
char *extname_x;
Int extver_x;
Int extlevel_x;
Int pcount_x;
Int gcount_x;
private:
void ie_assign();
//# Make members in parent known
protected:
using PrimaryArray<TYPE>::assign;
using PrimaryArray<TYPE>::errmsg;
using PrimaryArray<TYPE>::init_data_unit;
using PrimaryArray<TYPE>::pa_assign;
using PrimaryArray<TYPE>::char_null;
using PrimaryArray<TYPE>::kwlist_;
using PrimaryArray<TYPE>::errfn;
using PrimaryArray<TYPE>::hdu_type;
using PrimaryArray<TYPE>::data_type;
using PrimaryArray<TYPE>::fits_data_size;
using PrimaryArray<TYPE>::fits_item_size;
using PrimaryArray<TYPE>::array;
using PrimaryArray<TYPE>::BADOPER;
};
typedef ImageExtension<unsigned char> ByteImageExtension;
typedef ImageExtension<short> ShortImageExtension;
typedef ImageExtension<FitsLong> LongImageExtension;
typedef ImageExtension<float> FloatImageExtension;
typedef ImageExtension<double> DoubleImageExtension;
//<summary> Random Group datastructure </summary>
//<synopsis>
// A Random Group Structure is represented by the following:
//<srcblock>
// struct GroupData {
// <Type> group_parms [PCOUNT];
// <Type> data_array [NAXIS2][NAXIS3]...[NAXISN];
// } group_data[GCOUNT];
//</srcblock>
//</synopsis>
//<templating>
//#until cxx2html can handle this, duplicate
// <li>typedef PrimaryGroup<unsigned char> BytePrimaryGroup;
// <li> typedef PrimaryGroup<short> ShortPrimaryGroup;
// <li> typedef PrimaryGroup<FitsLong> LongPrimaryGroup;
// <li> typedef PrimaryGroup<float> FloatPrimaryGroup;
// <li> typedef PrimaryGroup<double> DoublePrimaryGroup;
//</templating>
//<note role=warning>
// Please note that the NOST has deprecated the Random Group
// datastructure, it has been replaced by the much more powerfull
// BINTABLE extension.
//</note>
template <class TYPE>
class PrimaryGroup : public PrimaryArray<TYPE> {
public:
PrimaryGroup(FitsInput &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
PrimaryGroup(FitsKeywordList &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// constructor for header consisted required keywords only
PrimaryGroup(FITSErrorHandler errhandler = FITSError::defaultHandler);
~PrimaryGroup();
// Return basic parameters of a random group
//<group>
Int gcount() const { return gcount_x; }
Int pcount() const { return pcount_x; }
char *ptype(int n) const { return ptype_x[n]; }
double pscal(int n) const { return pscal_x[n]; }
double pzero(int n) const { return pzero_x[n]; }
//</group>
Int currgroup() const { return current_group; }
double parm(int); // return physical parms
TYPE & rawparm(int); // access raw parms
void storeparm(const TYPE *source);
void copyparm(double *target) const;
void copyparm(float *target) const;
void moveparm(TYPE *target) const;
// read, or write the next group
//<group>
int read();
int write(FitsOutput &);
//</group>
// write the required keywords for PrimaryGroup
//<group>
int write_priGrp_hdr( FitsOutput &fout, int simple, int bitpix,
int naxis, long naxes[], long pcount, long gcount );
//</group>
// disable these functions, since they
// are inherited from PrimaryArray
//<group>
OFF_T set_next(OFF_T) { return 0; }
int read(int) { return -1; }
//</group>
protected:
Int pcount_x;
Int gcount_x;
char **ptype_x;
double *pscal_x;
double *pzero_x;
TYPE *group_parm;
Int current_group;
private:
void pg_assign();
//# Make members in parent known
protected:
using PrimaryArray<TYPE>::assign;
using PrimaryArray<TYPE>::errmsg;
using PrimaryArray<TYPE>::init_data_unit;
using PrimaryArray<TYPE>::pa_assign;
using PrimaryArray<TYPE>::asgdbl;
using PrimaryArray<TYPE>::nelements;
using PrimaryArray<TYPE>::localitemsize;
using PrimaryArray<TYPE>::fitsitemsize;
using PrimaryArray<TYPE>::read_data;
using PrimaryArray<TYPE>::write_data;
using PrimaryArray<TYPE>::char_null;
using PrimaryArray<TYPE>::kwlist_;
using PrimaryArray<TYPE>::errfn;
using PrimaryArray<TYPE>::err_status;
using PrimaryArray<TYPE>::hdu_type;
using PrimaryArray<TYPE>::data_type;
using PrimaryArray<TYPE>::fits_data_size;
using PrimaryArray<TYPE>::fits_item_size;
using PrimaryArray<TYPE>::array;
using PrimaryArray<TYPE>::totsize;
using PrimaryArray<TYPE>::dimn;
using PrimaryArray<TYPE>::no_dims;
using PrimaryArray<TYPE>::factor;
using PrimaryArray<TYPE>::ctype_x;
using PrimaryArray<TYPE>::crpix_x;
using PrimaryArray<TYPE>::crota_x;
using PrimaryArray<TYPE>::crval_x;
using PrimaryArray<TYPE>::cdelt_x;
using PrimaryArray<TYPE>::BADOPER;
using PrimaryArray<TYPE>::OK;
using PrimaryArray<TYPE>::NOMEM;
using PrimaryArray<TYPE>::BADIO;
};
typedef PrimaryGroup<unsigned char> BytePrimaryGroup;
typedef PrimaryGroup<short> ShortPrimaryGroup;
typedef PrimaryGroup<FitsLong> LongPrimaryGroup;
typedef PrimaryGroup<float> FloatPrimaryGroup;
typedef PrimaryGroup<double> DoublePrimaryGroup;
//<summary> Primary Table structure </summary>
//<templating>
// <li> typedef PrimaryTable<unsigned char> BytePrimaryTable;
// <li> typedef PrimaryTable<short> ShortPrimaryTable;
// <li> typedef PrimaryTable<FitsLong> LongPrimaryTable;
// <li> typedef PrimaryTable<float> FloatPrimaryTable;
// <li> typedef PrimaryTable<double> DoublePrimaryTable;
//</templating>
template <class TYPE>
class PrimaryTable : public PrimaryArray<TYPE> {
public:
typedef TYPE ElementType;
PrimaryTable(FitsInput &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
PrimaryTable(FitsKeywordList &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// constructor for header consisted required keywords only
PrimaryTable(FITSErrorHandler errhandler = FITSError::defaultHandler);
~PrimaryTable();
// write required keywords for PrimaryTable
int write_priTable_hdr( FitsOutput &fout,
int bitpix, int naxis, long *naxes);
int read();
int read(int) { return -1; }
int write(FitsOutput &){ return -1; }
char* object() const { return object_x; }
char* telescop() const { return telescop_x; }
char* instrume() const { return instrume_x; }
char* dateobs() const { return dateobs_x; }
char* datemap() const { return datemap_x; }
char* bunit() const { return bunit_x; }
float bscal() const { return bscale_x; }
float bzero() const { return bzero_x; }
float equinox() const { return equinox_x; }
float altrpix() const { return altrpix_x; }
protected:
char* object_x; //OBJECT
char* telescop_x; //TELESCOP
char* instrume_x; //INSTRUME
char* dateobs_x; //DATE-OBS
char* datemap_x; //DATE-MAP
Float bscale_x; //BSCALE
Float bzero_x; //BZERO
char* bunit_x; //BUNIT
Float equinox_x; //EQUINOX
Float altrpix_x; //ALTRPIX
private:
void pt_assign();
//# Make members in parent known
protected:
using PrimaryArray<TYPE>::assign;
using PrimaryArray<TYPE>::errmsg;
using PrimaryArray<TYPE>::init_data_unit;
using PrimaryArray<TYPE>::pa_assign;
using PrimaryArray<TYPE>::asgdbl;
using PrimaryArray<TYPE>::nelements;
using PrimaryArray<TYPE>::localitemsize;
using PrimaryArray<TYPE>::fitsitemsize;
using PrimaryArray<TYPE>::read_data;
using PrimaryArray<TYPE>::write_data;
using PrimaryArray<TYPE>::char_null;
using PrimaryArray<TYPE>::kwlist_;
using PrimaryArray<TYPE>::errfn;
using PrimaryArray<TYPE>::err_status;
using PrimaryArray<TYPE>::hdu_type;
using PrimaryArray<TYPE>::data_type;
using PrimaryArray<TYPE>::fits_data_size;
using PrimaryArray<TYPE>::fits_item_size;
using PrimaryArray<TYPE>::array;
using PrimaryArray<TYPE>::totsize;
using PrimaryArray<TYPE>::dimn;
using PrimaryArray<TYPE>::no_dims;
using PrimaryArray<TYPE>::factor;
using PrimaryArray<TYPE>::ctype_x;
using PrimaryArray<TYPE>::crpix_x;
using PrimaryArray<TYPE>::crota_x;
using PrimaryArray<TYPE>::crval_x;
using PrimaryArray<TYPE>::cdelt_x;
using PrimaryArray<TYPE>::BADOPER;
using PrimaryArray<TYPE>::OK;
using PrimaryArray<TYPE>::NOMEM;
using PrimaryArray<TYPE>::BADIO;
};
typedef PrimaryTable<unsigned char> BytePrimaryTable;
typedef PrimaryTable<short> ShortPrimaryTable;
typedef PrimaryTable<FitsLong> LongPrimaryTable;
typedef PrimaryTable<float> FloatPrimaryTable;
typedef PrimaryTable<double> DoublePrimaryTable;
//<summary> base class for generalized exentensions HDU </summary>
class ExtensionHeaderDataUnit : public HeaderDataUnit {
public:
ExtensionHeaderDataUnit(FitsInput &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
ExtensionHeaderDataUnit(FitsKeywordList &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
~ExtensionHeaderDataUnit();
char *xtension() { return xtension_x; }
char *extname() { return extname_x; }
Int extver() { return extver_x; }
Int extlevel() { return extlevel_x; }
Int pcount() { return pcount_x; }
Int gcount() { return gcount_x; }
// read next N bytes into addr
int read(char *addr, int nbytes) {
return read_data(addr, Int(nbytes)); }
// write next N bytes from addr to the FITS output fout
int write(FitsOutput &fout, char *addr, int nbytes) {
return write_data(fout,addr,nbytes); }
protected:
ExtensionHeaderDataUnit(FitsInput &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
ExtensionHeaderDataUnit(FitsKeywordList &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// This constructor is used for writing only required keywords.
ExtensionHeaderDataUnit(FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
char *xtension_x;
char *extname_x;
Int extver_x;
Int extlevel_x;
Int pcount_x;
Int gcount_x;
private:
void ex_assign();
};
//<summary> helper class </summary>
class FitsBase {
friend class BinaryTableExtension;
friend class AsciiTableExtension;
public:
FitsBase(const FITS::ValueType &t, int n) : no_elements(n),
data_type(t) { }
virtual ~FitsBase();
unsigned int nelements() const { return (unsigned int)no_elements; }
virtual int fitsfieldsize() const = 0;
virtual int localfieldsize() const = 0;
virtual void *data() = 0;
virtual int dims() const;
virtual int dim(int n) const;
virtual int *vdim();
FITS::ValueType fieldtype() const { return data_type; }
static FitsBase *make(const FITS::ValueType &, int = 1);
static FitsBase *make(const FITS::ValueType &, int, int *);
static FitsBase *make(FitsBase &);
FitsBase & operator = (FitsBase &) = delete;
virtual void show(std::ostream &) = 0;
protected:
int no_elements; // the number of elements in the field
FITS::ValueType data_type;
virtual void setaddr(void **) = 0;
};
inline std::ostream & operator << (std::ostream &o, FitsBase &x) {
x.show(o); return o;
}
//<summary> helper class </summary>
//<note>
// Note that FitsField does not allocate space for the data.
// Space is external to FitsField and its address is set via the
// setaddr function.
//</note>
template <class TYPE>
class FitsField : public FitsBase {
public:
FitsField(int n = 1) :
FitsBase(FITS::getfitstype(NoConvert<TYPE>()),n), field(0) { }
~FitsField();
TYPE & operator () () { return (*field)[0]; }
TYPE & operator () (int i) { return (*field)[i]; }
FitsField<TYPE> & operator = (const TYPE &x) {
(*field)[0] = x; return *this; }
int fitsfieldsize() const;
int localfieldsize() const;
void *data();
void show(std::ostream &);
protected:
TYPE **field;
void setaddr(void **addr);
};
//<summary> helper class </summary>
//<templating>
//#until cxx2html can handle this, duplicate
// <li> typedef FitsField<FitsLogical> LogicalFitsField;
// <li> typedef FitsField<FitsBit> BitFitsField;
// <li> typedef FitsField<char> CharFitsField;
// <li> typedef FitsField<unsigned char> ByteFitsField;
// <li> typedef FitsField<short> ShortFitsField;
// <li> typedef FitsField<FitsLong> LongFitsField;
// <li> typedef FitsField<float> FloatFitsField;
// <li> typedef FitsField<double> DoubleFitsField;
// <li> typedef FitsField<Complex> ComplexFitsField;
// <li> typedef FitsField<IComplex> IComplexFitsField;
// <li> typedef FitsField<DComplex> DComplexFitsField;
// <li> typedef FitsField<FitsVADesc> VADescFitsField;
//</templating>
//<note role=caution>
// Bit fields require special treatment
//</note>
template <> class FitsField<FitsBit> : public FitsBase {
public:
FitsField(int n = 1);
~FitsField();
FitsField<FitsBit> & operator () () { byte_offset = 0; mask = 0200;
return *this; }
FitsField<FitsBit> & operator () (unsigned i) {
byte_offset = i / 8; mask = 0200 >> (i % 8); return *this; }
FitsField<FitsBit> & operator = (unsigned i) {
(*field)[byte_offset] =
(i == 0 ? ((*field)[byte_offset] & ~mask) :
((*field)[byte_offset] | mask)); return *this; }
int fitsfieldsize() const;
int localfieldsize() const;
operator int() { return (((*field)[byte_offset] & mask) != 0); }
void *data();
void show(std::ostream &);
protected:
FitsBit **field;
unsigned char mask;
int byte_offset;
void setaddr(void **addr);
};
typedef FitsField<FitsLogical> LogicalFitsField;
typedef FitsField<FitsBit> BitFitsField;
typedef FitsField<char> CharFitsField;
typedef FitsField<unsigned char> ByteFitsField;
typedef FitsField<short> ShortFitsField;
typedef FitsField<FitsLong> LongFitsField;
typedef FitsField<float> FloatFitsField;
typedef FitsField<double> DoubleFitsField;
typedef FitsField<Complex> ComplexFitsField;
typedef FitsField<IComplex> IComplexFitsField;
typedef FitsField<DComplex> DComplexFitsField;
typedef FitsField<FitsVADesc> VADescFitsField;
//<summary> FITS array of given type </summary>
template <class TYPE>
class FitsArray : public FitsField<TYPE> {
public:
FitsArray(int, const int *);
~FitsArray();
TYPE & operator () (int d0, int d1);
TYPE & operator () (int, int, int);
TYPE & operator () (int, int, int, int);
TYPE & operator () (int, int, int, int, int);
int dims() const;
int dim(int n) const;
int *vdim();
protected:
int no_dims;
int *dimn;
int *factor;
//# Make members in parent known
protected:
using FitsField<TYPE>::no_elements;
using FitsField<TYPE>::field;
};
//<summary> FITS array of FitsBit type </summary>
//<note>
// We must specify a FitsArray<FitsBit> as a specialization.
//</note>
template <> class FitsArray<FitsBit> : public FitsField<FitsBit> {
public:
FitsArray(int, const int *);
~FitsArray();
FitsField<FitsBit> & operator () (int d0, int d1);
FitsField<FitsBit> & operator () (int, int, int);
FitsField<FitsBit> & operator () (int, int, int, int);
FitsField<FitsBit> & operator () (int, int, int, int, int);
//# Disabled for now - we might eventually want to put varargs support back
//# FitsField<FitsBit> & operator () (int, int, int, int, int, int ...);
int dims() const;
int dim(int n) const;
int *vdim();
protected:
int no_dims;
int *dimn;
int *factor;
};
typedef FitsArray<FitsLogical> LogicalFitsArray;
typedef FitsArray<FitsBit> BitFitsArray;
typedef FitsArray<char> CharFitsArray;
typedef FitsArray<unsigned char> ByteFitsArray;
typedef FitsArray<short> ShortFitsArray;
typedef FitsArray<FitsLong> LongFitsArray;
typedef FitsArray<float> FloatFitsArray;
typedef FitsArray<double> DoubleFitsArray;
typedef FitsArray<Complex> ComplexFitsArray;
typedef FitsArray<IComplex> IComplexFitsArray;
typedef FitsArray<DComplex> DComplexFitsArray;
typedef FitsArray<FitsVADesc> VADescFitsArray;
//<summary> BINTABLE extension </summary>
class BinaryTableExtension : public ExtensionHeaderDataUnit {
public:
BinaryTableExtension(FitsInput &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
BinaryTableExtension(FitsKeywordList &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
// constructor to match write_bintbl_hdr()
BinaryTableExtension( FITSErrorHandler errhandler = FITSError::defaultHandler);
virtual ~BinaryTableExtension();
// return basic elements of a table
//<group>
Int nrows() const { return dim(1); }
Int ncols() const { return tfields_x; }
uInt rowsize() const { return fitsrowsize; }
Int tfields() const { return tfields_x; }
const char *tform(int n) const { return tform_x[n]; }
double tscal(int n) const { return tscal_x[n]; }
double tzero(int n) const { return tzero_x[n]; }
Bool isatnull(int n) const { return isatnull_x[n]; }
Int tnull(int n) const { return tnull_x[n]; }
const char *ttype(int n) const { return ttype_x[n]; }
const char *tunit(int n) const { return tunit_x[n]; }
const char *tdisp(int n) const { return tdisp_x[n]; }
const char *tdim(int n) const { return tdim_x[n]; }
const char *ctype(int n) const { return ctype_x[n]; }
double crpix(int n) const { return crpix_x[n]; }
double crota(int n) const { return crota_x[n]; }
double crval(int n) const { return crval_x[n]; }
double cdelt(int n) const { return cdelt_x[n]; }
Int theap() const { return theap_x; }
const char *author() const { return author_x; }
const char *referenc() const { return referenc_x; }
//</group>
// binds a FitsField to a column
int bind(int, FitsBase &);
// row selector functions
//<group>
BinaryTableExtension & operator ++ ();
BinaryTableExtension & operator -- ();
BinaryTableExtension & operator () (int);
//</group>
// read entire table into memory
int read();
// read next N rows into memory
int read(int);
// prepare to write the next N rows
int set_next(int);
// write current rows
int write(FitsOutput &);
// create a binary table header without using FitsKeywordList objet.
int write_binTbl_hdr(FitsOutput &, long, int, const char**,
const char**, const char**, const char*, long );
// select a field
FitsBase &field(int i) const { return *fld[i]; }
// get current row
Int currrow() const { return curr_row; }
// sets field addresses in the current row
//void set_fitsrow(Int);
protected:
BinaryTableExtension(FitsInput &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
BinaryTableExtension(FitsKeywordList &, FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
BinaryTableExtension(FITS::HDUType,
FITSErrorHandler errhandler = FITSError::defaultHandler);
Int tfields_x;
char **tform_x;
double *tscal_x;
double *tzero_x;
Bool *isatnull_x;
Int *tnull_x;
char **ttype_x;
char **tunit_x;
char **tdisp_x;
char **tdim_x;
char **ctype_x;
double *crpix_x;
double *crota_x;
double *crval_x;
double *cdelt_x;
Int nAxis;
Int theap_x;
char *author_x;
char *referenc_x;
// read and write the next FITS data row
//<group>
virtual int readrow();
virtual int writerow(FitsOutput &);
//</group>
unsigned char *fitsrow; // the FITS data row buffer
uInt *fits_offset; // Offsets to the fields within a FITS row
uInt fitsrowsize; // size in bytes of a FITS data row
Bool isoptimum; // tells whether optimum case exists or not
// sets field addresses in the current row
void set_fitsrow(Int);
unsigned char *table; // the table in local format
uInt tablerowsize; // size in bytes of a table row
uInt alloc_row; // number of currently allocated rows
Int beg_row; // range of rows currently in memory
Int end_row;
Int curr_row;
FitsBase **fld; // The array of fields
uInt *table_offset; // Offsets to the fields within a table row
// data addresses of fields of current row
void **data_addr;
private:
void bt_assign();
};
//<summary> (ascii) TABLE extension </summary>
class AsciiTableExtension : public BinaryTableExtension {
public:
AsciiTableExtension(FitsInput &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
AsciiTableExtension(FitsKeywordList &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
AsciiTableExtension(FITSErrorHandler errhandler = FITSError::defaultHandler);
~AsciiTableExtension();
//# special overriden functions for ascii TABLE only
// position in which column starts
Int tbcol(int n) { return tbcol_x[n]; }
// ascii string that represents the NULL value
char *tnull(int n) { return tnulla_x[n]; }
// write the required keywords for ASCIITableExtension
int write_ascTbl_hdr( FitsOutput &, long,
long, int, const char **, long *,
const char **, const char **, const char *e);
protected:
Int *tbcol_x;
char **tnulla_x;
uInt *fits_width; // widths of the fields within a FITS row
char **format; // converted formats of the fields
// read and write the next FITS data row
//<group>
int readrow();
int writerow(FitsOutput &);
//</group>
private:
void at_assign();
};
} //# NAMESPACE CASACORE - END
#ifndef CASACORE_NO_AUTO_TEMPLATES
#include <casacore/fits/FITS/hdu.tcc>
#endif //# CASACORE_NO_AUTO_TEMPLATES
# endif
casacore::AsciiTableExtension::AsciiTableExtension
AsciiTableExtension(FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::AsciiTableExtension::readrow
int readrow()
read and write the next FITS data row
casacore::AsciiTableExtension::at_assign
void at_assign()
casacore::AsciiTableExtension::tbcol
Int tbcol(int n)
position in which column starts
Definition hdu.h:1170
casacore::AsciiTableExtension::format
char ** format
Definition hdu.h:1182
casacore::AsciiTableExtension::fits_width
uInt * fits_width
Definition hdu.h:1181
casacore::AsciiTableExtension::writerow
int writerow(FitsOutput &)
casacore::AsciiTableExtension::~AsciiTableExtension
~AsciiTableExtension()
casacore::AsciiTableExtension::tnulla_x
char ** tnulla_x
Definition hdu.h:1180
casacore::AsciiTableExtension::tnull
char * tnull(int n)
ascii string that represents the NULL value
Definition hdu.h:1172
casacore::AsciiTableExtension::tbcol_x
Int * tbcol_x
Definition hdu.h:1179
casacore::AsciiTableExtension::write_ascTbl_hdr
int write_ascTbl_hdr(FitsOutput &, long, long, int, const char **, long *, const char **, const char **, const char *e)
write the required keywords for ASCIITableExtension
casacore::AsciiTableExtension::AsciiTableExtension
AsciiTableExtension(FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::AsciiTableExtension::AsciiTableExtension
AsciiTableExtension(FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::BinaryTableExtension::tdim_x
char ** tdim_x
Definition hdu.h:1116
casacore::BinaryTableExtension::tdim
const char * tdim(int n) const
Definition hdu.h:1059
casacore::BinaryTableExtension::nrows
Int nrows() const
return basic elements of a table
Definition hdu.h:1047
casacore::BinaryTableExtension::isatnull
Bool isatnull(int n) const
Definition hdu.h:1054
casacore::BinaryTableExtension::tscal
double tscal(int n) const
Definition hdu.h:1052
casacore::BinaryTableExtension::tdisp
const char * tdisp(int n) const
Definition hdu.h:1058
casacore::BinaryTableExtension::BinaryTableExtension
BinaryTableExtension(FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::BinaryTableExtension::field
FitsBase & field(int i) const
select a field
Definition hdu.h:1093
casacore::BinaryTableExtension::bind
int bind(int, FitsBase &)
binds a FitsField to a column
casacore::BinaryTableExtension::ttype
const char * ttype(int n) const
Definition hdu.h:1056
casacore::BinaryTableExtension::crval
double crval(int n) const
Definition hdu.h:1063
casacore::BinaryTableExtension::BinaryTableExtension
BinaryTableExtension(FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
sets field addresses in the current row void set_fitsrow(Int);
casacore::BinaryTableExtension::beg_row
Int beg_row
Definition hdu.h:1143
casacore::BinaryTableExtension::alloc_row
uInt alloc_row
Definition hdu.h:1142
casacore::BinaryTableExtension::end_row
Int end_row
Definition hdu.h:1144
casacore::BinaryTableExtension::bt_assign
void bt_assign()
casacore::BinaryTableExtension::writerow
virtual int writerow(FitsOutput &)
casacore::BinaryTableExtension::currrow
Int currrow() const
get current row
Definition hdu.h:1095
casacore::BinaryTableExtension::BinaryTableExtension
BinaryTableExtension(FITSErrorHandler errhandler=FITSError::defaultHandler)
constructor to match write_bintbl_hdr()
casacore::BinaryTableExtension::curr_row
Int curr_row
Definition hdu.h:1145
casacore::BinaryTableExtension::crval_x
double * crval_x
Definition hdu.h:1120
casacore::BinaryTableExtension::~BinaryTableExtension
virtual ~BinaryTableExtension()
casacore::BinaryTableExtension::theap
Int theap() const
Definition hdu.h:1065
casacore::BinaryTableExtension::tnull_x
Int * tnull_x
Definition hdu.h:1112
casacore::BinaryTableExtension::crpix_x
double * crpix_x
Definition hdu.h:1118
casacore::BinaryTableExtension::tfields
Int tfields() const
Definition hdu.h:1050
casacore::BinaryTableExtension::BinaryTableExtension
BinaryTableExtension(FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::BinaryTableExtension::ctype_x
char ** ctype_x
Definition hdu.h:1117
casacore::BinaryTableExtension::BinaryTableExtension
BinaryTableExtension(FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::BinaryTableExtension::write
int write(FitsOutput &)
write current rows
casacore::BinaryTableExtension::nAxis
Int nAxis
Definition hdu.h:1122
casacore::BinaryTableExtension::table
unsigned char * table
Definition hdu.h:1140
casacore::BinaryTableExtension::operator()
BinaryTableExtension & operator()(int)
casacore::BinaryTableExtension::read
int read()
read entire table into memory
casacore::BinaryTableExtension::isatnull_x
Bool * isatnull_x
Definition hdu.h:1111
casacore::BinaryTableExtension::tscal_x
double * tscal_x
Definition hdu.h:1109
casacore::BinaryTableExtension::tnull
Int tnull(int n) const
Definition hdu.h:1055
casacore::BinaryTableExtension::fits_offset
uInt * fits_offset
Definition hdu.h:1133
casacore::BinaryTableExtension::crota
double crota(int n) const
Definition hdu.h:1062
casacore::BinaryTableExtension::tunit_x
char ** tunit_x
Definition hdu.h:1114
casacore::BinaryTableExtension::author
const char * author() const
Definition hdu.h:1066
casacore::BinaryTableExtension::fld
FitsBase ** fld
Definition hdu.h:1146
casacore::BinaryTableExtension::cdelt_x
double * cdelt_x
Definition hdu.h:1121
casacore::BinaryTableExtension::fitsrow
unsigned char * fitsrow
Definition hdu.h:1132
casacore::BinaryTableExtension::set_next
int set_next(int)
prepare to write the next N rows
casacore::BinaryTableExtension::fitsrowsize
uInt fitsrowsize
Definition hdu.h:1134
casacore::BinaryTableExtension::write_binTbl_hdr
int write_binTbl_hdr(FitsOutput &, long, int, const char **, const char **, const char **, const char *, long)
create a binary table header without using FitsKeywordList objet.
casacore::BinaryTableExtension::data_addr
void ** data_addr
data addresses of fields of current row
Definition hdu.h:1149
casacore::BinaryTableExtension::crota_x
double * crota_x
Definition hdu.h:1119
casacore::BinaryTableExtension::ncols
Int ncols() const
Definition hdu.h:1048
casacore::BinaryTableExtension::operator--
BinaryTableExtension & operator--()
casacore::BinaryTableExtension::table_offset
uInt * table_offset
Definition hdu.h:1147
casacore::BinaryTableExtension::rowsize
uInt rowsize() const
Definition hdu.h:1049
casacore::BinaryTableExtension::theap_x
Int theap_x
Definition hdu.h:1123
casacore::BinaryTableExtension::cdelt
double cdelt(int n) const
Definition hdu.h:1064
casacore::BinaryTableExtension::ttype_x
char ** ttype_x
Definition hdu.h:1113
casacore::BinaryTableExtension::tform
const char * tform(int n) const
Definition hdu.h:1051
casacore::BinaryTableExtension::read
int read(int)
read next N rows into memory
casacore::BinaryTableExtension::referenc_x
char * referenc_x
Definition hdu.h:1125
casacore::BinaryTableExtension::crpix
double crpix(int n) const
Definition hdu.h:1061
casacore::BinaryTableExtension::set_fitsrow
void set_fitsrow(Int)
sets field addresses in the current row
casacore::BinaryTableExtension::tablerowsize
uInt tablerowsize
Definition hdu.h:1141
casacore::BinaryTableExtension::tunit
const char * tunit(int n) const
Definition hdu.h:1057
casacore::BinaryTableExtension::ctype
const char * ctype(int n) const
Definition hdu.h:1060
casacore::BinaryTableExtension::tdisp_x
char ** tdisp_x
Definition hdu.h:1115
casacore::BinaryTableExtension::tzero_x
double * tzero_x
Definition hdu.h:1110
casacore::BinaryTableExtension::tfields_x
Int tfields_x
Definition hdu.h:1107
casacore::BinaryTableExtension::isoptimum
Bool isoptimum
Definition hdu.h:1135
casacore::BinaryTableExtension::referenc
const char * referenc() const
Definition hdu.h:1067
casacore::BinaryTableExtension::operator++
BinaryTableExtension & operator++()
row selector functions
casacore::BinaryTableExtension::readrow
virtual int readrow()
read and write the next FITS data row
casacore::BinaryTableExtension::author_x
char * author_x
Definition hdu.h:1124
casacore::BinaryTableExtension::tform_x
char ** tform_x
Definition hdu.h:1108
casacore::BinaryTableExtension::BinaryTableExtension
BinaryTableExtension(FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::BinaryTableExtension::tzero
double tzero(int n) const
Definition hdu.h:1053
casacore::ConstFitsKeywordList
list of read-only FITS keywords
Definition fits.h:1070
casacore::ExtensionHeaderDataUnit::extname
char * extname()
Definition hdu.h:803
casacore::ExtensionHeaderDataUnit::xtension_x
char * xtension_x
Definition hdu.h:825
casacore::ExtensionHeaderDataUnit::extver_x
Int extver_x
Definition hdu.h:827
casacore::ExtensionHeaderDataUnit::extlevel_x
Int extlevel_x
Definition hdu.h:828
casacore::ExtensionHeaderDataUnit::ExtensionHeaderDataUnit
ExtensionHeaderDataUnit(FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::ExtensionHeaderDataUnit::gcount_x
Int gcount_x
Definition hdu.h:830
casacore::ExtensionHeaderDataUnit::ExtensionHeaderDataUnit
ExtensionHeaderDataUnit(FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
This constructor is used for writing only required keywords.
casacore::ExtensionHeaderDataUnit::write
int write(FitsOutput &fout, char *addr, int nbytes)
write next N bytes from addr to the FITS output fout
Definition hdu.h:813
casacore::ExtensionHeaderDataUnit::~ExtensionHeaderDataUnit
~ExtensionHeaderDataUnit()
casacore::ExtensionHeaderDataUnit::pcount_x
Int pcount_x
Definition hdu.h:829
casacore::ExtensionHeaderDataUnit::pcount
Int pcount()
Definition hdu.h:806
casacore::ExtensionHeaderDataUnit::xtension
char * xtension()
Definition hdu.h:802
casacore::ExtensionHeaderDataUnit::extname_x
char * extname_x
Definition hdu.h:826
casacore::ExtensionHeaderDataUnit::ExtensionHeaderDataUnit
ExtensionHeaderDataUnit(FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::ExtensionHeaderDataUnit::extlevel
Int extlevel()
Definition hdu.h:805
casacore::ExtensionHeaderDataUnit::ExtensionHeaderDataUnit
ExtensionHeaderDataUnit(FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::ExtensionHeaderDataUnit::extver
Int extver()
Definition hdu.h:804
casacore::ExtensionHeaderDataUnit::gcount
Int gcount()
Definition hdu.h:807
casacore::ExtensionHeaderDataUnit::ExtensionHeaderDataUnit
ExtensionHeaderDataUnit(FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::ExtensionHeaderDataUnit::read
int read(char *addr, int nbytes)
read next N bytes into addr
Definition hdu.h:810
casacore::ExtensionHeaderDataUnit::ex_assign
void ex_assign()
casacore::FITSError::defaultHandler
static void defaultHandler(const char *errMessage, ErrorLevel severity)
The default error handler.
casacore::FITS
static functions and enumerations
Definition fits.h:161
casacore::FITS::ReservedName
ReservedName
FITS Reserved Names.
Definition fits.h:238
casacore::FITS::ValueType
ValueType
FITS I/O Error message types.
Definition fits.h:167
casacore::FITS::FitsArrayOption
FitsArrayOption
Options on FITS array manipulations.
Definition fits.h:270
casacore::FITS::NoOpt
@ NoOpt
Definition fits.h:270
casacore::FITS::HDUType
HDUType
Types of FITS Header-Data Units.
Definition fits.h:263
casacore::FitsArray< FitsBit >::no_dims
int no_dims
Definition hdu.h:1013
casacore::FitsArray< FitsBit >::~FitsArray
~FitsArray()
casacore::FitsArray< FitsBit >::vdim
int * vdim()
casacore::FitsArray< FitsBit >::dims
int dims() const
casacore::FitsArray< FitsBit >::FitsArray
FitsArray(int, const int *)
casacore::FitsArray< FitsBit >::dimn
int * dimn
Definition hdu.h:1014
casacore::FitsArray< FitsBit >::dim
int dim(int n) const
casacore::FitsArray< FitsBit >::factor
int * factor
Definition hdu.h:1015
casacore::FitsArray
FITS array of given type.
Definition hdu.h:971
casacore::FitsArray::~FitsArray
~FitsArray()
casacore::FitsArray::FitsArray
FitsArray(int, const int *)
casacore::FitsArray::dim
int dim(int n) const
casacore::FitsArray< FitsLogical >::no_dims
int no_dims
Definition hdu.h:983
casacore::FitsArray< FitsLogical >::factor
int * factor
Definition hdu.h:985
casacore::FitsArray< FitsLogical >::dimn
int * dimn
Definition hdu.h:984
casacore::FitsArray::dims
int dims() const
casacore::FitsArray::vdim
int * vdim()
casacore::FitsBase
helper class
Definition hdu.h:838
casacore::FitsBase::make
static FitsBase * make(FitsBase &)
casacore::FitsBase::AsciiTableExtension
friend class AsciiTableExtension
Definition hdu.h:840
casacore::FitsBase::setaddr
virtual void setaddr(void **)=0
casacore::FitsBase::dims
virtual int dims() const
casacore::FitsBase::FitsBase
FitsBase(const FITS::ValueType &t, int n)
Definition hdu.h:842
casacore::FitsBase::nelements
unsigned int nelements() const
Definition hdu.h:846
casacore::FitsBase::show
virtual void show(std::ostream &)=0
casacore::FitsBase::BinaryTableExtension
friend class BinaryTableExtension
Definition hdu.h:839
casacore::FitsBase::vdim
virtual int * vdim()
casacore::FitsBase::data_type
FITS::ValueType data_type
Definition hdu.h:864
casacore::FitsBase::make
static FitsBase * make(const FITS::ValueType &, int, int *)
casacore::FitsBase::operator=
FitsBase & operator=(FitsBase &)=delete
casacore::FitsBase::~FitsBase
virtual ~FitsBase()
casacore::FitsBase::fitsfieldsize
virtual int fitsfieldsize() const =0
casacore::FitsBase::localfieldsize
virtual int localfieldsize() const =0
casacore::FitsBase::no_elements
int no_elements
Definition hdu.h:863
casacore::FitsBase::make
static FitsBase * make(const FITS::ValueType &, int=1)
casacore::FitsBase::dim
virtual int dim(int n) const
casacore::FitsBase::data
virtual void * data()=0
casacore::FitsBase::fieldtype
FITS::ValueType fieldtype() const
Definition hdu.h:853
casacore::FitsBit
helper class for FITS Binary Tables
Definition fits.h:116
casacore::FitsField< FitsBit >::show
void show(std::ostream &)
casacore::FitsField< FitsBit >::data
void * data()
casacore::FitsField< FitsBit >::mask
unsigned char mask
Definition hdu.h:950
casacore::FitsField< FitsBit >::field
FitsBit ** field
Definition hdu.h:949
casacore::FitsField< FitsBit >::fitsfieldsize
int fitsfieldsize() const
casacore::FitsField< FitsBit >::localfieldsize
int localfieldsize() const
casacore::FitsField< FitsBit >::setaddr
void setaddr(void **addr)
casacore::FitsField< FitsBit >::~FitsField
~FitsField()
casacore::FitsField< FitsBit >::FitsField
FitsField(int n=1)
casacore::FitsField< FitsBit >::byte_offset
int byte_offset
Definition hdu.h:951
casacore::FitsField
helper class Note: Note that FitsField does not allocate space for the data; Space is external to Fi...
Definition hdu.h:880
casacore::FitsField::operator=
FitsField< TYPE > & operator=(const TYPE &x)
Definition hdu.h:888
casacore::FitsField::operator()
TYPE & operator()()
Definition hdu.h:886
casacore::FitsField::FitsField
FitsField(int n=1)
Definition hdu.h:882
casacore::FitsField::fitsfieldsize
int fitsfieldsize() const
casacore::FitsField::show
void show(std::ostream &)
casacore::FitsField::localfieldsize
int localfieldsize() const
casacore::FitsField::~FitsField
~FitsField()
casacore::FitsField< FitsLogical >::field
FitsLogical ** field
Definition hdu.h:899
casacore::FitsField::setaddr
void setaddr(void **addr)
casacore::FitsField::data
void * data()
casacore::FitsInput
fixed-length sequential blocked FITS input
Definition fitsio.h:154
casacore::FitsKeywordList
linked list of FITS keywords
Definition fits.h:856
casacore::FitsKeyword
FITS keyword.
Definition fits.h:634
casacore::FitsOutput
fixed-length sequential blocked FITS output
Definition fitsio.h:226
casacore::HeaderDataUnit
Definition hdu.h:69
casacore::HeaderDataUnit::dimn
Int * dimn
Definition hdu.h:194
casacore::HeaderDataUnit::fin
FitsInput * fin
Definition hdu.h:188
casacore::HeaderDataUnit::compute_size
static Bool compute_size(FitsKeywordList &, OFF_T &, Int &, FITS::HDUType &, FITS::ValueType &, FITSErrorHandler, HDUErrs &)
Compute the total size of the data associated with an HDU.
casacore::HeaderDataUnit::read_all_data
OFF_T read_all_data(char *)
casacore::HeaderDataUnit::errfn
FITSErrorHandler errfn
Definition hdu.h:189
casacore::HeaderDataUnit::datatype
FITS::ValueType datatype() const
Definition hdu.h:77
casacore::HeaderDataUnit::HDUErrs
HDUErrs
error handling and error codes that can be returned
Definition hdu.h:84
casacore::HeaderDataUnit::BADBITPIX
@ BADBITPIX
Definition hdu.h:84
casacore::HeaderDataUnit::BADREC
@ BADREC
Definition hdu.h:86
casacore::HeaderDataUnit::MISSKEY
@ MISSKEY
Definition hdu.h:84
casacore::HeaderDataUnit::BADPCOUNT
@ BADPCOUNT
Definition hdu.h:85
casacore::HeaderDataUnit::BADGCOUNT
@ BADGCOUNT
Definition hdu.h:85
casacore::HeaderDataUnit::BADCONV
@ BADCONV
Definition hdu.h:87
casacore::HeaderDataUnit::BADOPER
@ BADOPER
Definition hdu.h:86
casacore::HeaderDataUnit::BADRULES
@ BADRULES
Definition hdu.h:86
casacore::HeaderDataUnit::NOPCOUNT
@ NOPCOUNT
Definition hdu.h:85
casacore::HeaderDataUnit::NOGCOUNT
@ NOGCOUNT
Definition hdu.h:85
casacore::HeaderDataUnit::BADIO
@ BADIO
Definition hdu.h:87
casacore::HeaderDataUnit::OK
@ OK
Definition hdu.h:84
casacore::HeaderDataUnit::BADSIZE
@ BADSIZE
Definition hdu.h:86
casacore::HeaderDataUnit::NOAXISN
@ NOAXISN
Definition hdu.h:84
casacore::HeaderDataUnit::BADTYPE
@ BADTYPE
Definition hdu.h:86
casacore::HeaderDataUnit::BADNAXIS
@ BADNAXIS
Definition hdu.h:86
casacore::HeaderDataUnit::NOGROUPS
@ NOGROUPS
Definition hdu.h:85
casacore::HeaderDataUnit::NOMEM
@ NOMEM
Definition hdu.h:84
casacore::HeaderDataUnit::notnull
Bool notnull(Int l) const
Definition hdu.h:162
casacore::HeaderDataUnit::fits_data_size
OFF_T fits_data_size
uInt fits_data_size; // size in bytes of total amount of data
Definition hdu.h:196
casacore::HeaderDataUnit::err_status
HDUErrs err_status
Definition hdu.h:190
casacore::HeaderDataUnit::kw
const FitsKeyword * kw(int n)
Definition hdu.h:127
casacore::HeaderDataUnit::operator<<
friend std::ostream & operator<<(std::ostream &, HeaderDataUnit &)
Definition hdu.h:221
casacore::HeaderDataUnit::kw
const FitsKeyword * kw(FITS::ReservedName &n, int i)
Definition hdu.h:133
casacore::HeaderDataUnit::init_data_unit
bool init_data_unit(FITS::HDUType t)
for write required keywords only to use.
casacore::HeaderDataUnit::spaces
void spaces(const char *n=0, const char *c=0)
Definition hdu.h:255
casacore::HeaderDataUnit::asgdbl
double asgdbl(FITS::ReservedName, int, double)
casacore::HeaderDataUnit::history
void history(const char *c=0)
Definition hdu.h:259
casacore::HeaderDataUnit::skip
int skip(uInt n)
skipping one or more HDU's
casacore::HeaderDataUnit::~HeaderDataUnit
virtual ~HeaderDataUnit()
casacore::HeaderDataUnit::nextkw
const FitsKeyword * nextkw(FITS::ReservedName &n)
Definition hdu.h:131
casacore::HeaderDataUnit::kw
const FitsKeyword * kw(const char *n)
Definition hdu.h:137
casacore::HeaderDataUnit::comment
void comment(const char *n=0, const char *c=0)
Definition hdu.h:257
casacore::HeaderDataUnit::mk
void mk(FITS::ReservedName k, Bool v, const char *c=0)
Definition hdu.h:223
casacore::HeaderDataUnit::posEnd
void posEnd()
casacore::HeaderDataUnit::char_null
char char_null
Definition hdu.h:210
casacore::HeaderDataUnit::kw
const FitsKeyword * kw(const FITS::ReservedName &n)
Definition hdu.h:129
casacore::HeaderDataUnit::assign
char * assign(FITS::ReservedName)
casacore::HeaderDataUnit::err
int err() const
Definition hdu.h:88
casacore::HeaderDataUnit::kwlist
ConstFitsKeywordList & kwlist()
Operations on the HDU's keyword list.
Definition hdu.h:118
casacore::HeaderDataUnit::fits_item_size
Int fits_item_size
Definition hdu.h:198
casacore::HeaderDataUnit::hdutype
FITS::HDUType hdutype() const
Definition hdu.h:80
casacore::HeaderDataUnit::asgdbl
double asgdbl(FITS::ReservedName, double)
casacore::HeaderDataUnit::no_dims
Int no_dims
Definition hdu.h:193
casacore::HeaderDataUnit::skip
int skip()
casacore::HeaderDataUnit::dims
Int dims() const
Definition hdu.h:74
casacore::HeaderDataUnit::currkw
const FitsKeyword * currkw()
Definition hdu.h:126
casacore::HeaderDataUnit::HeaderDataUnit
HeaderDataUnit(FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler, FitsInput *=0)
constructor for objects that write only required keyword to fits file.
casacore::HeaderDataUnit::pad_char
char pad_char
Definition hdu.h:201
casacore::HeaderDataUnit::local_item_size
Int local_item_size
Definition hdu.h:199
casacore::HeaderDataUnit::Int_null
Int Int_null
Definition hdu.h:211
casacore::HeaderDataUnit::nextkw
const FitsKeyword * nextkw(const char *n)
Definition hdu.h:138
casacore::HeaderDataUnit::read_data
int read_data(char *, Int)
casacore::HeaderDataUnit::dim
Int dim(int n) const
Definition hdu.h:75
casacore::HeaderDataUnit::HeaderDataUnit
HeaderDataUnit(FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
For input – ~ should delete the keyword list: kwflag = 1.
casacore::HeaderDataUnit::kwlist_str
Vector< String > kwlist_str(Bool length80=False)
return the header of the chdu as a vector of String.
casacore::HeaderDataUnit::fitsitemsize
Int fitsitemsize() const
Definition hdu.h:78
casacore::HeaderDataUnit::kwlist_
FitsKeywordList & kwlist_
Definition hdu.h:184
casacore::HeaderDataUnit::double_null
double double_null
Definition hdu.h:209
casacore::HeaderDataUnit::nextkw
const FitsKeyword * nextkw()
Definition hdu.h:124
casacore::HeaderDataUnit::write_data
int write_data(FitsOutput &, char *, Int)
casacore::HeaderDataUnit::hdu_type
FITS::HDUType hdu_type
Definition hdu.h:200
casacore::HeaderDataUnit::write_all_data
int write_all_data(FitsOutput &, char *)
casacore::HeaderDataUnit::notnull
Bool notnull(char *s) const
Definition hdu.h:161
casacore::HeaderDataUnit::nextkw
const FitsKeyword * nextkw(FITS::ReservedName &n, int i)
Definition hdu.h:135
casacore::HeaderDataUnit::get_hdr
int get_hdr(FITS::HDUType, FitsKeywordList &)
casacore::HeaderDataUnit::assign
char * assign(FITS::ReservedName, int)
casacore::HeaderDataUnit::notnull
Bool notnull(double x) const
Definition hdu.h:160
casacore::HeaderDataUnit::fitsdatasize
OFF_T fitsdatasize() const
Definition hdu.h:76
casacore::HeaderDataUnit::localitemsize
Int localitemsize() const
Definition hdu.h:79
casacore::HeaderDataUnit::HeaderDataUnit
HeaderDataUnit(FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler, FitsInput *=0)
For output – ~ should not delete keyword list: kwflag = 0 07/21/98 AKH Clarification: HeaderDataUnit ...
casacore::HeaderDataUnit::constkwlist_
ConstFitsKeywordList constkwlist_
Definition hdu.h:185
casacore::HeaderDataUnit::write_hdr
int write_hdr(FitsOutput &)
write the current header
casacore::HeaderDataUnit::prevkw
const FitsKeyword * prevkw()
Definition hdu.h:125
casacore::HeaderDataUnit::data_type
FITS::ValueType data_type
Definition hdu.h:197
casacore::HeaderDataUnit::errmsg
void errmsg(HDUErrs, const char *)
casacore::HeaderDataUnit::lastkw
void lastkw()
Definition hdu.h:123
casacore::HeaderDataUnit::firstkw
void firstkw()
Definition hdu.h:122
casacore::HeaderDataUnit::determine_type
static Bool determine_type(FitsKeywordList &, FITS::HDUType &, FITS::ValueType &, FITSErrorHandler, HDUErrs &)
Determines the HDU type and the data type Parameterss: keyword list, hdu type, data type,...
casacore::ImageExtension
IMAGE extension of given type.
Definition hdu.h:513
casacore::ImageExtension::pcount
Int pcount()
Definition hdu.h:529
casacore::ImageExtension::ImageExtension
ImageExtension(FITSErrorHandler errhandler=FITSError::defaultHandler)
constructor for header consisted required keywords only
casacore::ImageExtension< unsigned char >::extlevel_x
Int extlevel_x
Definition hdu.h:538
casacore::ImageExtension< unsigned char >::pcount_x
Int pcount_x
Definition hdu.h:539
casacore::ImageExtension::gcount
Int gcount()
Definition hdu.h:530
casacore::ImageExtension< unsigned char >::xtension_x
char * xtension_x
Definition hdu.h:535
casacore::ImageExtension::ImageExtension
ImageExtension(FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::ImageExtension::ElementType
TYPE ElementType
Definition hdu.h:515
casacore::ImageExtension::write_imgExt_hdr
int write_imgExt_hdr(FitsOutput &fout, int bitpix, int naxis, long *naxes)
write required keywords for ImageExtension
casacore::ImageExtension< unsigned char >::extname_x
char * extname_x
Definition hdu.h:536
casacore::ImageExtension< unsigned char >::gcount_x
Int gcount_x
Definition hdu.h:540
casacore::ImageExtension::ie_assign
void ie_assign()
casacore::ImageExtension::ImageExtension
ImageExtension(FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::ImageExtension::extver
Int extver()
Definition hdu.h:527
casacore::ImageExtension::xtension
char * xtension()
Definition hdu.h:525
casacore::ImageExtension::~ImageExtension
~ImageExtension()
casacore::ImageExtension::extname
char * extname()
Definition hdu.h:526
casacore::ImageExtension::extlevel
Int extlevel()
Definition hdu.h:528
casacore::ImageExtension< unsigned char >::extver_x
Int extver_x
Definition hdu.h:537
casacore::NoConvert
Definition fits.h:63
casacore::PrimaryGroup
Random Group datastructure.
Definition hdu.h:592
casacore::PrimaryGroup::write_priGrp_hdr
int write_priGrp_hdr(FitsOutput &fout, int simple, int bitpix, int naxis, long naxes[], long pcount, long gcount)
write the required keywords for PrimaryGroup
casacore::PrimaryGroup::read
int read(int)
Definition hdu.h:637
casacore::PrimaryGroup< unsigned char >::current_group
Int current_group
Definition hdu.h:647
casacore::PrimaryGroup< unsigned char >::pscal_x
double * pscal_x
Definition hdu.h:644
casacore::PrimaryGroup::pscal
double pscal(int n) const
Definition hdu.h:608
casacore::PrimaryGroup::pcount
Int pcount() const
Definition hdu.h:606
casacore::PrimaryGroup::read
int read()
read, or write the next group
casacore::PrimaryGroup::gcount
Int gcount() const
Return basic parameters of a random group.
Definition hdu.h:605
casacore::PrimaryGroup::PrimaryGroup
PrimaryGroup(FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::PrimaryGroup< unsigned char >::group_parm
unsigned char * group_parm
Definition hdu.h:646
casacore::PrimaryGroup::~PrimaryGroup
~PrimaryGroup()
casacore::PrimaryGroup::moveparm
void moveparm(TYPE *target) const
casacore::PrimaryGroup::PrimaryGroup
PrimaryGroup(FITSErrorHandler errhandler=FITSError::defaultHandler)
constructor for header consisted required keywords only
casacore::PrimaryGroup::pzero
double pzero(int n) const
Definition hdu.h:609
casacore::PrimaryGroup::parm
double parm(int)
casacore::PrimaryGroup::pg_assign
void pg_assign()
casacore::PrimaryGroup< unsigned char >::pcount_x
Int pcount_x
Definition hdu.h:641
casacore::PrimaryGroup::rawparm
TYPE & rawparm(int)
casacore::PrimaryGroup::copyparm
void copyparm(double *target) const
casacore::PrimaryGroup< unsigned char >::pzero_x
double * pzero_x
Definition hdu.h:645
casacore::PrimaryGroup::write
int write(FitsOutput &)
casacore::PrimaryGroup::set_next
OFF_T set_next(OFF_T)
disable these functions, since they are inherited from PrimaryArray
Definition hdu.h:636
casacore::PrimaryGroup< unsigned char >::gcount_x
Int gcount_x
Definition hdu.h:642
casacore::PrimaryGroup::PrimaryGroup
PrimaryGroup(FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::PrimaryGroup::copyparm
void copyparm(float *target) const
casacore::PrimaryGroup::storeparm
void storeparm(const TYPE *source)
casacore::PrimaryGroup::currgroup
Int currgroup() const
Definition hdu.h:612
casacore::PrimaryGroup::ptype
char * ptype(int n) const
Definition hdu.h:607
casacore::PrimaryGroup< unsigned char >::ptype_x
char ** ptype_x
Definition hdu.h:643
casacore::PrimaryTable
Primary Table structure.
Definition hdu.h:704
casacore::PrimaryTable::write_priTable_hdr
int write_priTable_hdr(FitsOutput &fout, int bitpix, int naxis, long *naxes)
write required keywords for PrimaryTable
casacore::PrimaryTable::read
int read()
casacore::PrimaryTable::altrpix
float altrpix() const
Definition hdu.h:733
casacore::PrimaryTable< unsigned char >::bscale_x
Float bscale_x
Definition hdu.h:741
casacore::PrimaryTable::write
int write(FitsOutput &)
Definition hdu.h:722
casacore::PrimaryTable::read
int read(int)
Definition hdu.h:721
casacore::PrimaryTable::ElementType
TYPE ElementType
Definition hdu.h:706
casacore::PrimaryTable::bscal
float bscal() const
Definition hdu.h:730
casacore::PrimaryTable< unsigned char >::equinox_x
Float equinox_x
Definition hdu.h:744
casacore::PrimaryTable< unsigned char >::dateobs_x
char * dateobs_x
Definition hdu.h:739
casacore::PrimaryTable::object
char * object() const
Definition hdu.h:724
casacore::PrimaryTable::PrimaryTable
PrimaryTable(FITSErrorHandler errhandler=FITSError::defaultHandler)
constructor for header consisted required keywords only
casacore::PrimaryTable::PrimaryTable
PrimaryTable(FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::PrimaryTable::bunit
char * bunit() const
Definition hdu.h:729
casacore::PrimaryTable::equinox
float equinox() const
Definition hdu.h:732
casacore::PrimaryTable::dateobs
char * dateobs() const
Definition hdu.h:727
casacore::PrimaryTable< unsigned char >::instrume_x
char * instrume_x
Definition hdu.h:738
casacore::PrimaryTable< unsigned char >::bzero_x
Float bzero_x
Definition hdu.h:742
casacore::PrimaryTable::instrume
char * instrume() const
Definition hdu.h:726
casacore::PrimaryTable::pt_assign
void pt_assign()
casacore::PrimaryTable::bzero
float bzero() const
Definition hdu.h:731
casacore::PrimaryTable::~PrimaryTable
~PrimaryTable()
casacore::PrimaryTable< unsigned char >::altrpix_x
Float altrpix_x
Definition hdu.h:745
casacore::PrimaryTable::datemap
char * datemap() const
Definition hdu.h:728
casacore::PrimaryTable::PrimaryTable
PrimaryTable(FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::PrimaryTable< unsigned char >::object_x
char * object_x
Definition hdu.h:736
casacore::PrimaryTable::telescop
char * telescop() const
Definition hdu.h:725
casacore::PrimaryTable< unsigned char >::bunit_x
char * bunit_x
Definition hdu.h:743
casacore::PrimaryTable< unsigned char >::telescop_x
char * telescop_x
Definition hdu.h:737
casacore::PrimaryTable< unsigned char >::datemap_x
char * datemap_x
Definition hdu.h:740
casacore::Vector
Definition Vector.h:82
casacore::PrimaryArray
PrimaryArray(FitsInput &, FITSErrorHandler=FITSError::defaultHandler)
templated primary array base class of given type
casacore::FITSErrorHandler
void(* FITSErrorHandler)(const char *errMessage, FITSError::ErrorLevel severity)
Define a typedef for the handler function signature for convenience.
Definition FITSError.h:108
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::assign
void assign(const RecordInterface &that) override
Assign that RecordInterface object to this one.
casacore::bunit_x
char * bunit_x
Definition hdu.h:466
casacore::LongFitsArray
FitsArray< FitsLong > LongFitsArray
Definition hdu.h:1023
casacore::DComplexFitsArray
FitsArray< DComplex > DComplexFitsArray
Definition hdu.h:1028
casacore::ShortPrimaryGroup
PrimaryGroup< short > ShortPrimaryGroup
Definition hdu.h:689
casacore::bscale
double bscale() const
General access routines for a primary array.
Definition hdu.h:355
casacore::crpix_x
double * crpix_x
Definition hdu.h:470
casacore::nelements
size_t nelements() const
The number of elements contained in this Block<T>.
Definition Block.h:556
casacore::store
int store(const TYPE *source, int npixels)
The overloaded operator functions `()' all return physical data, i.
casacore::False
const Bool False
Definition aipstype.h:42
casacore::ShortFitsArray
FitsArray< short > ShortFitsArray
Definition hdu.h:1022
casacore::write_priArr_hdr
int write_priArr_hdr(FitsOutput &fout, int simple, int bitpix, int naxis, long naxes[], int extend)
casacore::crota_x
double * crota_x
Definition hdu.h:471
casacore::operator<<
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
casacore::isablank
Bool isablank() const
Definition hdu.h:358
casacore::VADescFitsField
FitsField< FitsVADesc > VADescFitsField
Definition hdu.h:966
casacore::read
virtual int read()
The read()' and write()' functions control reading and writing data from the external FITS I/O medium...
casacore::end_elem
OFF_T end_elem
Definition hdu.h:489
casacore::BitFitsField
FitsField< FitsBit > BitFitsField
Definition hdu.h:956
casacore::ComplexFitsField
FitsField< Complex > ComplexFitsField
Definition hdu.h:963
casacore::ctype
char * ctype(int n) const
Definition hdu.h:360
casacore::FloatFitsArray
FitsArray< float > FloatFitsArray
Definition hdu.h:1024
casacore::blank
Int blank() const
Definition hdu.h:359
casacore::bzero_x
double bzero_x
Definition hdu.h:465
casacore::datamin
double datamin() const
Definition hdu.h:366
casacore::factor
int * factor
Definition hdu.h:478
casacore::isablank_x
Bool isablank_x
Definition hdu.h:467
casacore::offset
int offset(int, int) const
compute a linear offset from array indicies
casacore::set_next
virtual OFF_T set_next(OFF_T)
casacore::blank_x
Int blank_x
Definition hdu.h:468
casacore::array
T * array
The actual storage.
Definition Block.h:689
casacore::uInt
unsigned int uInt
Definition aipstype.h:49
casacore::BytePrimaryArray
PrimaryArray< unsigned char > BytePrimaryArray
Definition hdu.h:496
casacore::FloatPrimaryArray
PrimaryArray< float > FloatPrimaryArray
Definition hdu.h:499
casacore::LongPrimaryTable
PrimaryTable< FitsLong > LongPrimaryTable
Definition hdu.h:789
casacore::ShortFitsField
FitsField< short > ShortFitsField
Definition hdu.h:959
casacore::alloc_elems
OFF_T alloc_elems
Definition hdu.h:487
casacore::ByteImageExtension
ImageExtension< unsigned char > ByteImageExtension
Definition hdu.h:562
casacore::DoublePrimaryTable
PrimaryTable< double > DoublePrimaryTable
Definition hdu.h:791
casacore::beg_elem
OFF_T beg_elem
Definition hdu.h:488
casacore::LongPrimaryArray
PrimaryArray< FitsLong > LongPrimaryArray
Definition hdu.h:498
casacore::copy
void copy(double *target, int npixels) const
casacore::FloatFitsField
FitsField< float > FloatFitsField
Definition hdu.h:961
casacore::cdelt
double cdelt(int n) const
Definition hdu.h:364
casacore::totsize
OFF_T totsize
Definition hdu.h:476
casacore::pa_assign
void pa_assign()
casacore::datamin_x
double datamin_x
Definition hdu.h:475
casacore::FloatImageExtension
ImageExtension< float > FloatImageExtension
Definition hdu.h:565
casacore::ByteFitsField
FitsField< unsigned char > ByteFitsField
Definition hdu.h:958
casacore::Float
float Float
Definition aipstype.h:52
casacore::LongFitsField
FitsField< FitsLong > LongFitsField
Definition hdu.h:960
casacore::write
virtual int write(FitsOutput &)
casacore::DoublePrimaryGroup
PrimaryGroup< double > DoublePrimaryGroup
Definition hdu.h:692
casacore::CharFitsField
FitsField< char > CharFitsField
Definition hdu.h:957
casacore::ComplexFitsArray
FitsArray< Complex > ComplexFitsArray
Definition hdu.h:1026
casacore::ByteFitsArray
FitsArray< unsigned char > ByteFitsArray
Definition hdu.h:1021
casacore::crota
double crota(int n) const
Definition hdu.h:362
casacore::ShortImageExtension
ImageExtension< short > ShortImageExtension
Definition hdu.h:563
casacore::datamax
double datamax() const
Definition hdu.h:365
casacore::FloatPrimaryTable
PrimaryTable< float > FloatPrimaryTable
Definition hdu.h:790
casacore::bscale_x
double bscale_x
Definition hdu.h:464
casacore::VADescFitsArray
FitsArray< FitsVADesc > VADescFitsArray
Definition hdu.h:1029
casacore::CharFitsArray
FitsArray< char > CharFitsArray
Definition hdu.h:1020
casacore::crpix
double crpix(int n) const
Definition hdu.h:361
casacore::datamax_x
double datamax_x
Definition hdu.h:474
casacore::DoublePrimaryArray
PrimaryArray< double > DoublePrimaryArray
Definition hdu.h:500
casacore::crval
double crval(int n) const
Definition hdu.h:363
casacore::Int
int Int
Definition aipstype.h:48
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::bzero
double bzero() const
Definition hdu.h:356
casacore::LongImageExtension
ImageExtension< FitsLong > LongImageExtension
Definition hdu.h:564
casacore::LogicalFitsArray
FitsArray< FitsLogical > LogicalFitsArray
Definition hdu.h:1018
casacore::ShortPrimaryTable
PrimaryTable< short > ShortPrimaryTable
Definition hdu.h:788
casacore::DoubleFitsField
FitsField< double > DoubleFitsField
Definition hdu.h:962
casacore::IComplexFitsArray
FitsArray< IComplex > IComplexFitsArray
Definition hdu.h:1027
casacore::move
void move(TYPE *target, int npixels) const
casacore::~PrimaryArray
virtual ~PrimaryArray()
destructor
casacore::crval_x
double * crval_x
Definition hdu.h:472
casacore::BytePrimaryGroup
PrimaryGroup< unsigned char > BytePrimaryGroup
Definition hdu.h:688
casacore::DComplexFitsField
FitsField< DComplex > DComplexFitsField
Definition hdu.h:965
casacore::True
const Bool True
Definition aipstype.h:41
casacore::LongPrimaryGroup
PrimaryGroup< FitsLong > LongPrimaryGroup
Definition hdu.h:690
casacore::LogicalFitsField
FitsField< FitsLogical > LogicalFitsField
Definition hdu.h:955
casacore::bunit
char * bunit() const
Definition hdu.h:357
casacore::ShortPrimaryArray
PrimaryArray< short > ShortPrimaryArray
Definition hdu.h:497
casacore::IComplexFitsField
FitsField< IComplex > IComplexFitsField
Definition hdu.h:964
casacore::ctype_x
char ** ctype_x
Definition hdu.h:469
casacore::cdelt_x
double * cdelt_x
Definition hdu.h:473
casacore::comment
const String & comment() const
Get the comment of this field.
casacore::extend
void extend(MultiFileInfo &info, Int64 lastblk) override
Extend the virtual file to fit lastblk.
casacore::BytePrimaryTable
PrimaryTable< unsigned char > BytePrimaryTable
Definition hdu.h:787
casacore::DoubleFitsArray
FitsArray< double > DoubleFitsArray
Definition hdu.h:1025
casacore::FloatPrimaryGroup
PrimaryGroup< float > FloatPrimaryGroup
Definition hdu.h:691
casacore::BitFitsArray
FitsArray< FitsBit > BitFitsArray
Definition hdu.h:1019
casacore::DoubleImageExtension
ImageExtension< double > DoubleImageExtension
Definition hdu.h:566