Loading...
Searching...
No Matches
fits.h
Go to the documentation of this file.
//# fits.h:
//# Copyright (C) 1993,1994,1995,1996,1997,1999,2000,2001,2003,2004
//# 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
# if !defined(AIPS_FITS)
# define AIPS_FITS
//# Note that aips.h has to come first for the correct definition of off_t.
# include <casacore/casa/aips.h>
# include <stdlib.h>
# include <ctype.h>
# include <casacore/casa/iostream.h>
# include <casacore/casa/BasicSL/Complex.h>
# include <casacore/casa/BasicSL/IComplex.h>
# include <casacore/fits/FITS/FITSError.h>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
//# All FITS code seems to assume longs are 4 bytes. Currently
//# this corresponds to an "int" on all useful platforms.
typedef Int FitsLong;
//# recovered by GYL
//# Forward declarations
class ReservedFitsKeywordCollection;
class FitsNameResult;
class FitsValueResult;
class FitsKeyword;
class FitsParse;
//<summary> FITS templated helper class </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// NoConvert is a template class that is not intended for
// general use, it is used internally.
//</synopsis>
template <class TYPE>
class NoConvert {
public:
NoConvert() { }
void operator = (int) {; }
};
//<summary> FITS helper class </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// FitsLogical is a helper class that is not intended for
// general use.
//</synopsis>
//<example>
// Here is an example of the FitsLogical class.
//<srcblock>
// FitsLogical x;
// FitsLogical y(True);
// FitsLogical z = x;
// ...
// x = y; y = False; x.undefine();
// Bool b;
// if (x.isdefined())
// b = x;
// b = y; If y is undefined, b will be false.
//</srcblock>
//</example>
class FitsLogical {
friend ostream & operator << (ostream &o, const FitsLogical &);
public:
FitsLogical() : v('\0') { }
FitsLogical(Bool x) : v(x == True ? 'T' : 'F') { }
FitsLogical & operator = (Bool x) {
v = (x == True ? 'T' : 'F'); return *this; }
void undefine() { v = '\0'; }
operator Bool() const { return v == 'T'; }
protected:
char v;
};
//<summary> helper class for FITS Binary Tables </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// This class is not intended for general use. It only has meaning
// in the context of FITS Binary tables. There its use is incorporated
// into the concept of a FitsField, where FitsBit is given a specialized
// interpretation.
//</synopsis>
class FitsBit {
public:
FitsBit() : bit_array(0) { }
FitsBit(unsigned char x) : bit_array(x) { }
FitsBit & operator = (unsigned char x) { bit_array = x; return *this; }
operator unsigned char() const { return bit_array; }
protected:
unsigned char bit_array;
};
//<summary> Variable Length Array Descriptor </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
class FitsVADesc {
friend ostream & operator << (ostream &o, const FitsVADesc &);
public:
FitsVADesc() : no_elements(0), rel_offset(0) { }
FitsVADesc(const FitsVADesc &x) :
no_elements(x.no_elements), rel_offset(x.rel_offset) { }
FitsVADesc & operator = (const FitsVADesc &x) {
no_elements= x.no_elements;
rel_offset = x.rel_offset; return *this; }
FitsVADesc(int n, int o) : no_elements(n), rel_offset(o) { }
void set(int n, int o) { no_elements = n; rel_offset = o; }
int num() const { return no_elements; }
int offset() const { return rel_offset; }
protected:
int no_elements;
int rel_offset;
};
//<summary> static functions and enumerations </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// Many of the static functions are utility functions used internally in the
// implementation of the member functions of the FITS classes. They are placed
// in a single class to encapsulate them and to avoid adding many names to the
// global name space. More important, from the user's perspective, are the
// enumerations. They form the basic vocabulary of a FITS application. For example,
// instead of referring to the FITS <src>NAXIS</src> keyword,
// <src>FITS::NAXIS</src> should be used
//</synopsis>
class FITS {
public:
// FITS I/O Error message types
// Basic FITS Data Types for keywords and data
enum ValueType {
NOVALUE = 0, LOGICAL = 1, BIT = 2, CHAR = 3, BYTE = 4,
SHORT = 5, LONG = 6, FLOAT = 7, DOUBLE = 8, COMPLEX = 9,
ICOMPLEX = 10, DCOMPLEX = 11, VADESC = 12,
STRING, FSTRING, REAL
}; // REAL means either FLOAT or DOUBLE
// STRING and FSTRING are used internally in parsing keywords
static FITS::ValueType getfitstype(NoConvert<FitsLogical> x) {
x=0; return FITS::LOGICAL; }
static FITS::ValueType getfitstype(NoConvert<FitsBit> x) {
x=0; return FITS::BIT; }
static FITS::ValueType getfitstype(NoConvert<char> x) {
x=0; return FITS::CHAR; }
static FITS::ValueType getfitstype(NoConvert<unsigned char> x) {
x=0; return FITS::BYTE; }
static FITS::ValueType getfitstype(NoConvert<short> x) {
x=0; return FITS::SHORT; }
static FITS::ValueType getfitstype(NoConvert<Int> x) {
x=0; return FITS::LONG; }
static FITS::ValueType getfitstype(NoConvert<long> x) {
x=0; return FITS::LONG; }
static FITS::ValueType getfitstype(NoConvert<float> x) {
x=0; return FITS::FLOAT; }
static FITS::ValueType getfitstype(NoConvert<double> x) {
x=0; return FITS::DOUBLE; }
static FITS::ValueType getfitstype(NoConvert<Complex> x) {
x=0; return FITS::COMPLEX; }
static FITS::ValueType getfitstype(NoConvert<IComplex> x) {
x=0; return FITS::ICOMPLEX; }
static FITS::ValueType getfitstype(NoConvert<DComplex> x) {
x=0; return FITS::DCOMPLEX; }
static FITS::ValueType getfitstype(NoConvert<FitsVADesc> x) {
x=0; return FITS::VADESC; }
static int fitssize(FITS::ValueType t);
static int localsize(FITS::ValueType t);
// data conversion routines: FITS - local
static void f2l(FitsLogical *,void *,int);
static void l2f(void *,FitsLogical *,int);
static void f2l(FitsBit *,void *,int);
static void l2f(void *,FitsBit *,int);
static void f2l(char *,void *,int);
static void l2f(void *,char *,int);
static void f2l(unsigned char *,void *,int);
static void l2f(void *,unsigned char *,int);
static void f2l(short *,void *,int);
static void l2f(void *,short *,int);
static void f2l(Int *,void *,int);
static void l2f(void *,Int *,int);
static void f2l(long *,void *,int);
static void l2f(void *,long *,int);
static void f2l(float *,void *,int);
static void l2f(void *,float *,int);
static void f2l(double *,void *,int);
static void l2f(void *,double *,int);
static void f2l(Complex *,void *,int);
static void l2f(void *,Complex *,int);
static void f2l(IComplex *,void *,int);
static void l2f(void *,IComplex *,int);
static void f2l(DComplex *,void *,int);
static void l2f(void *,DComplex *,int);
static void f2l(FitsVADesc *,void *,int);
static void l2f(void *,FitsVADesc *,int);
static void swap2(void *, void *, int);
static void swap4(void *, void *, int);
static void swap8(void *, void *, int);
// FITS Reserved Names. PZERO is named strangely because it can conflict with
// a standard #define in sys/param.h.
enum ReservedName {
USER_DEF, AUTHOR, BITPIX, BLANK, BLOCKED, BSCALE,
BUNIT, BZERO, CDELT, COMMENT, CROTA, CRPIX,
CRVAL, CTYPE, DATAMAX, DATAMIN, DATE, DATE_OBS,
END, EPOCH, EQUINOX, EXTEND, EXTLEVEL, EXTNAME,
EXTVER, GCOUNT, GROUPS, HISTORY, INSTRUME, NAXIS,
OBJECT, OBSERVER, ORIGIN, PCOUNT, PSCAL, PTYPE,
PZERO_FITS, REFERENC, SIMPLE, SPACES, TBCOL, TDIM,
TDISP, TELESCOP, TFIELDS, TFORM, THEAP, TNULL,
TSCAL, TTYPE, TUNIT, TZERO, XTENSION, ERRWORD,
ALTRPIX, DATE_MAP
};
// Types of FITS Records
enum FitsRecType {
InitialState, BadBeginningRecord, HDURecord,
UnrecognizableRecord, SpecialRecord, EndOfFile
};
// Supported FITS Physical Devices
enum FitsDevice {
Disk, Std, Tape9
};
// Types of FITS Header-Data Units
enum HDUType {
NotAHDU, PrimaryArrayHDU, PrimaryGroupHDU, AsciiTableHDU,
BinaryTableHDU, ImageExtensionHDU, UnknownExtensionHDU,
PrimaryTableHDU
};
// Options on FITS array manipulations
enum FitsArrayOption { NoOpt = 0, CtoF = 1, FtoC = 2};
static ReservedFitsKeywordCollection &ResWord;
static void valstr(ostream &o, const ValueType &ty, const void *val);
static Bool isa_digit(char c);
static int digit2bin(char c);
static Bool isa_text(char c);
static Bool isa_letter(char);
static int letter2bin(char);
static void fstr2str(char *, const char *, int);
static int str2fstr(char *, const char *, int);
static void get_name(const char *s, int len, FitsNameResult &result);
static int get_value_id(const char *s, int l, int &pos);
static void get_value(const char *s, int len, FitsValueResult &result);
static int trim_comment(const char *s, int len);
static int chk_comment(const char *s, int len);
static int get_comment(const char *s, int len, int &begpos);
static void get_numeric(const char *s, int len, FitsValueResult &result);
// utility function to parse the binary table variable array
// column (i.e. uses the heap) of the form nPt(dddd) where n
// is either 0 or 1, t is one of the standard FITS binary table
// column types and dddd is the maximum number of elements used
// by this column. If there is a format error in the input
// string (*s), then valType will have the value NOVALUE and
// maxelem will be -1.
static void parse_vatform(const char *s, FITS::ValueType &valType,
int &maxelem);
static const Int minInt;
static const Int maxInt;
static const float minfloat;
static const float maxfloat;
static const double mindouble;
static const double maxdouble;
private:
FITS();
static double tenpowerD[309];
static float tenpowerF[39];
static const int minfltexp;
static const int maxfltexp;
static const int mindblexp;
static const int maxdblexp;
static const int maxsigdigits;
static const int maxdigl; // max digits in a long
static const int maxexpdig; // max digits in an exponent
static double tenD(Int, int);
static float tenF(Int, int);
static int ckaccum(double &, Int, int);
static int ckaccum(float &, Int, int);
};
inline FITS::FITS() { } // just a dummy function to prevent instantiation
inline Bool FITS::isa_digit(char c) { return isdigit(c) ? True : False; }
inline int FITS::digit2bin(char c) { return c - '0'; }
inline Bool FITS::isa_text(char c) { return isprint(c) ? True : False; }
inline Bool FITS::isa_letter(char c) { return isupper(c) ? True : False; }
inline int FITS::letter2bin(char c) { return c - 'A'; }
ostream & operator << (ostream &, const FITS::ValueType &);
inline double FITS::tenD(Int numb, int pow) {
return (pow > 0) ? (((double)numb) * tenpowerD[pow]) :
((pow < 0) ? (((double)numb) / tenpowerD[-pow]) : ((double)numb));
}
inline float FITS::tenF(Int numb, int pow) {
return (pow > 0) ? (((float)numb) * tenpowerF[pow]) :
((pow < 0) ? (((float)numb) / tenpowerF[-pow]) : ((float)numb));
}
//<summary> reserved FITS keyword </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
class ReservedFitsKeyword {
public:
const char *aname() const;
FITS::ReservedName name() const;
int namesize() const;
FITS::ValueType type() const;
Bool isindexed() const;
Bool isessential() const;
# if defined(TURBOCPP)
// It is best for the following to be private, but
// C-Front won't allow an initializer list if they are private.
// This issue isn't that crucial since functions in
// ReservedFitsKeywordCollection always return const items.
private:
# endif
FITS::ReservedName name_;
const char *aname_;
int namesize_;
FITS::ValueType type_;
Bool isindexed_; // 0 = NOT INDEXED, 1 = INDEXED
Bool isessential_; // 0 = NO, 1 = YES
};
inline const char *ReservedFitsKeyword::aname() const { return aname_; }
inline int ReservedFitsKeyword::namesize() const { return namesize_; }
inline FITS::ValueType ReservedFitsKeyword::type() const { return type_; }
inline Bool ReservedFitsKeyword::isindexed() const { return isindexed_; }
inline Bool ReservedFitsKeyword::isessential() const {
return isessential_; }
//<summary> collection of reserved FITS keywords </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
class ReservedFitsKeywordCollection {
public:
const ReservedFitsKeyword & operator [] (int i) const;
int no() const;
const ReservedFitsKeyword &get(FITS::ReservedName, Bool, FITS::ValueType,
const void *, int, const char *&) const;
const ReservedFitsKeyword &get(const char *, int, Bool, FITS::ValueType,
const void *, int, const char *&) const;
const char *aname(FITS::ReservedName) const;
int essential_name(const char *, int) const;
const ReservedFitsKeyword &get_essential(int, Bool, FITS::ValueType,
const void *, int, const char *&) const;
int isreserved(const char *, int) const;
Bool isunique(int) const;
Bool requires_value(int) const;
const ReservedFitsKeyword &userdef_item() const;
const ReservedFitsKeyword &err_item() const;
const ReservedFitsKeyword &end_item() const;
const ReservedFitsKeyword &spaces() const;
const ReservedFitsKeyword &comment() const;
const ReservedFitsKeyword &history() const;
int rules(const ReservedFitsKeyword &, const char *, int, Bool,
FITS::ValueType, const void *, int, const char *&) const;
private:
static const int no_items; // number of entries in the table
static const ReservedFitsKeyword &user_def_item; // user-defined keyword
static const ReservedFitsKeyword &error_item; // error in keyword
static const ReservedFitsKeyword &end__item;
static const ReservedFitsKeyword &spaces_item;
static const ReservedFitsKeyword &comment_item;
static const ReservedFitsKeyword &history_item;
static const ReservedFitsKeyword resword[]; // table of reserved words
static const int resalpha[26]; // alphabetic index to table
const ReservedFitsKeyword &match(int, const char *, int, Bool,
FITS::ValueType, const void *, int, const char *&) const;
};
inline const ReservedFitsKeyword & ReservedFitsKeywordCollection::
operator [] (int i) const { return resword[i]; }
inline int ReservedFitsKeywordCollection::no() const { return no_items; }
inline Bool ReservedFitsKeywordCollection::isunique(int i) const {
return (Bool)(resword[i + 1].name() != resword[i].name()); }
inline const ReservedFitsKeyword &ReservedFitsKeywordCollection::userdef_item()
const { return user_def_item; }
inline const ReservedFitsKeyword &ReservedFitsKeywordCollection::err_item()
const { return error_item; }
inline const ReservedFitsKeyword &ReservedFitsKeywordCollection::end_item()
const { return end__item; }
inline const ReservedFitsKeyword &ReservedFitsKeywordCollection::spaces()
const { return spaces_item; }
inline const ReservedFitsKeyword &ReservedFitsKeywordCollection::comment()
const { return comment_item; }
inline const ReservedFitsKeyword &ReservedFitsKeywordCollection::history()
const { return history_item; }
//<summary> analyse the name of a header card </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// Analyse the name of a header card
//</synopsis>
class FitsNameResult {
public:
Bool isaname; // 1 if there is a name present, otherwise 0
int begpos; // beginning position of name
int endpos; // ending position of name
Bool isaindex; // whether an index is present or not
int index; // index if present
int len; // length of name without index
enum ErrMsg { OK = 0, NO_0_NDX };
ErrMsg err;
};
//<summary> analyse the value of a header card </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// Analyse the value of a header card
//</synopsis>
class FitsValueResult {
public:
FITS::ValueType type;
union {
Bool b;
int s[2]; // for strings, s[0] is offset, s[1] length
Int l;
float f;
double d;
};
Complex c;
IComplex lc;
DComplex dc;
int begpos; // beginning position of value
int endpos; // ending position of value
Bool isa_point; // 1 if a point, otherwise 0
int pointpos; // position of point, if any
int no_sig; // number of significant digits
const char *errmsg; // error message, if any
};
//<summary> parse a header card </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// parse a header card
//</synopsis>
class FitsParse {
friend class FitsKeywordList;
public:
FitsKeyword &parse(const char *, int); // Parsing one string
int no_errs() const;
const char *err(int) const;
private:
FitsParse(int = 10);
~FitsParse();
int no_errs_;
const int max_errs;
const char **err_;
int seterr(const char *);
FitsKeyword &mkerr(const char *s, int len);
};
inline FitsParse::~FitsParse() { delete [] err_; }
inline int FitsParse::no_errs() const { return no_errs_; }
inline const char *FitsParse::err(int i) const { return err_[i]; }
inline int FitsParse::seterr(const char *s) {
return no_errs_ < max_errs ? ( err_[no_errs_++] = s, 0) : -1; }
//<summary> FITS keyword </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// A FITS keyword contains a name, a value and a comment.
//</synopsis>
class FitsKeyword {
friend class FitsKeywordList;
friend class FitsParse;
// A word about friends: FitsKeywordList accesses the next and prev
// pointers and the FitsKeyword constructors.
// FitsParse only accesses the FitsKeyword constructors.
public:
FitsKeyword(const FitsKeyword &);
FitsKeyword & operator = (const FitsKeyword &);
~FitsKeyword();
//<group>
// get info about the name
const char *name() const;
int namelen() const;
Bool isreserved() const;
Bool isindexed() const;
const ReservedFitsKeyword &kw() const;
int index() const;
//</group>
//<group>
// access the keyword comment
const char *comm() const;
int commlen() const;
//</group>
// access the error status
int err() const;
// the datatype of the keyword
FITS::ValueType type() const;
// access the value of the keyword
//<group>
Bool asBool() const;
const char *asString() const;
int valStrlen() const;
Int asInt() const;
float asFloat() const;
double asDouble() const;
IComplex asIComplex() const;
Complex asComplex() const;
DComplex asDComplex() const;
const void *value() const;
//</group>
// change the value of the keyword
//<group>
FitsKeyword & operator = (Bool);
FitsKeyword & operator = (const char *);
FitsKeyword & operator = (Int);
FitsKeyword & operator = (float);
FitsKeyword & operator = (double);
FitsKeyword & operator = (IComplex);
FitsKeyword & operator = (Complex);
FitsKeyword & operator = (DComplex);
//</group>
// change the comment of the keyword
void comm(const char *);
// change the name of the keyword
void name(const char *);
private:
FitsKeyword *next_;
FitsKeyword *prev_;
//<group>
// the keyword name
// if name_ is 0, keyword is not a user defined name
// if ndx is 0, there is no index
char *name_;
const ReservedFitsKeyword *kw_;
int ndx;
short namelen_;
//</group>
//<group>
// the keyword comment
// if comm_ is 0, there is no comment
char *comm_;
short commlen_;
//</group>
//<group>
// the keyword value
FITS::ValueType type_;
union {
Bool bval;
Int ival;
float fval;
double dval;
};
void *val; // pointer to allocated value, if any
short vallen; // only used for string data
void del_val(); // does an appropriate delete based on type
//</group>
void init(const FitsKeyword &);
void setval(const FITS::ValueType &, const void *, int);
void setcomm(const char *, int);
static void err(const char *, const FITS::ValueType &, const void *,
const char *);
static void memchk(void *);
//<group>
// private constructors for use by friends
// constructs user-defined keywords
// parms: name, namelen, type, val, vallen, comm, commlen
FitsKeyword(const char *, int ,
FITS::ValueType, const void *, int, const char *, int);
// constructs reserved keywords
// parms: resword, index, val, vallen, comm, commlen
FitsKeyword(const ReservedFitsKeyword *, int,
FITS::ValueType, const void *, int, const char *, int);
//</group>
};
ostream & operator << (ostream &, const FitsKeyword &);
inline FitsKeyword::FitsKeyword(const FitsKeyword &k) : next_(0), prev_(0),
name_(0), kw_(0), comm_(0), val(0) { init(k); }
inline FitsKeyword & FitsKeyword::operator = (const FitsKeyword &k) {
delete [] name_; delete [] comm_; del_val(); init(k); return *this; }
inline FitsKeyword::~FitsKeyword() {
delete [] name_;
delete [] comm_;
del_val();
}
inline const ReservedFitsKeyword &FitsKeyword::kw() const { return *kw_; }
inline Bool FitsKeyword::isreserved() const { return
(kw().name() != FITS::ERRWORD && kw().name() != FITS::USER_DEF)
? True : False; }
inline const char *FitsKeyword::name() const {
return isreserved() ? kw().aname() : (namelen_ ? name_ : ""); }
inline int FitsKeyword::namelen() const { return namelen_; }
inline Bool FitsKeyword::isindexed() const {return ndx > 0 ? True : False;}
inline int FitsKeyword::index() const { return ndx; }
inline const char *FitsKeyword::comm() const {
return comm_ ? comm_ : ""; }
inline int FitsKeyword::commlen() const { return commlen_; }
inline int FitsKeyword::err() const { return (kw().name() == FITS::ERRWORD); }
inline FITS::ValueType FitsKeyword::type() const { return type_; }
inline Bool FitsKeyword::asBool() const { return bval; }
inline const char *FitsKeyword::asString() const {
return vallen ? (const char *)val : ""; }
inline int FitsKeyword::valStrlen() const { return vallen; }
inline Int FitsKeyword::asInt() const {
if( type() != FITS::LONG ) {
cerr << "Unexpected keyword type in FitsKeyword::asInt()\n";
exit(1);
}
return ival;
}
inline float FitsKeyword::asFloat() const {
switch( type() ) {
case FITS::BYTE:
case FITS::SHORT:
case FITS::LONG: return (float)ival;
case FITS::FLOAT: return fval;
case FITS::DOUBLE: return (float)dval;
default:
cerr << "Unexpected keyword type in asFloat()\n";
exit(1);
}
return 0.0;
}
inline double FitsKeyword::asDouble() const {
switch( type() ) {
case FITS::BYTE:
case FITS::SHORT:
case FITS::LONG: return (double)ival;
case FITS::FLOAT: return (double)fval;
case FITS::DOUBLE: return dval;
default:
cerr << "Unexpected keyword type in asDouble()\n";
exit(1);
}
return 0.0;
}
inline IComplex FitsKeyword::asIComplex() const {
return *((IComplex *)val); }
inline Complex FitsKeyword::asComplex() const {
return *((Complex *)val); }
inline DComplex FitsKeyword::asDComplex() const {
return *((DComplex *)val); }
inline FitsKeyword & FitsKeyword::operator = (Bool x) {
bval = x; type_ = FITS::LOGICAL; return *this; }
inline FitsKeyword & FitsKeyword::operator = (Int x) {
ival = x; type_ = FITS::LONG; return *this; }
inline FitsKeyword & FitsKeyword::operator = (float x) {
fval = x; type_ = FITS::FLOAT; return *this; }
inline FitsKeyword & FitsKeyword::operator = (double x) {
dval = x; type_ = FITS::DOUBLE; return *this; }
inline FitsKeyword & FitsKeyword::operator = (IComplex x) {
*((IComplex *)val) = x; type_ = FITS::ICOMPLEX; return *this; }
inline FitsKeyword & FitsKeyword::operator = (Complex x) {
*((Complex *)val) = x; type_ = FITS::COMPLEX; return *this; }
inline FitsKeyword & FitsKeyword::operator = (DComplex x) {
*((DComplex *)val) = x; type_ = FITS::DCOMPLEX; return *this; }
class ConstFitsKeywordList; // forward declaration
//<summary> linked list of FITS keywords </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// A linked list of FITS keywords.
//</synopsis>
class FitsKeywordList {
public:
FitsKeywordList();
~FitsKeywordList();
FitsKeywordList(const FitsKeywordList &);
FitsKeywordList(ConstFitsKeywordList &);
FitsKeywordList & operator = (const FitsKeywordList &);
// Convert the list to a string containing the 80-byte FITS headers.
std::string toString() const;
// delete the current keyword (the thing returned by curr()) from the list
void del();
// Add (make) a reserved keyword with the given value and optional comment
// The comment will be truncated if necessary to fit the available space.
// String values must be less than 69 characters. String values longer than
// that will result in an ERROR keyword instead of the desired keyword.
// <group>
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, long v, const char *c = 0);
void mk(FITS::ReservedName k, double v, const char *c = 0);
// </group>
// Add (make) an indexed reserved keyword with the given value and optional comment
// The comment will be truncated if necessary to fit the available space.
// String values must be less than 69 characters. String values longer than
// that will result in an ERROR keyword instead of the desired keyword.
// <group>
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, long v, const char *c = 0);
void mk(int n, FITS::ReservedName k, double v, const char *c = 0);
// </group>
// Add (make) a user defined keyword with the given name, value and optional comment.
// The comment will be truncated if necessary to fit the available space.
// The name must be no longer than 8 characters. Names longer than that will
// result in an ERROR keyword instead of the desired keyword.
// String values must no longer than 69 characters. String values longer than
// that will result in an ERROR keyword instead of the desired keyword.
// <group>
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, long 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);
// </group>
// add a spaces line
void spaces(const char *n = 0, const char *c = 0);
// add a comment card
void comment(const char *n = 0, const char *c = 0);
// add a history card
void history(const char *c = 0);
// add the end card. This must be at the end of the list.
void end();
// Retrieve specific keywords -- these also set the current mark
//<group>
// return the i-th keyword -- keyword numbering starts with 0
FitsKeyword * operator () (int);
// return first and next non-indexed reserved keyword
FitsKeyword * operator () (const FITS::ReservedName &);
FitsKeyword * next(const FITS::ReservedName &);
// return first and next indexed reserved keyword
FitsKeyword * operator () (const FITS::ReservedName &, int);
FitsKeyword * next(const FITS::ReservedName &, int);
// return first and next user-defined keyword
FitsKeyword * operator () (const char *);
FitsKeyword * next(const char *);
//</group>
//<group>
Bool isempty() const;
void first();
void last();
FitsKeyword *next();
FitsKeyword *prev();
FitsKeyword *curr();
//</group>
//<group>
void delete_all();
int rules(FitsKeyword &,
FITSErrorHandler errhandler = FITSError::defaultHandler);
int rules(FITSErrorHandler errhandler = FITSError::defaultHandler);
Bool basic_rules();
//</group>
//<group>
// For parsing a single string
void parse(const char *, int);
int no_parse_errs() const;
const char *parse_err(int) const;
//</group>
void insert(FitsKeyword &);
private:
FitsKeyword *beg_;
FitsKeyword *end_;
FitsKeyword *pos;
int total;
int cursor;
FitsKeyword &make(const char *nm,
FITS::ValueType t, const void *v, const char *c);
FitsKeyword &make(FITS::ReservedName nm,
FITS::ValueType t, const void *v, const char *c);
FitsKeyword &make(int ind, FITS::ReservedName nm,
FITS::ValueType t, const void *v, const char *c);
// construct an error keyword - this happens when a name is invalid (NULL
// or more than 8 characters) or a string value is too long (more than
// 69 characters). It is the responsibility of the caller to the
// several mk functions to ensure that that doesn't happen. By the time
// it gets here, it is assumed that such problems are true errors.
// This is used by the private make functions.
FitsKeyword &makeErrKeyword(const char *name, FITS::ValueType type,
const void *val, const char *errmsg);
FitsParse card;
};
ostream & operator << (ostream &o, FitsKeywordList &); // print the entire list
inline FitsKeywordList::FitsKeywordList() : beg_(0), end_(0), pos(0),
total(0), cursor(0) { }
inline FitsKeywordList::~FitsKeywordList() { delete_all(); }
inline Bool FitsKeywordList::isempty() const { return total == 0 ? True : False; }
inline void FitsKeywordList::first() { cursor = 0; pos = beg_; }
inline void FitsKeywordList::last() { cursor = total; pos = end_; }
inline FitsKeyword *FitsKeywordList::curr() { return pos; }
inline FitsKeyword *FitsKeywordList::operator () (const FITS::ReservedName &n) {
first(); return next(n); }
inline FitsKeyword *FitsKeywordList::operator () (const FITS::ReservedName &n,
int ndx) { first(); return next(n,ndx); }
inline FitsKeyword *FitsKeywordList::operator () (const char *w) {
first(); return next(w); }
inline void FitsKeywordList::parse(const char *s, int l) {
insert(card.parse(s,l)); }
inline int FitsKeywordList::no_parse_errs() const { return card.no_errs();}
inline const char *FitsKeywordList::parse_err(int n) const {
return card.err(n); }
// FitsKeyword constructors for non-indexed Reserved keywords
inline void FitsKeywordList::mk(FITS::ReservedName k, Bool v, const char *c) {
insert(make(k,FITS::LOGICAL,&v,c)); }
inline void FitsKeywordList::mk(FITS::ReservedName k, const char *v,
const char *c) { insert(make(k,FITS::STRING,v,c)); }
inline void FitsKeywordList::mk(FITS::ReservedName k, Int v, const char *c) {
insert(make(k,FITS::LONG,&v,c)); }
inline void FitsKeywordList::mk(FITS::ReservedName k, long v, const char *c) {
insert(make(k,FITS::LONG,&v,c)); }
inline void FitsKeywordList::mk(FITS::ReservedName k, double v, const char *c) {
insert(make(k,FITS::DOUBLE,&v,c)); }
// FitsKeyword constructors for indexed Reserved keywords
inline void FitsKeywordList::mk(int n, FITS::ReservedName k, Bool v,
const char *c) {
Bool tmp; tmp = v; insert(make(n,k,FITS::LOGICAL,&tmp,c)); }
inline void FitsKeywordList::mk(int n, FITS::ReservedName k, const char *v,
const char *c) { insert(make(n,k,FITS::STRING,v,c)); }
inline void FitsKeywordList::mk(int n, FITS::ReservedName k, Int v,
const char *c) { insert(make(n,k,FITS::LONG,&v,c)); }
inline void FitsKeywordList::mk(int n, FITS::ReservedName k, long v,
const char *c) { insert(make(n,k,FITS::LONG,&v,c)); }
inline void FitsKeywordList::mk(int n, FITS::ReservedName k, double v,
const char *c) { insert(make(n,k,FITS::DOUBLE,&v,c)); }
// FitsKeyword constructors for User-Defined keywords
inline void FitsKeywordList::mk(const char *n, Bool v, const char *c) {
Bool tmp; tmp = v; insert(make(n,FITS::LOGICAL,&tmp,c)); }
inline void FitsKeywordList::mk(const char *n, const char *v, const char *c) {
insert(make(n,FITS::STRING,v,c)); }
inline void FitsKeywordList::mk(const char *n, Int v, const char *c) {
insert(make(n,FITS::LONG,&v,c)); }
inline void FitsKeywordList::mk(const char *n, long v, const char *c) {
insert(make(n,FITS::LONG,&v,c)); }
inline void FitsKeywordList::mk(const char *n, float v, const char *c) {
insert(make(n,FITS::FLOAT,&v,c)); }
inline void FitsKeywordList::mk(const char *n, double v, const char *c) {
insert(make(n,FITS::DOUBLE,&v,c)); }
inline void FitsKeywordList::mk(const char *n, Int r, Int i, const char *c) {
IComplex v(r,i);
insert(make(n,FITS::ICOMPLEX,&v,c)); }
inline void FitsKeywordList::mk(const char *n, float r, float i, const char *c)
{ Complex v(r,i); insert(make(n,FITS::COMPLEX,&v,c)); }
inline void FitsKeywordList::mk(const char *n, double r, double i,
const char *c) { DComplex v(r,i);
insert(make(n,FITS::DCOMPLEX,&v,c)); }
// Additional keyword constructors for commentary, etc.
inline void FitsKeywordList::spaces(const char *n, const char *c) {
insert((n == 0 ? make(FITS::SPACES,FITS::NOVALUE,0,c) :
(c == 0 ? make(FITS::SPACES,FITS::NOVALUE,0,n) :
make(n,FITS::NOVALUE,0,c)))); }
inline void FitsKeywordList::comment(const char *n, const char *c) {
insert((n == 0 ? make(FITS::COMMENT,FITS::NOVALUE,0,c) :
(c == 0 ? make(FITS::COMMENT,FITS::NOVALUE,0,n) :
make(n,FITS::NOVALUE,0,c)))); }
inline void FitsKeywordList::history(const char *c) {
insert(make(FITS::HISTORY,FITS::NOVALUE,0,c)); }
inline void FitsKeywordList::end() {
insert(make(FITS::END,FITS::NOVALUE,0,0)); }
//<summary> list of read-only FITS keywords </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
class ConstFitsKeywordList {
public:
ConstFitsKeywordList(FitsKeywordList &x) : kw(x) { }
const FitsKeyword * operator () (int n) { return kw(n); }
const FitsKeyword * operator () (const FITS::ReservedName &x) {
return kw(x); }
const FitsKeyword * next(const FITS::ReservedName &x) {
return kw.next(x); }
const FitsKeyword * operator () (const FITS::ReservedName &x, int n) {
return kw(x,n); }
const FitsKeyword * next(const FITS::ReservedName &x, int n) {
return kw.next(x,n); }
const FitsKeyword * operator () (const char *x) { return kw(x); }
const FitsKeyword * next(const char *x) { return kw.next(x); }
Bool isempty() const { return kw.isempty(); }
void first() { kw.first(); }
void last() { kw.last(); }
const FitsKeyword *next() { return kw.next(); }
const FitsKeyword *prev() { return kw.prev(); }
const FitsKeyword *curr() { return kw.curr(); }
private:
FitsKeywordList &kw;
};
//<summary> translator between Keyword lists and fixed FITS cars </summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
//<synopsis>
// also contains the parser ???
//</synopsis>
class FitsKeyCardTranslator {
public:
FitsKeyCardTranslator(int = 100);
~FitsKeyCardTranslator();
FitsKeywordList & parse(const char *,
FitsKeywordList &, int, FITSErrorHandler, Bool);
int build(char *, FitsKeywordList &);
int no_errs() const;
const char *err(int) const;
int err_cardno(int) const;
static void fmtcard(char *, const FitsKeyword &);
private:
int cardno; // the current card number within record
static constexpr int FitsCardSize = 80;
static constexpr int FitsMaxCard = 36;
static constexpr int FitsRecSize = 2880;
int max_errs;
int no_errs_;
const char **err_;
int *err_cardno_;
char *blanks;
};
inline FitsKeyCardTranslator::~FitsKeyCardTranslator() {
delete [] err_; delete [] err_cardno_; delete [] blanks; }
inline int FitsKeyCardTranslator::no_errs() const { return no_errs_; }
inline const char *FitsKeyCardTranslator::err(int i) const { return err_[i]; }
inline int FitsKeyCardTranslator::err_cardno(int i) const {
return err_cardno_[i]; }
// <summary>Utility functions for floating point values</summary>
// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
// </reviewed>
class FitsFPUtil
{
public:
// These functions are useful to tell if some type is a floating point type.
// This is useful in a templated function, where the processing can vary
// depending on whether the type is FP or not (e.g. blank handling).
// <group>
static Bool isFP(const float *);
static Bool isFP(const double *);
static Bool isFP(const void *);
// </group>
// For blanking purposes, we need to be able to get a NaN. The NaN we set
// is all bits on.
// <group>
static void setNaN(double &val);
static void setNaN(float &val);
// </group>
};
} //# NAMESPACE CASACORE - END
# endif
casacore::type
casacore::ConstFitsKeywordList
list of read-only FITS keywords
Definition fits.h:949
casacore::ConstFitsKeywordList::last
void last()
Definition fits.h:967
casacore::ConstFitsKeywordList::ConstFitsKeywordList
ConstFitsKeywordList(FitsKeywordList &x)
Definition fits.h:951
casacore::ConstFitsKeywordList::curr
const FitsKeyword * curr()
Definition fits.h:970
casacore::ConstFitsKeywordList::isempty
Bool isempty() const
Definition fits.h:965
casacore::ConstFitsKeywordList::prev
const FitsKeyword * prev()
Definition fits.h:969
casacore::ConstFitsKeywordList::first
void first()
Definition fits.h:966
casacore::ConstFitsKeywordList::next
const FitsKeyword * next(const FITS::ReservedName &x, int n)
Definition fits.h:960
casacore::ConstFitsKeywordList::next
const FitsKeyword * next(const FITS::ReservedName &x)
Definition fits.h:956
casacore::ConstFitsKeywordList::operator()
const FitsKeyword * operator()(int n)
Definition fits.h:953
casacore::ConstFitsKeywordList::next
const FitsKeyword * next()
Definition fits.h:968
casacore::ConstFitsKeywordList::kw
FitsKeywordList & kw
Definition fits.h:973
casacore::ConstFitsKeywordList::next
const FitsKeyword * next(const char *x)
Definition fits.h:963
casacore::FITSError::defaultHandler
static void defaultHandler(const char *errMessage, ErrorLevel severity)
The default error handler.
casacore::FITS::l2f
static void l2f(void *, FitsLogical *, int)
casacore::FITS::tenpowerF
static float tenpowerF[39]
Definition fits.h:305
casacore::FITS::maxsigdigits
static const int maxsigdigits
Definition fits.h:310
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< double > x)
Definition fits.h:189
casacore::FITS::get_comment
static int get_comment(const char *s, int len, int &begpos)
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< IComplex > x)
Definition fits.h:193
casacore::FITS::mindblexp
static const int mindblexp
Definition fits.h:308
casacore::FITS::f2l
static void f2l(short *, void *, int)
casacore::FITS::f2l
static void f2l(DComplex *, void *, int)
casacore::FITS::trim_comment
static int trim_comment(const char *s, int len)
casacore::FITS::get_numeric
static void get_numeric(const char *s, int len, FitsValueResult &result)
casacore::FITS::maxexpdig
static const int maxexpdig
Definition fits.h:312
casacore::FITS::ReservedName
ReservedName
FITS Reserved Names.
Definition fits.h:236
casacore::FITS::GROUPS
@ GROUPS
Definition fits.h:241
casacore::FITS::TDISP
@ TDISP
Definition fits.h:244
casacore::FITS::ERRWORD
@ ERRWORD
Definition fits.h:245
casacore::FITS::TFORM
@ TFORM
Definition fits.h:244
casacore::FITS::REFERENC
@ REFERENC
Definition fits.h:243
casacore::FITS::PZERO_FITS
@ PZERO_FITS
Definition fits.h:243
casacore::FITS::USER_DEF
@ USER_DEF
Definition fits.h:237
casacore::FITS::DATE_OBS
@ DATE_OBS
Definition fits.h:239
casacore::FITS::TUNIT
@ TUNIT
Definition fits.h:245
casacore::FITS::CDELT
@ CDELT
Definition fits.h:238
casacore::FITS::OBSERVER
@ OBSERVER
Definition fits.h:242
casacore::FITS::THEAP
@ THEAP
Definition fits.h:244
casacore::FITS::PTYPE
@ PTYPE
Definition fits.h:242
casacore::FITS::BUNIT
@ BUNIT
Definition fits.h:238
casacore::FITS::PCOUNT
@ PCOUNT
Definition fits.h:242
casacore::FITS::COMMENT
@ COMMENT
Definition fits.h:238
casacore::FITS::EXTLEVEL
@ EXTLEVEL
Definition fits.h:240
casacore::FITS::END
@ END
Definition fits.h:240
casacore::FITS::EPOCH
@ EPOCH
Definition fits.h:240
casacore::FITS::CRVAL
@ CRVAL
Definition fits.h:239
casacore::FITS::BLANK
@ BLANK
Definition fits.h:237
casacore::FITS::ALTRPIX
@ ALTRPIX
Definition fits.h:246
casacore::FITS::INSTRUME
@ INSTRUME
Definition fits.h:241
casacore::FITS::TELESCOP
@ TELESCOP
Definition fits.h:244
casacore::FITS::BITPIX
@ BITPIX
Definition fits.h:237
casacore::FITS::TNULL
@ TNULL
Definition fits.h:244
casacore::FITS::BZERO
@ BZERO
Definition fits.h:238
casacore::FITS::EXTNAME
@ EXTNAME
Definition fits.h:240
casacore::FITS::OBJECT
@ OBJECT
Definition fits.h:242
casacore::FITS::CRPIX
@ CRPIX
Definition fits.h:238
casacore::FITS::TTYPE
@ TTYPE
Definition fits.h:245
casacore::FITS::SPACES
@ SPACES
Definition fits.h:243
casacore::FITS::SIMPLE
@ SIMPLE
Definition fits.h:243
casacore::FITS::EXTVER
@ EXTVER
Definition fits.h:241
casacore::FITS::BSCALE
@ BSCALE
Definition fits.h:237
casacore::FITS::DATE_MAP
@ DATE_MAP
Definition fits.h:246
casacore::FITS::BLOCKED
@ BLOCKED
Definition fits.h:237
casacore::FITS::ORIGIN
@ ORIGIN
Definition fits.h:242
casacore::FITS::EQUINOX
@ EQUINOX
Definition fits.h:240
casacore::FITS::TDIM
@ TDIM
Definition fits.h:243
casacore::FITS::NAXIS
@ NAXIS
Definition fits.h:241
casacore::FITS::CTYPE
@ CTYPE
Definition fits.h:239
casacore::FITS::TFIELDS
@ TFIELDS
Definition fits.h:244
casacore::FITS::PSCAL
@ PSCAL
Definition fits.h:242
casacore::FITS::XTENSION
@ XTENSION
Definition fits.h:245
casacore::FITS::TSCAL
@ TSCAL
Definition fits.h:245
casacore::FITS::GCOUNT
@ GCOUNT
Definition fits.h:241
casacore::FITS::TZERO
@ TZERO
Definition fits.h:245
casacore::FITS::DATAMIN
@ DATAMIN
Definition fits.h:239
casacore::FITS::CROTA
@ CROTA
Definition fits.h:238
casacore::FITS::AUTHOR
@ AUTHOR
Definition fits.h:237
casacore::FITS::TBCOL
@ TBCOL
Definition fits.h:243
casacore::FITS::DATE
@ DATE
Definition fits.h:239
casacore::FITS::EXTEND
@ EXTEND
Definition fits.h:240
casacore::FITS::DATAMAX
@ DATAMAX
Definition fits.h:239
casacore::FITS::HISTORY
@ HISTORY
Definition fits.h:241
casacore::FITS::l2f
static void l2f(void *, float *, int)
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< float > x)
Definition fits.h:187
casacore::FITS::f2l
static void f2l(FitsBit *, void *, int)
casacore::FITS::l2f
static void l2f(void *, char *, int)
casacore::FITS::isa_text
static Bool isa_text(char c)
Definition fits.h:322
casacore::FITS::swap2
static void swap2(void *, void *, int)
casacore::FITS::str2fstr
static int str2fstr(char *, const char *, int)
casacore::FITS::l2f
static void l2f(void *, FitsBit *, int)
casacore::FITS::f2l
static void f2l(unsigned char *, void *, int)
casacore::FITS::FITS
FITS()
Definition fits.h:319
casacore::FITS::l2f
static void l2f(void *, IComplex *, int)
casacore::FITS::f2l
static void f2l(FitsVADesc *, void *, int)
casacore::FITS::f2l
static void f2l(Int *, void *, int)
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< short > x)
Definition fits.h:181
casacore::FITS::mindouble
static const double mindouble
Definition fits.h:299
casacore::FITS::maxdblexp
static const int maxdblexp
Definition fits.h:309
casacore::FITS::ResWord
static ReservedFitsKeywordCollection & ResWord
Definition fits.h:270
casacore::FITS::f2l
static void f2l(long *, void *, int)
casacore::FITS::fitssize
static int fitssize(FITS::ValueType t)
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< DComplex > x)
Definition fits.h:195
casacore::FITS::swap4
static void swap4(void *, void *, int)
casacore::FITS::l2f
static void l2f(void *, FitsVADesc *, int)
casacore::FITS::l2f
static void l2f(void *, Int *, int)
casacore::FITS::l2f
static void l2f(void *, Complex *, int)
casacore::FITS::tenD
static double tenD(Int, int)
Definition fits.h:328
casacore::FITS::ckaccum
static int ckaccum(float &, Int, int)
casacore::FITS::f2l
static void f2l(Complex *, void *, int)
casacore::FITS::FitsRecType
FitsRecType
Types of FITS Records.
Definition fits.h:250
casacore::FITS::HDURecord
@ HDURecord
Definition fits.h:251
casacore::FITS::EndOfFile
@ EndOfFile
Definition fits.h:252
casacore::FITS::UnrecognizableRecord
@ UnrecognizableRecord
Definition fits.h:252
casacore::FITS::BadBeginningRecord
@ BadBeginningRecord
Definition fits.h:251
casacore::FITS::SpecialRecord
@ SpecialRecord
Definition fits.h:252
casacore::FITS::InitialState
@ InitialState
Definition fits.h:251
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< unsigned char > x)
Definition fits.h:179
casacore::FITS::tenpowerD
static double tenpowerD[309]
Definition fits.h:304
casacore::FITS::ValueType
ValueType
FITS I/O Error message types.
Definition fits.h:165
casacore::FITS::BYTE
@ BYTE
Definition fits.h:166
casacore::FITS::NOVALUE
@ NOVALUE
Definition fits.h:166
casacore::FITS::COMPLEX
@ COMPLEX
Definition fits.h:167
casacore::FITS::ICOMPLEX
@ ICOMPLEX
Definition fits.h:168
casacore::FITS::FLOAT
@ FLOAT
Definition fits.h:167
casacore::FITS::LONG
@ LONG
Definition fits.h:167
casacore::FITS::CHAR
@ CHAR
Definition fits.h:166
casacore::FITS::LOGICAL
@ LOGICAL
Definition fits.h:166
casacore::FITS::DOUBLE
@ DOUBLE
Definition fits.h:167
casacore::FITS::VADESC
@ VADESC
Definition fits.h:168
casacore::FITS::REAL
@ REAL
Definition fits.h:169
casacore::FITS::SHORT
@ SHORT
Definition fits.h:167
casacore::FITS::DCOMPLEX
@ DCOMPLEX
Definition fits.h:168
casacore::FITS::FSTRING
@ FSTRING
Definition fits.h:169
casacore::FITS::BIT
@ BIT
Definition fits.h:166
casacore::FITS::STRING
@ STRING
Definition fits.h:169
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< FitsVADesc > x)
Definition fits.h:197
casacore::FITS::isa_letter
static Bool isa_letter(char)
Definition fits.h:323
casacore::FITS::fstr2str
static void fstr2str(char *, const char *, int)
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< FitsBit > x)
Definition fits.h:175
casacore::FITS::minfloat
static const float minfloat
Definition fits.h:297
casacore::FITS::l2f
static void l2f(void *, long *, int)
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< Complex > x)
Definition fits.h:191
casacore::FITS::l2f
static void l2f(void *, double *, int)
casacore::FITS::minfltexp
static const int minfltexp
Definition fits.h:306
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< FitsLogical > x)
STRING and FSTRING are used internally in parsing keywords.
Definition fits.h:173
casacore::FITS::tenF
static float tenF(Int, int)
Definition fits.h:332
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< Int > x)
Definition fits.h:183
casacore::FITS::valstr
static void valstr(ostream &o, const ValueType &ty, const void *val)
casacore::FITS::f2l
static void f2l(IComplex *, void *, int)
casacore::FITS::l2f
static void l2f(void *, DComplex *, int)
casacore::FITS::f2l
static void f2l(char *, void *, int)
casacore::FITS::maxInt
static const Int maxInt
Definition fits.h:296
casacore::FITS::ckaccum
static int ckaccum(double &, Int, int)
casacore::FITS::get_value_id
static int get_value_id(const char *s, int l, int &pos)
casacore::FITS::FitsArrayOption
FitsArrayOption
Options on FITS array manipulations.
Definition fits.h:268
casacore::FITS::NoOpt
@ NoOpt
Definition fits.h:268
casacore::FITS::CtoF
@ CtoF
Definition fits.h:268
casacore::FITS::FtoC
@ FtoC
Definition fits.h:268
casacore::FITS::isa_digit
static Bool isa_digit(char c)
Definition fits.h:320
casacore::FITS::maxdouble
static const double maxdouble
Definition fits.h:300
casacore::FITS::maxfltexp
static const int maxfltexp
Definition fits.h:307
casacore::FITS::l2f
static void l2f(void *, short *, int)
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< long > x)
Definition fits.h:185
casacore::FITS::maxfloat
static const float maxfloat
Definition fits.h:298
casacore::FITS::get_value
static void get_value(const char *s, int len, FitsValueResult &result)
casacore::FITS::chk_comment
static int chk_comment(const char *s, int len)
casacore::FITS::maxdigl
static const int maxdigl
Definition fits.h:311
casacore::FITS::parse_vatform
static void parse_vatform(const char *s, FITS::ValueType &valType, int &maxelem)
utility function to parse the binary table variable array column (i.e.
casacore::FITS::l2f
static void l2f(void *, unsigned char *, int)
casacore::FITS::HDUType
HDUType
Types of FITS Header-Data Units.
Definition fits.h:261
casacore::FITS::ImageExtensionHDU
@ ImageExtensionHDU
Definition fits.h:263
casacore::FITS::PrimaryGroupHDU
@ PrimaryGroupHDU
Definition fits.h:262
casacore::FITS::AsciiTableHDU
@ AsciiTableHDU
Definition fits.h:262
casacore::FITS::BinaryTableHDU
@ BinaryTableHDU
Definition fits.h:263
casacore::FITS::NotAHDU
@ NotAHDU
Definition fits.h:262
casacore::FITS::PrimaryTableHDU
@ PrimaryTableHDU
Definition fits.h:264
casacore::FITS::PrimaryArrayHDU
@ PrimaryArrayHDU
Definition fits.h:262
casacore::FITS::UnknownExtensionHDU
@ UnknownExtensionHDU
Definition fits.h:263
casacore::FITS::get_name
static void get_name(const char *s, int len, FitsNameResult &result)
casacore::FITS::f2l
static void f2l(FitsLogical *, void *, int)
data conversion routines: FITS - local
casacore::FITS::FitsDevice
FitsDevice
Supported FITS Physical Devices.
Definition fits.h:256
casacore::FITS::Std
@ Std
Definition fits.h:257
casacore::FITS::Disk
@ Disk
Definition fits.h:257
casacore::FITS::Tape9
@ Tape9
Definition fits.h:257
casacore::FITS::swap8
static void swap8(void *, void *, int)
casacore::FITS::digit2bin
static int digit2bin(char c)
Definition fits.h:321
casacore::FITS::localsize
static int localsize(FITS::ValueType t)
casacore::FITS::f2l
static void f2l(float *, void *, int)
casacore::FITS::f2l
static void f2l(double *, void *, int)
casacore::FITS::letter2bin
static int letter2bin(char)
Definition fits.h:324
casacore::FITS::minInt
static const Int minInt
Definition fits.h:295
casacore::FITS::getfitstype
static FITS::ValueType getfitstype(NoConvert< char > x)
Definition fits.h:177
casacore::FitsBit
helper class for FITS Binary Tables
Definition fits.h:114
casacore::FitsBit::FitsBit
FitsBit(unsigned char x)
Definition fits.h:117
casacore::FitsBit::bit_array
unsigned char bit_array
Definition fits.h:121
casacore::FitsBit::operator=
FitsBit & operator=(unsigned char x)
Definition fits.h:118
casacore::FitsBit::FitsBit
FitsBit()
Definition fits.h:116
casacore::FitsFPUtil
Utility functions for floating point values.
Definition fits.h:1017
casacore::FitsFPUtil::setNaN
static void setNaN(float &val)
casacore::FitsFPUtil::isFP
static Bool isFP(const double *)
casacore::FitsFPUtil::isFP
static Bool isFP(const float *)
These functions are useful to tell if some type is a floating point type.
casacore::FitsFPUtil::isFP
static Bool isFP(const void *)
casacore::FitsFPUtil::setNaN
static void setNaN(double &val)
For blanking purposes, we need to be able to get a NaN.
casacore::FitsKeyCardTranslator::blanks
char * blanks
Definition fits.h:1003
casacore::FitsKeyCardTranslator::FitsCardSize
static constexpr int FitsCardSize
Definition fits.h:996
casacore::FitsKeyCardTranslator::fmtcard
static void fmtcard(char *, const FitsKeyword &)
casacore::FitsKeyCardTranslator::err_
const char ** err_
Definition fits.h:1001
casacore::FitsKeyCardTranslator::cardno
int cardno
Definition fits.h:995
casacore::FitsKeyCardTranslator::err_cardno_
int * err_cardno_
Definition fits.h:1002
casacore::FitsKeyCardTranslator::FitsRecSize
static constexpr int FitsRecSize
Definition fits.h:998
casacore::FitsKeyCardTranslator::err_cardno
int err_cardno(int) const
Definition fits.h:1010
casacore::FitsKeyCardTranslator::~FitsKeyCardTranslator
~FitsKeyCardTranslator()
Definition fits.h:1006
casacore::FitsKeyCardTranslator::max_errs
int max_errs
Definition fits.h:999
casacore::FitsKeyCardTranslator::FitsKeyCardTranslator
FitsKeyCardTranslator(int=100)
casacore::FitsKeyCardTranslator::no_errs_
int no_errs_
Definition fits.h:1000
casacore::FitsKeyCardTranslator::parse
FitsKeywordList & parse(const char *, FitsKeywordList &, int, FITSErrorHandler, Bool)
casacore::FitsKeyCardTranslator::build
int build(char *, FitsKeywordList &)
casacore::FitsKeyCardTranslator::FitsMaxCard
static constexpr int FitsMaxCard
Definition fits.h:997
casacore::FitsKeyCardTranslator::err
const char * err(int) const
Definition fits.h:1009
casacore::FitsKeyCardTranslator::no_errs
int no_errs() const
Definition fits.h:1008
casacore::FitsKeywordList
linked list of FITS keywords
Definition fits.h:735
casacore::FitsKeywordList::end
void end()
add the end card.
Definition fits.h:942
casacore::FitsKeywordList::mk
void mk(FITS::ReservedName k, Bool v, const char *c=0)
Add (make) a reserved keyword with the given value and optional comment The comment will be truncated...
Definition fits.h:888
casacore::FitsKeywordList::rules
int rules(FitsKeyword &, FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::FitsKeywordList::pos
FitsKeyword * pos
Definition fits.h:846
casacore::FitsKeywordList::beg_
FitsKeyword * beg_
Definition fits.h:844
casacore::FitsKeywordList::rules
int rules(FITSErrorHandler errhandler=FITSError::defaultHandler)
casacore::FitsKeywordList::operator()
FitsKeyword * operator()(int)
Retrieve specific keywords – these also set the current mark.
casacore::FitsKeywordList::make
FitsKeyword & make(const char *nm, FITS::ValueType t, const void *v, const char *c)
casacore::FitsKeywordList::next
FitsKeyword * next(const FITS::ReservedName &)
casacore::FitsKeywordList::parse
void parse(const char *, int)
For parsing a single string.
Definition fits.h:881
casacore::FitsKeywordList::toString
std::string toString() const
Convert the list to a string containing the 80-byte FITS headers.
casacore::FitsKeywordList::curr
FitsKeyword * curr()
Definition fits.h:874
casacore::FitsKeywordList::no_parse_errs
int no_parse_errs() const
Definition fits.h:883
casacore::FitsKeywordList::isempty
Bool isempty() const
Definition fits.h:871
casacore::FitsKeywordList::basic_rules
Bool basic_rules()
casacore::FitsKeywordList::operator=
FitsKeywordList & operator=(const FitsKeywordList &)
casacore::FitsKeywordList::spaces
void spaces(const char *n=0, const char *c=0)
add a spaces line
Definition fits.h:932
casacore::FitsKeywordList::del
void del()
delete the current keyword (the thing returned by curr()) from the list
casacore::FitsKeywordList::parse_err
const char * parse_err(int) const
Definition fits.h:884
casacore::FitsKeywordList::insert
void insert(FitsKeyword &)
casacore::FitsKeywordList::comment
void comment(const char *n=0, const char *c=0)
add a comment card
Definition fits.h:936
casacore::FitsKeywordList::next
FitsKeyword * next(const FITS::ReservedName &, int)
casacore::FitsKeywordList::first
void first()
Definition fits.h:872
casacore::FitsKeywordList::makeErrKeyword
FitsKeyword & makeErrKeyword(const char *name, FITS::ValueType type, const void *val, const char *errmsg)
construct an error keyword - this happens when a name is invalid (NULL or more than 8 characters) or ...
casacore::FitsKeywordList::make
FitsKeyword & make(FITS::ReservedName nm, FITS::ValueType t, const void *v, const char *c)
casacore::FitsKeywordList::FitsKeywordList
FitsKeywordList(const FitsKeywordList &)
casacore::FitsKeywordList::next
FitsKeyword * next(const char *)
casacore::FitsKeywordList::~FitsKeywordList
~FitsKeywordList()
Definition fits.h:870
casacore::FitsKeywordList::FitsKeywordList
FitsKeywordList()
Definition fits.h:868
casacore::FitsKeywordList::prev
FitsKeyword * prev()
casacore::FitsKeywordList::make
FitsKeyword & make(int ind, FITS::ReservedName nm, FITS::ValueType t, const void *v, const char *c)
casacore::FitsKeywordList::history
void history(const char *c=0)
add a history card
Definition fits.h:940
casacore::FitsKeywordList::next
FitsKeyword * next()
casacore::FitsKeywordList::last
void last()
Definition fits.h:873
casacore::FitsKeywordList::card
FitsParse card
Definition fits.h:863
casacore::FitsKeywordList::delete_all
void delete_all()
casacore::FitsKeywordList::cursor
int cursor
Definition fits.h:848
casacore::FitsKeywordList::FitsKeywordList
FitsKeywordList(ConstFitsKeywordList &)
casacore::FitsKeywordList::end_
FitsKeyword * end_
Definition fits.h:845
casacore::FitsKeywordList::total
int total
Definition fits.h:847
casacore::FitsKeyword
FITS keyword.
Definition fits.h:513
casacore::FitsKeyword::FitsKeyword
FitsKeyword(const FitsKeyword &)
A word about friends: FitsKeywordList accesses the next and prev pointers and the FitsKeyword constru...
Definition fits.h:641
casacore::FitsKeyword::asBool
Bool asBool() const
access the value of the keyword
Definition fits.h:667
casacore::FitsKeyword::ival
Int ival
Definition fits.h:607
casacore::FitsKeyword::name_
char * name_
the keyword name if name_ is 0, keyword is not a user defined name if ndx is 0, there is no index
Definition fits.h:588
casacore::FitsKeyword::~FitsKeyword
~FitsKeyword()
Definition fits.h:645
casacore::FitsKeyword::vallen
short vallen
Definition fits.h:612
casacore::FitsKeyword::comm
const char * comm() const
access the keyword comment
Definition fits.h:661
casacore::FitsKeyword::dval
double dval
Definition fits.h:609
casacore::FitsKeyword::namelen_
short namelen_
Definition fits.h:591
casacore::FitsKeyword::kw_
const ReservedFitsKeyword * kw_
Definition fits.h:589
casacore::FitsKeyword::FitsKeyword
FitsKeyword(const char *, int, FITS::ValueType, const void *, int, const char *, int)
private constructors for use by friends
casacore::FitsKeyword::kw
const ReservedFitsKeyword & kw() const
Definition fits.h:651
casacore::FitsKeyword::val
void * val
Definition fits.h:611
casacore::FitsKeyword::del_val
void del_val()
casacore::FitsKeyword::comm_
char * comm_
the keyword comment if comm_ is 0, there is no comment
Definition fits.h:597
casacore::FitsKeyword::init
void init(const FitsKeyword &)
casacore::FitsKeyword::operator=
FitsKeyword & operator=(const FitsKeyword &)
Definition fits.h:643
casacore::FitsKeyword::asDouble
double asDouble() const
Definition fits.h:691
casacore::FitsKeyword::commlen_
short commlen_
Definition fits.h:598
casacore::FitsKeyword::prev_
FitsKeyword * prev_
Definition fits.h:582
casacore::FitsKeyword::setval
void setval(const FITS::ValueType &, const void *, int)
casacore::FitsKeyword::asInt
Int asInt() const
Definition fits.h:671
casacore::FitsKeyword::FitsParse
friend class FitsParse
Definition fits.h:515
casacore::FitsKeyword::fval
float fval
Definition fits.h:608
casacore::FitsKeyword::isindexed
Bool isindexed() const
Definition fits.h:658
casacore::FitsKeyword::namelen
int namelen() const
Definition fits.h:657
casacore::FitsKeyword::err
static void err(const char *, const FITS::ValueType &, const void *, const char *)
casacore::FitsKeyword::name
void name(const char *)
change the name of the keyword
casacore::FitsKeyword::bval
Bool bval
Definition fits.h:606
casacore::FitsKeyword::type
FITS::ValueType type() const
the datatype of the keyword
Definition fits.h:665
casacore::FitsKeyword::asString
const char * asString() const
Definition fits.h:668
casacore::FitsKeyword::type_
FITS::ValueType type_
the keyword value
Definition fits.h:604
casacore::FitsKeyword::commlen
int commlen() const
Definition fits.h:663
casacore::FitsKeyword::ndx
int ndx
Definition fits.h:590
casacore::FitsKeyword::asFloat
float asFloat() const
Definition fits.h:678
casacore::FitsKeyword::value
const void * value() const
casacore::FitsKeyword::setcomm
void setcomm(const char *, int)
casacore::FitsKeyword::memchk
static void memchk(void *)
casacore::FitsKeyword::isreserved
Bool isreserved() const
Definition fits.h:652
casacore::FitsKeyword::valStrlen
int valStrlen() const
Definition fits.h:670
casacore::FitsKeyword::err
int err() const
access the error status
Definition fits.h:664
casacore::FitsKeyword::name
const char * name() const
get info about the name
Definition fits.h:655
casacore::FitsKeyword::asDComplex
DComplex asDComplex() const
Definition fits.h:708
casacore::FitsKeyword::comm
void comm(const char *)
change the comment of the keyword
casacore::FitsKeyword::next_
FitsKeyword * next_
Definition fits.h:581
casacore::FitsKeyword::index
int index() const
Definition fits.h:659
casacore::FitsKeyword::asIComplex
IComplex asIComplex() const
Definition fits.h:704
casacore::FitsKeyword::FitsKeyword
FitsKeyword(const ReservedFitsKeyword *, int, FITS::ValueType, const void *, int, const char *, int)
constructs reserved keywords parms: resword, index, val, vallen, comm, commlen
casacore::FitsKeyword::FitsKeywordList
friend class FitsKeywordList
Definition fits.h:514
casacore::FitsKeyword::asComplex
Complex asComplex() const
Definition fits.h:706
casacore::FitsLogical
FITS helper class.
Definition fits.h:88
casacore::FitsLogical::operator<<
friend ostream & operator<<(ostream &o, const FitsLogical &)
casacore::FitsLogical::undefine
void undefine()
ARO 2021-02-20: Removed the following function, because it seems incorrectly implemented and isn't us...
Definition fits.h:98
casacore::FitsLogical::v
char v
Definition fits.h:101
casacore::FitsLogical::operator=
FitsLogical & operator=(Bool x)
Definition fits.h:93
casacore::FitsLogical::FitsLogical
FitsLogical(Bool x)
Definition fits.h:92
casacore::FitsLogical::FitsLogical
FitsLogical()
Definition fits.h:91
casacore::FitsNameResult
analyse the name of a header card
Definition fits.h:438
casacore::FitsNameResult::endpos
int endpos
Definition fits.h:442
casacore::FitsNameResult::isaname
Bool isaname
Definition fits.h:440
casacore::FitsNameResult::isaindex
Bool isaindex
Definition fits.h:443
casacore::FitsNameResult::begpos
int begpos
Definition fits.h:441
casacore::FitsNameResult::ErrMsg
ErrMsg
Definition fits.h:446
casacore::FitsNameResult::OK
@ OK
Definition fits.h:446
casacore::FitsNameResult::NO_0_NDX
@ NO_0_NDX
Definition fits.h:446
casacore::FitsNameResult::index
int index
Definition fits.h:444
casacore::FitsNameResult::err
ErrMsg err
Definition fits.h:447
casacore::FitsNameResult::len
int len
Definition fits.h:445
casacore::FitsParse
parse a header card
Definition fits.h:485
casacore::FitsParse::err
const char * err(int) const
Definition fits.h:503
casacore::FitsParse::no_errs
int no_errs() const
Definition fits.h:502
casacore::FitsParse::seterr
int seterr(const char *)
Definition fits.h:504
casacore::FitsParse::~FitsParse
~FitsParse()
Definition fits.h:501
casacore::FitsParse::parse
FitsKeyword & parse(const char *, int)
casacore::FitsParse::FitsParse
FitsParse(int=10)
casacore::FitsParse::err_
const char ** err_
Definition fits.h:496
casacore::FitsParse::max_errs
const int max_errs
Definition fits.h:495
casacore::FitsParse::FitsKeywordList
friend class FitsKeywordList
Definition fits.h:486
casacore::FitsParse::no_errs_
int no_errs_
Definition fits.h:494
casacore::FitsParse::mkerr
FitsKeyword & mkerr(const char *s, int len)
casacore::FitsVADesc
Variable Length Array Descriptor.
Definition fits.h:128
casacore::FitsVADesc::operator<<
friend ostream & operator<<(ostream &o, const FitsVADesc &)
casacore::FitsVADesc::operator=
FitsVADesc & operator=(const FitsVADesc &x)
Definition fits.h:134
casacore::FitsVADesc::num
int num() const
Definition fits.h:139
casacore::FitsVADesc::FitsVADesc
FitsVADesc(int n, int o)
Definition fits.h:137
casacore::FitsVADesc::no_elements
int no_elements
Definition fits.h:142
casacore::FitsVADesc::FitsVADesc
FitsVADesc()
Definition fits.h:131
casacore::FitsVADesc::FitsVADesc
FitsVADesc(const FitsVADesc &x)
Definition fits.h:132
casacore::FitsVADesc::rel_offset
int rel_offset
Definition fits.h:143
casacore::FitsVADesc::offset
int offset() const
Definition fits.h:140
casacore::FitsVADesc::set
void set(int n, int o)
Definition fits.h:138
casacore::FitsValueResult
analyse the value of a header card
Definition fits.h:457
casacore::FitsValueResult::begpos
int begpos
Definition fits.h:470
casacore::FitsValueResult::f
float f
Definition fits.h:464
casacore::FitsValueResult::pointpos
int pointpos
Definition fits.h:473
casacore::FitsValueResult::l
Int l
Definition fits.h:463
casacore::FitsValueResult::c
Complex c
Definition fits.h:467
casacore::FitsValueResult::lc
IComplex lc
Definition fits.h:468
casacore::FitsValueResult::errmsg
const char * errmsg
Definition fits.h:475
casacore::FitsValueResult::isa_point
Bool isa_point
Definition fits.h:472
casacore::FitsValueResult::b
Bool b
Definition fits.h:461
casacore::FitsValueResult::dc
DComplex dc
Definition fits.h:469
casacore::FitsValueResult::d
double d
Definition fits.h:465
casacore::FitsValueResult::type
FITS::ValueType type
Definition fits.h:459
casacore::FitsValueResult::s
int s[2]
Definition fits.h:462
casacore::FitsValueResult::endpos
int endpos
Definition fits.h:471
casacore::FitsValueResult::no_sig
int no_sig
Definition fits.h:474
casacore::IComplex
Definition IComplex.h:47
casacore::NoConvert
Definition fits.h:61
casacore::NoConvert::NoConvert
NoConvert()
Definition fits.h:63
casacore::NoConvert::operator=
void operator=(int)
Definition fits.h:64
casacore::ReservedFitsKeywordCollection
collection of reserved FITS keywords
Definition fits.h:375
casacore::ReservedFitsKeywordCollection::user_def_item
static const ReservedFitsKeyword & user_def_item
Definition fits.h:400
casacore::ReservedFitsKeywordCollection::history
const ReservedFitsKeyword & history() const
Definition fits.h:428
casacore::ReservedFitsKeywordCollection::essential_name
int essential_name(const char *, int) const
casacore::ReservedFitsKeywordCollection::operator[]
const ReservedFitsKeyword & operator[](int i) const
Definition fits.h:414
casacore::ReservedFitsKeywordCollection::requires_value
Bool requires_value(int) const
casacore::ReservedFitsKeywordCollection::no
int no() const
Definition fits.h:415
casacore::ReservedFitsKeywordCollection::comment
const ReservedFitsKeyword & comment() const
Definition fits.h:426
casacore::ReservedFitsKeywordCollection::isunique
Bool isunique(int) const
Definition fits.h:416
casacore::ReservedFitsKeywordCollection::error_item
static const ReservedFitsKeyword & error_item
Definition fits.h:401
casacore::ReservedFitsKeywordCollection::get_essential
const ReservedFitsKeyword & get_essential(int, Bool, FITS::ValueType, const void *, int, const char *&) const
casacore::ReservedFitsKeywordCollection::get
const ReservedFitsKeyword & get(FITS::ReservedName, Bool, FITS::ValueType, const void *, int, const char *&) const
casacore::ReservedFitsKeywordCollection::end_item
const ReservedFitsKeyword & end_item() const
Definition fits.h:422
casacore::ReservedFitsKeywordCollection::match
const ReservedFitsKeyword & match(int, const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
casacore::ReservedFitsKeywordCollection::history_item
static const ReservedFitsKeyword & history_item
Definition fits.h:405
casacore::ReservedFitsKeywordCollection::resalpha
static const int resalpha[26]
Definition fits.h:407
casacore::ReservedFitsKeywordCollection::comment_item
static const ReservedFitsKeyword & comment_item
Definition fits.h:404
casacore::ReservedFitsKeywordCollection::no_items
static const int no_items
Definition fits.h:399
casacore::ReservedFitsKeywordCollection::aname
const char * aname(FITS::ReservedName) const
casacore::ReservedFitsKeywordCollection::rules
int rules(const ReservedFitsKeyword &, const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
casacore::ReservedFitsKeywordCollection::err_item
const ReservedFitsKeyword & err_item() const
Definition fits.h:420
casacore::ReservedFitsKeywordCollection::isreserved
int isreserved(const char *, int) const
casacore::ReservedFitsKeywordCollection::get
const ReservedFitsKeyword & get(const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
casacore::ReservedFitsKeywordCollection::userdef_item
const ReservedFitsKeyword & userdef_item() const
Definition fits.h:418
casacore::ReservedFitsKeywordCollection::spaces
const ReservedFitsKeyword & spaces() const
Definition fits.h:424
casacore::ReservedFitsKeywordCollection::resword
static const ReservedFitsKeyword resword[]
Definition fits.h:406
casacore::ReservedFitsKeywordCollection::end__item
static const ReservedFitsKeyword & end__item
Definition fits.h:402
casacore::ReservedFitsKeywordCollection::spaces_item
static const ReservedFitsKeyword & spaces_item
Definition fits.h:403
casacore::ReservedFitsKeyword
reserved FITS keyword
Definition fits.h:341
casacore::ReservedFitsKeyword::isindexed_
Bool isindexed_
Definition fits.h:360
casacore::ReservedFitsKeyword::namesize
int namesize() const
Definition fits.h:365
casacore::ReservedFitsKeyword::isindexed
Bool isindexed() const
Definition fits.h:367
casacore::ReservedFitsKeyword::isessential_
Bool isessential_
Definition fits.h:361
casacore::ReservedFitsKeyword::type
FITS::ValueType type() const
Definition fits.h:366
casacore::ReservedFitsKeyword::name_
FITS::ReservedName name_
Definition fits.h:356
casacore::ReservedFitsKeyword::isessential
Bool isessential() const
Definition fits.h:368
casacore::ReservedFitsKeyword::namesize_
int namesize_
Definition fits.h:358
casacore::ReservedFitsKeyword::type_
FITS::ValueType type_
Definition fits.h:359
casacore::ReservedFitsKeyword::aname_
const char * aname_
Definition fits.h:357
casacore::ReservedFitsKeyword::aname
const char * aname() const
Definition fits.h:364
casacore::ReservedFitsKeyword::name
FITS::ReservedName name() const
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::False
const Bool False
Definition aipstype.h:42
casacore::operator<<
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
casacore::name
String name() const
Return the name of the field.
Definition RecordField.h:163
casacore::pow
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
casacore::init
void init()
Other internal helper function(s).
casacore::FitsLong
int FitsLong
All FITS code seems to assume longs are 4 bytes.
Definition aipsxtype.h:41
casacore::Int
int Int
Definition aipstype.h:48
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::True
const Bool True
Definition aipstype.h:41
casacore::comment
const String & comment() const
Get the comment of this field.
stdlib.h