casacore
Loading...
Searching...
No Matches
fits.h
Go to the documentation of this file.
1//# fits.h:
2//# Copyright (C) 1993,1994,1995,1996,1997,1999,2000,2001,2003,2004
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26# if !defined(AIPS_FITS)
27# define AIPS_FITS
28
29//# Note that aips.h has to come first for the correct definition of off_t.
30# include <casacore/casa/aips.h>
31# include <stdlib.h>
32# include <ctype.h>
33# include <casacore/casa/iostream.h>
34# include <casacore/casa/BasicSL/Complex.h>
35# include <casacore/casa/BasicSL/IComplex.h>
36# include <casacore/fits/FITS/FITSError.h>
37
38namespace casacore { //# NAMESPACE CASACORE - BEGIN
39
40//# All FITS code seems to assume longs are 4 bytes. Currently
41//# this corresponds to an "int" on all useful platforms.
42 typedef Int FitsLong;
43//# recovered by GYL
44
45//# Forward declarations
46class ReservedFitsKeywordCollection;
47class FitsNameResult;
48class FitsValueResult;
49class FitsKeyword;
50class FitsParse;
51
52//<summary> FITS templated helper class </summary>
53// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
54// </reviewed>
55//<synopsis>
56// NoConvert is a template class that is not intended for
57// general use, it is used internally.
58//</synopsis>
59
60template <class TYPE>
61class NoConvert {
62 public:
64 void operator = (int) {; }
65};
66
67//<summary> FITS helper class </summary>
68// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
69// </reviewed>
70//<synopsis>
71// FitsLogical is a helper class that is not intended for
72// general use.
73//</synopsis>
74//<example>
75// Here is an example of the FitsLogical class.
76//<srcblock>
77// FitsLogical x;
78// FitsLogical y(True);
79// FitsLogical z = x;
80// ...
81// x = y; y = False; x.undefine();
82// Bool b;
83// if (x.isdefined())
84// b = x;
85// b = y; If y is undefined, b will be false.
86//</srcblock>
87//</example>
89 friend ostream & operator << (ostream &o, const FitsLogical &);
90 public:
91 FitsLogical() : v('\0') { }
92 FitsLogical(Bool x) : v(x == True ? 'T' : 'F') { }
94 v = (x == True ? 'T' : 'F'); return *this; }
98 void undefine() { v = '\0'; }
99 operator Bool() const { return v == 'T'; }
100 protected:
101 char v;
102};
103
104//<summary> helper class for FITS Binary Tables </summary>
105// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
106// </reviewed>
107//<synopsis>
108// This class is not intended for general use. It only has meaning
109// in the context of FITS Binary tables. There its use is incorporated
110// into the concept of a FitsField, where FitsBit is given a specialized
111// interpretation.
112//</synopsis>
113
114class FitsBit {
115 public:
117 FitsBit(unsigned char x) : bit_array(x) { }
118 FitsBit & operator = (unsigned char x) { bit_array = x; return *this; }
119 operator unsigned char() const { return bit_array; }
120 protected:
121 unsigned char bit_array;
122};
123
124//<summary> Variable Length Array Descriptor </summary>
125// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
126// </reviewed>
127
129 friend ostream & operator << (ostream &o, const FitsVADesc &);
130 public:
136 rel_offset = x.rel_offset; return *this; }
137 FitsVADesc(int n, int o) : no_elements(n), rel_offset(o) { }
138 void set(int n, int o) { no_elements = n; rel_offset = o; }
139 int num() const { return no_elements; }
140 int offset() const { return rel_offset; }
141 protected:
144};
145
146//<summary> static functions and enumerations </summary>
147// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
148// </reviewed>
149//<synopsis>
150// Many of the static functions are utility functions used internally in the
151// implementation of the member functions of the FITS classes. They are placed
152// in a single class to encapsulate them and to avoid adding many names to the
153// global name space. More important, from the user's perspective, are the
154// enumerations. They form the basic vocabulary of a FITS application. For example,
155// instead of referring to the FITS <src>NAXIS</src> keyword,
156// <src>FITS::NAXIS</src> should be used
157//</synopsis>
158
159class FITS {
160 public:
161
162 // FITS I/O Error message types
163
164 // Basic FITS Data Types for keywords and data
166 NOVALUE = 0, LOGICAL = 1, BIT = 2, CHAR = 3, BYTE = 4,
167 SHORT = 5, LONG = 6, FLOAT = 7, DOUBLE = 8, COMPLEX = 9,
168 ICOMPLEX = 10, DCOMPLEX = 11, VADESC = 12,
170 }; // REAL means either FLOAT or DOUBLE
171 // STRING and FSTRING are used internally in parsing keywords
172
184 x=0; return FITS::LONG; }
199
202
203 // data conversion routines: FITS - local
204 static void f2l(FitsLogical *,void *,int);
205 static void l2f(void *,FitsLogical *,int);
206 static void f2l(FitsBit *,void *,int);
207 static void l2f(void *,FitsBit *,int);
208 static void f2l(char *,void *,int);
209 static void l2f(void *,char *,int);
210 static void f2l(unsigned char *,void *,int);
211 static void l2f(void *,unsigned char *,int);
212 static void f2l(short *,void *,int);
213 static void l2f(void *,short *,int);
214 static void f2l(Int *,void *,int);
215 static void l2f(void *,Int *,int);
216 static void f2l(long *,void *,int);
217 static void l2f(void *,long *,int);
218 static void f2l(float *,void *,int);
219 static void l2f(void *,float *,int);
220 static void f2l(double *,void *,int);
221 static void l2f(void *,double *,int);
222 static void f2l(Complex *,void *,int);
223 static void l2f(void *,Complex *,int);
224 static void f2l(IComplex *,void *,int);
225 static void l2f(void *,IComplex *,int);
226 static void f2l(DComplex *,void *,int);
227 static void l2f(void *,DComplex *,int);
228 static void f2l(FitsVADesc *,void *,int);
229 static void l2f(void *,FitsVADesc *,int);
230 static void swap2(void *, void *, int);
231 static void swap4(void *, void *, int);
232 static void swap8(void *, void *, int);
233
234 // FITS Reserved Names. PZERO is named strangely because it can conflict with
235 // a standard #define in sys/param.h.
248
249 // Types of FITS Records
254
255 // Supported FITS Physical Devices
259
260 // Types of FITS Header-Data Units
266
267 // Options on FITS array manipulations
268 enum FitsArrayOption { NoOpt = 0, CtoF = 1, FtoC = 2};
269
271 static void valstr(ostream &o, const ValueType &ty, const void *val);
272 static Bool isa_digit(char c);
273 static int digit2bin(char c);
274 static Bool isa_text(char c);
275 static Bool isa_letter(char);
276 static int letter2bin(char);
277 static void fstr2str(char *, const char *, int);
278 static int str2fstr(char *, const char *, int);
279 static void get_name(const char *s, int len, FitsNameResult &result);
280 static int get_value_id(const char *s, int l, int &pos);
281 static void get_value(const char *s, int len, FitsValueResult &result);
282 static int trim_comment(const char *s, int len);
283 static int chk_comment(const char *s, int len);
284 static int get_comment(const char *s, int len, int &begpos);
285 static void get_numeric(const char *s, int len, FitsValueResult &result);
286 // utility function to parse the binary table variable array
287 // column (i.e. uses the heap) of the form nPt(dddd) where n
288 // is either 0 or 1, t is one of the standard FITS binary table
289 // column types and dddd is the maximum number of elements used
290 // by this column. If there is a format error in the input
291 // string (*s), then valType will have the value NOVALUE and
292 // maxelem will be -1.
293 static void parse_vatform(const char *s, FITS::ValueType &valType,
294 int &maxelem);
295 static const Int minInt;
296 static const Int maxInt;
297 static const float minfloat;
298 static const float maxfloat;
299 static const double mindouble;
300 static const double maxdouble;
301
302 private:
303 FITS();
304 static double tenpowerD[309];
305 static float tenpowerF[39];
306 static const int minfltexp;
307 static const int maxfltexp;
308 static const int mindblexp;
309 static const int maxdblexp;
310 static const int maxsigdigits;
311 static const int maxdigl; // max digits in a long
312 static const int maxexpdig; // max digits in an exponent
313 static double tenD(Int, int);
314 static float tenF(Int, int);
315 static int ckaccum(double &, Int, int);
316 static int ckaccum(float &, Int, int);
317};
318
319inline FITS::FITS() { } // just a dummy function to prevent instantiation
320inline Bool FITS::isa_digit(char c) { return isdigit(c) ? True : False; }
321inline int FITS::digit2bin(char c) { return c - '0'; }
322inline Bool FITS::isa_text(char c) { return isprint(c) ? True : False; }
323inline Bool FITS::isa_letter(char c) { return isupper(c) ? True : False; }
324inline int FITS::letter2bin(char c) { return c - 'A'; }
325
326ostream & operator << (ostream &, const FITS::ValueType &);
327
328inline double FITS::tenD(Int numb, int pow) {
329 return (pow > 0) ? (((double)numb) * tenpowerD[pow]) :
330 ((pow < 0) ? (((double)numb) / tenpowerD[-pow]) : ((double)numb));
331}
332inline float FITS::tenF(Int numb, int pow) {
333 return (pow > 0) ? (((float)numb) * tenpowerF[pow]) :
334 ((pow < 0) ? (((float)numb) / tenpowerF[-pow]) : ((float)numb));
335}
336
337//<summary> reserved FITS keyword </summary>
338// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
339// </reviewed>
340
342 public:
343 const char *aname() const;
345 int namesize() const;
346 FITS::ValueType type() const;
347 Bool isindexed() const;
348 Bool isessential() const;
349# if defined(TURBOCPP)
350 // It is best for the following to be private, but
351 // C-Front won't allow an initializer list if they are private.
352 // This issue isn't that crucial since functions in
353 // ReservedFitsKeywordCollection always return const items.
354 private:
355# endif
357 const char *aname_;
360 Bool isindexed_; // 0 = NOT INDEXED, 1 = INDEXED
361 Bool isessential_; // 0 = NO, 1 = YES
362};
363
364inline const char *ReservedFitsKeyword::aname() const { return aname_; }
365inline int ReservedFitsKeyword::namesize() const { return namesize_; }
370
371//<summary> collection of reserved FITS keywords </summary>
372// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
373// </reviewed>
374
376 public:
377 const ReservedFitsKeyword & operator [] (int i) const;
378 int no() const;
380 const void *, int, const char *&) const;
381 const ReservedFitsKeyword &get(const char *, int, Bool, FITS::ValueType,
382 const void *, int, const char *&) const;
383 const char *aname(FITS::ReservedName) const;
384 int essential_name(const char *, int) const;
386 const void *, int, const char *&) const;
387 int isreserved(const char *, int) const;
388 Bool isunique(int) const;
390 const ReservedFitsKeyword &userdef_item() const;
391 const ReservedFitsKeyword &err_item() const;
392 const ReservedFitsKeyword &end_item() const;
393 const ReservedFitsKeyword &spaces() const;
394 const ReservedFitsKeyword &comment() const;
395 const ReservedFitsKeyword &history() const;
396 int rules(const ReservedFitsKeyword &, const char *, int, Bool,
397 FITS::ValueType, const void *, int, const char *&) const;
398 private:
399 static const int no_items; // number of entries in the table
400 static const ReservedFitsKeyword &user_def_item; // user-defined keyword
401 static const ReservedFitsKeyword &error_item; // error in keyword
406 static const ReservedFitsKeyword resword[]; // table of reserved words
407 static const int resalpha[26]; // alphabetic index to table
408 const ReservedFitsKeyword &match(int, const char *, int, Bool,
409 FITS::ValueType, const void *, int, const char *&) const;
410
411};
412
414 operator [] (int i) const { return resword[i]; }
415inline int ReservedFitsKeywordCollection::no() const { return no_items; }
417 return (Bool)(resword[i + 1].name() != resword[i].name()); }
430
431//<summary> analyse the name of a header card </summary>
432// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
433// </reviewed>
434//<synopsis>
435// Analyse the name of a header card
436//</synopsis>
437
439 public:
440 Bool isaname; // 1 if there is a name present, otherwise 0
441 int begpos; // beginning position of name
442 int endpos; // ending position of name
443 Bool isaindex; // whether an index is present or not
444 int index; // index if present
445 int len; // length of name without index
446 enum ErrMsg { OK = 0, NO_0_NDX };
448};
449
450//<summary> analyse the value of a header card </summary>
451// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
452// </reviewed>
453//<synopsis>
454// Analyse the value of a header card
455//</synopsis>
456
458 public:
460 union {
462 int s[2]; // for strings, s[0] is offset, s[1] length
464 float f;
465 double d;
466 };
467 Complex c;
469 DComplex dc;
470 int begpos; // beginning position of value
471 int endpos; // ending position of value
472 Bool isa_point; // 1 if a point, otherwise 0
473 int pointpos; // position of point, if any
474 int no_sig; // number of significant digits
475 const char *errmsg; // error message, if any
476};
477
478//<summary> parse a header card </summary>
479// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
480// </reviewed>
481//<synopsis>
482// parse a header card
483//</synopsis>
484
486 friend class FitsKeywordList;
487 public:
488 FitsKeyword &parse(const char *, int); // Parsing one string
489 int no_errs() const;
490 const char *err(int) const;
491 private:
492 FitsParse(int = 10);
493 ~FitsParse();
495 const int max_errs;
496 const char **err_;
497 int seterr(const char *);
498 FitsKeyword &mkerr(const char *s, int len);
499};
500
501inline FitsParse::~FitsParse() { delete [] err_; }
502inline int FitsParse::no_errs() const { return no_errs_; }
503inline const char *FitsParse::err(int i) const { return err_[i]; }
504inline int FitsParse::seterr(const char *s) {
505 return no_errs_ < max_errs ? ( err_[no_errs_++] = s, 0) : -1; }
506
507//<summary> FITS keyword </summary>
508// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
509// </reviewed>
510//<synopsis>
511// A FITS keyword contains a name, a value and a comment.
512//</synopsis>
514 friend class FitsKeywordList;
515 friend class FitsParse;
516 // A word about friends: FitsKeywordList accesses the next and prev
517 // pointers and the FitsKeyword constructors.
518 // FitsParse only accesses the FitsKeyword constructors.
519
520 public:
521
522 FitsKeyword(const FitsKeyword &);
524 ~FitsKeyword();
525
526 //<group>
527 // get info about the name
528 const char *name() const;
529 int namelen() const;
530 Bool isreserved() const;
531 Bool isindexed() const;
532 const ReservedFitsKeyword &kw() const;
533 int index() const;
534 //</group>
535
536 //<group>
537 // access the keyword comment
538 const char *comm() const;
539 int commlen() const;
540 //</group>
541
542 // access the error status
543 int err() const;
544
545 // the datatype of the keyword
546 FITS::ValueType type() const;
547
548 // access the value of the keyword
549 //<group>
550 Bool asBool() const;
551 const char *asString() const;
552 int valStrlen() const;
553 Int asInt() const;
554 float asFloat() const;
555 double asDouble() const;
556 IComplex asIComplex() const;
557 Complex asComplex() const;
558 DComplex asDComplex() const;
559 const void *value() const;
560 //</group>
561
562 // change the value of the keyword
563 //<group>
565 FitsKeyword & operator = (const char *);
567 FitsKeyword & operator = (float);
568 FitsKeyword & operator = (double);
570 FitsKeyword & operator = (Complex);
571 FitsKeyword & operator = (DComplex);
572 //</group>
573
574 // change the comment of the keyword
575 void comm(const char *);
576
577 // change the name of the keyword
578 void name(const char *);
579
580 private:
583
584 //<group>
585 // the keyword name
586 // if name_ is 0, keyword is not a user defined name
587 // if ndx is 0, there is no index
588 char *name_;
590 int ndx;
591 short namelen_;
592 //</group>
593
594 //<group>
595 // the keyword comment
596 // if comm_ is 0, there is no comment
597 char *comm_;
598 short commlen_;
599 //</group>
600
601
602 //<group>
603 // the keyword value
605 union {
608 float fval;
609 double dval;
610 };
611 void *val; // pointer to allocated value, if any
612 short vallen; // only used for string data
613 void del_val(); // does an appropriate delete based on type
614 //</group>
615
616 void init(const FitsKeyword &);
617 void setval(const FITS::ValueType &, const void *, int);
618 void setcomm(const char *, int);
619 static void err(const char *, const FITS::ValueType &, const void *,
620 const char *);
621 static void memchk(void *);
622
623 //<group>
624 // private constructors for use by friends
625
626 // constructs user-defined keywords
627 // parms: name, namelen, type, val, vallen, comm, commlen
628 FitsKeyword(const char *, int ,
629 FITS::ValueType, const void *, int, const char *, int);
630 // constructs reserved keywords
631 // parms: resword, index, val, vallen, comm, commlen
633 FITS::ValueType, const void *, int, const char *, int);
634 //</group>
635
636
637};
638
639ostream & operator << (ostream &, const FitsKeyword &);
640
641inline FitsKeyword::FitsKeyword(const FitsKeyword &k) : next_(0), prev_(0),
642 name_(0), kw_(0), comm_(0), val(0) { init(k); }
644 delete [] name_; delete [] comm_; del_val(); init(k); return *this; }
646 delete [] name_;
647 delete [] comm_;
648 del_val();
649}
650
651inline const ReservedFitsKeyword &FitsKeyword::kw() const { return *kw_; }
652inline Bool FitsKeyword::isreserved() const { return
653 (kw().name() != FITS::ERRWORD && kw().name() != FITS::USER_DEF)
654 ? True : False; }
655inline const char *FitsKeyword::name() const {
656 return isreserved() ? kw().aname() : (namelen_ ? name_ : ""); }
657inline int FitsKeyword::namelen() const { return namelen_; }
658inline Bool FitsKeyword::isindexed() const {return ndx > 0 ? True : False;}
659inline int FitsKeyword::index() const { return ndx; }
660
661inline const char *FitsKeyword::comm() const {
662 return comm_ ? comm_ : ""; }
663inline int FitsKeyword::commlen() const { return commlen_; }
664inline int FitsKeyword::err() const { return (kw().name() == FITS::ERRWORD); }
665inline FITS::ValueType FitsKeyword::type() const { return type_; }
666
667inline Bool FitsKeyword::asBool() const { return bval; }
668inline const char *FitsKeyword::asString() const {
669 return vallen ? (const char *)val : ""; }
670inline int FitsKeyword::valStrlen() const { return vallen; }
671inline Int FitsKeyword::asInt() const {
672 if( type() != FITS::LONG ) {
673 cerr << "Unexpected keyword type in FitsKeyword::asInt()\n";
674 exit(1);
675 }
676 return ival;
677}
678inline float FitsKeyword::asFloat() const {
679 switch( type() ) {
680 case FITS::BYTE:
681 case FITS::SHORT:
682 case FITS::LONG: return (float)ival;
683 case FITS::FLOAT: return fval;
684 case FITS::DOUBLE: return (float)dval;
685 default:
686 cerr << "Unexpected keyword type in asFloat()\n";
687 exit(1);
688 }
689 return 0.0;
690}
691inline double FitsKeyword::asDouble() const {
692 switch( type() ) {
693 case FITS::BYTE:
694 case FITS::SHORT:
695 case FITS::LONG: return (double)ival;
696 case FITS::FLOAT: return (double)fval;
697 case FITS::DOUBLE: return dval;
698 default:
699 cerr << "Unexpected keyword type in asDouble()\n";
700 exit(1);
701 }
702 return 0.0;
703}
705 return *((IComplex *)val); }
706inline Complex FitsKeyword::asComplex() const {
707 return *((Complex *)val); }
708inline DComplex FitsKeyword::asDComplex() const {
709 return *((DComplex *)val); }
710
712 bval = x; type_ = FITS::LOGICAL; return *this; }
714 ival = x; type_ = FITS::LONG; return *this; }
716 fval = x; type_ = FITS::FLOAT; return *this; }
718 dval = x; type_ = FITS::DOUBLE; return *this; }
720 *((IComplex *)val) = x; type_ = FITS::ICOMPLEX; return *this; }
722 *((Complex *)val) = x; type_ = FITS::COMPLEX; return *this; }
724 *((DComplex *)val) = x; type_ = FITS::DCOMPLEX; return *this; }
725
726class ConstFitsKeywordList; // forward declaration
727
728//<summary> linked list of FITS keywords </summary>
729// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
730// </reviewed>
731//<synopsis>
732// A linked list of FITS keywords.
733//</synopsis>
734
736 public:
742
743 // Convert the list to a string containing the 80-byte FITS headers.
744 std::string toString() const;
745
746 // delete the current keyword (the thing returned by curr()) from the list
747 void del();
748
749 // Add (make) a reserved keyword with the given value and optional comment
750 // The comment will be truncated if necessary to fit the available space.
751 // String values must be less than 69 characters. String values longer than
752 // that will result in an ERROR keyword instead of the desired keyword.
753 // <group>
754 void mk(FITS::ReservedName k, Bool v, const char *c = 0);
755 void mk(FITS::ReservedName k, const char *v = 0, const char *c = 0);
756 void mk(FITS::ReservedName k, Int v, const char *c = 0);
757 void mk(FITS::ReservedName k, long v, const char *c = 0);
758 void mk(FITS::ReservedName k, double v, const char *c = 0);
759 // </group>
760
761 // Add (make) an indexed reserved keyword with the given value and optional comment
762 // The comment will be truncated if necessary to fit the available space.
763 // String values must be less than 69 characters. String values longer than
764 // that will result in an ERROR keyword instead of the desired keyword.
765 // <group>
766 void mk(int n, FITS::ReservedName k, Bool v, const char *c = 0);
767 void mk(int n, FITS::ReservedName k, const char *v, const char *c = 0);
768 void mk(int n, FITS::ReservedName k, Int v, const char *c = 0);
769 void mk(int n, FITS::ReservedName k, long v, const char *c = 0);
770 void mk(int n, FITS::ReservedName k, double v, const char *c = 0);
771 // </group>
772
773 // Add (make) a user defined keyword with the given name, value and optional comment.
774 // The comment will be truncated if necessary to fit the available space.
775 // The name must be no longer than 8 characters. Names longer than that will
776 // result in an ERROR keyword instead of the desired keyword.
777 // String values must no longer than 69 characters. String values longer than
778 // that will result in an ERROR keyword instead of the desired keyword.
779 // <group>
780 void mk(const char *n, Bool v, const char *c = 0);
781 void mk(const char *n, const char *v = 0, const char *c = 0);
782 void mk(const char *n, Int v, const char *c = 0);
783 void mk(const char *n, long v, const char *c = 0);
784 void mk(const char *n, float v, const char *c = 0);
785 void mk(const char *n, double v, const char *c = 0);
786 void mk(const char *n, Int r, Int i, const char *c = 0);
787 void mk(const char *n, float r, float i, const char *c = 0);
788 void mk(const char *n, double r, double i, const char *c = 0);
789 // </group>
790
791 // add a spaces line
792 void spaces(const char *n = 0, const char *c = 0);
793
794 // add a comment card
795 void comment(const char *n = 0, const char *c = 0);
796
797 // add a history card
798 void history(const char *c = 0);
799
800 // add the end card. This must be at the end of the list.
801 void end();
802
803 // Retrieve specific keywords -- these also set the current mark
804 //<group>
805 // return the i-th keyword -- keyword numbering starts with 0
807 // return first and next non-indexed reserved keyword
810 // return first and next indexed reserved keyword
813 // return first and next user-defined keyword
814 FitsKeyword * operator () (const char *);
815 FitsKeyword * next(const char *);
816 //</group>
817
818 //<group>
819 Bool isempty() const;
820 void first();
821 void last();
824 FitsKeyword *curr();
825 //</group>
826
827 //<group>
828 void delete_all();
833 //</group>
834
835 //<group>
836 // For parsing a single string
837 void parse(const char *, int);
838 int no_parse_errs() const;
839 const char *parse_err(int) const;
840 //</group>
841
843 private:
847 int total;
849 FitsKeyword &make(const char *nm,
850 FITS::ValueType t, const void *v, const char *c);
852 FITS::ValueType t, const void *v, const char *c);
854 FITS::ValueType t, const void *v, const char *c);
855 // construct an error keyword - this happens when a name is invalid (NULL
856 // or more than 8 characters) or a string value is too long (more than
857 // 69 characters). It is the responsibility of the caller to the
858 // several mk functions to ensure that that doesn't happen. By the time
859 // it gets here, it is assumed that such problems are true errors.
860 // This is used by the private make functions.
862 const void *val, const char *errmsg);
864};
865
866ostream & operator << (ostream &o, FitsKeywordList &); // print the entire list
867
868inline FitsKeywordList::FitsKeywordList() : beg_(0), end_(0), pos(0),
869 total(0), cursor(0) { }
871inline Bool FitsKeywordList::isempty() const { return total == 0 ? True : False; }
872inline void FitsKeywordList::first() { cursor = 0; pos = beg_; }
878 int ndx) { first(); return next(n,ndx); }
880 first(); return next(w); }
881inline void FitsKeywordList::parse(const char *s, int l) {
882 insert(card.parse(s,l)); }
883inline int FitsKeywordList::no_parse_errs() const { return card.no_errs();}
884inline const char *FitsKeywordList::parse_err(int n) const {
885 return card.err(n); }
886
887// FitsKeyword constructors for non-indexed Reserved keywords
888inline void FitsKeywordList::mk(FITS::ReservedName k, Bool v, const char *c) {
889 insert(make(k,FITS::LOGICAL,&v,c)); }
890inline void FitsKeywordList::mk(FITS::ReservedName k, const char *v,
891 const char *c) { insert(make(k,FITS::STRING,v,c)); }
892inline void FitsKeywordList::mk(FITS::ReservedName k, Int v, const char *c) {
893 insert(make(k,FITS::LONG,&v,c)); }
894inline void FitsKeywordList::mk(FITS::ReservedName k, long v, const char *c) {
895 insert(make(k,FITS::LONG,&v,c)); }
896inline void FitsKeywordList::mk(FITS::ReservedName k, double v, const char *c) {
897 insert(make(k,FITS::DOUBLE,&v,c)); }
898// FitsKeyword constructors for indexed Reserved keywords
900 const char *c) {
901 Bool tmp; tmp = v; insert(make(n,k,FITS::LOGICAL,&tmp,c)); }
902inline void FitsKeywordList::mk(int n, FITS::ReservedName k, const char *v,
903 const char *c) { insert(make(n,k,FITS::STRING,v,c)); }
905 const char *c) { insert(make(n,k,FITS::LONG,&v,c)); }
906inline void FitsKeywordList::mk(int n, FITS::ReservedName k, long v,
907 const char *c) { insert(make(n,k,FITS::LONG,&v,c)); }
908inline void FitsKeywordList::mk(int n, FITS::ReservedName k, double v,
909 const char *c) { insert(make(n,k,FITS::DOUBLE,&v,c)); }
910// FitsKeyword constructors for User-Defined keywords
911inline void FitsKeywordList::mk(const char *n, Bool v, const char *c) {
912 Bool tmp; tmp = v; insert(make(n,FITS::LOGICAL,&tmp,c)); }
913inline void FitsKeywordList::mk(const char *n, const char *v, const char *c) {
914 insert(make(n,FITS::STRING,v,c)); }
915inline void FitsKeywordList::mk(const char *n, Int v, const char *c) {
916 insert(make(n,FITS::LONG,&v,c)); }
917inline void FitsKeywordList::mk(const char *n, long v, const char *c) {
918 insert(make(n,FITS::LONG,&v,c)); }
919inline void FitsKeywordList::mk(const char *n, float v, const char *c) {
920 insert(make(n,FITS::FLOAT,&v,c)); }
921inline void FitsKeywordList::mk(const char *n, double v, const char *c) {
922 insert(make(n,FITS::DOUBLE,&v,c)); }
923inline void FitsKeywordList::mk(const char *n, Int r, Int i, const char *c) {
924 IComplex v(r,i);
925 insert(make(n,FITS::ICOMPLEX,&v,c)); }
926inline void FitsKeywordList::mk(const char *n, float r, float i, const char *c)
927 { Complex v(r,i); insert(make(n,FITS::COMPLEX,&v,c)); }
928inline void FitsKeywordList::mk(const char *n, double r, double i,
929 const char *c) { DComplex v(r,i);
930 insert(make(n,FITS::DCOMPLEX,&v,c)); }
931// Additional keyword constructors for commentary, etc.
932inline void FitsKeywordList::spaces(const char *n, const char *c) {
933 insert((n == 0 ? make(FITS::SPACES,FITS::NOVALUE,0,c) :
934 (c == 0 ? make(FITS::SPACES,FITS::NOVALUE,0,n) :
935 make(n,FITS::NOVALUE,0,c)))); }
936inline void FitsKeywordList::comment(const char *n, const char *c) {
937 insert((n == 0 ? make(FITS::COMMENT,FITS::NOVALUE,0,c) :
938 (c == 0 ? make(FITS::COMMENT,FITS::NOVALUE,0,n) :
939 make(n,FITS::NOVALUE,0,c)))); }
940inline void FitsKeywordList::history(const char *c) {
944
945//<summary> list of read-only FITS keywords </summary>
946// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
947// </reviewed>
948
950 public:
952
953 const FitsKeyword * operator () (int n) { return kw(n); }
955 return kw(x); }
957 return kw.next(x); }
958 const FitsKeyword * operator () (const FITS::ReservedName &x, int n) {
959 return kw(x,n); }
960 const FitsKeyword * next(const FITS::ReservedName &x, int n) {
961 return kw.next(x,n); }
962 const FitsKeyword * operator () (const char *x) { return kw(x); }
963 const FitsKeyword * next(const char *x) { return kw.next(x); }
964
965 Bool isempty() const { return kw.isempty(); }
966 void first() { kw.first(); }
967 void last() { kw.last(); }
968 const FitsKeyword *next() { return kw.next(); }
969 const FitsKeyword *prev() { return kw.prev(); }
970 const FitsKeyword *curr() { return kw.curr(); }
971
972 private:
974};
975
976//<summary> translator between Keyword lists and fixed FITS cars </summary>
977// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
978// </reviewed>
979//<synopsis>
980// also contains the parser ???
981//</synopsis>
982
984 public:
987 FitsKeywordList & parse(const char *,
989 int build(char *, FitsKeywordList &);
990 int no_errs() const;
991 const char *err(int) const;
992 int err_cardno(int) const;
993 static void fmtcard(char *, const FitsKeyword &);
994 private:
995 int cardno; // the current card number within record
996 static constexpr int FitsCardSize = 80;
997 static constexpr int FitsMaxCard = 36;
998 static constexpr int FitsRecSize = 2880;
1001 const char **err_;
1003 char *blanks;
1004};
1005
1007 delete [] err_; delete [] err_cardno_; delete [] blanks; }
1008inline int FitsKeyCardTranslator::no_errs() const { return no_errs_; }
1009inline const char *FitsKeyCardTranslator::err(int i) const { return err_[i]; }
1010inline int FitsKeyCardTranslator::err_cardno(int i) const {
1011 return err_cardno_[i]; }
1012
1013// <summary>Utility functions for floating point values</summary>
1014// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
1015// </reviewed>
1017{
1018public:
1019 // These functions are useful to tell if some type is a floating point type.
1020 // This is useful in a templated function, where the processing can vary
1021 // depending on whether the type is FP or not (e.g. blank handling).
1022 // <group>
1023 static Bool isFP(const float *);
1024 static Bool isFP(const double *);
1025 static Bool isFP(const void *);
1026 // </group>
1027
1028 // For blanking purposes, we need to be able to get a NaN. The NaN we set
1029 // is all bits on.
1030 // <group>
1031 static void setNaN(double &val);
1032 static void setNaN(float &val);
1033 // </group>
1034};
1035
1036
1037} //# NAMESPACE CASACORE - END
1038
1039# endif
list of read-only FITS keywords
Definition fits.h:949
ConstFitsKeywordList(FitsKeywordList &x)
Definition fits.h:951
const FitsKeyword * curr()
Definition fits.h:970
const FitsKeyword * prev()
Definition fits.h:969
const FitsKeyword * next(const FITS::ReservedName &x, int n)
Definition fits.h:960
const FitsKeyword * next(const FITS::ReservedName &x)
Definition fits.h:956
const FitsKeyword * operator()(int n)
Definition fits.h:953
const FitsKeyword * next()
Definition fits.h:968
FitsKeywordList & kw
Definition fits.h:973
const FitsKeyword * next(const char *x)
Definition fits.h:963
static void defaultHandler(const char *errMessage, ErrorLevel severity)
The default error handler.
static functions and enumerations
Definition fits.h:159
static void l2f(void *, FitsLogical *, int)
static float tenpowerF[39]
Definition fits.h:305
static const int maxsigdigits
Definition fits.h:310
static FITS::ValueType getfitstype(NoConvert< double > x)
Definition fits.h:189
static int get_comment(const char *s, int len, int &begpos)
static FITS::ValueType getfitstype(NoConvert< IComplex > x)
Definition fits.h:193
static const int mindblexp
Definition fits.h:308
static void f2l(short *, void *, int)
static void f2l(DComplex *, void *, int)
static int trim_comment(const char *s, int len)
static void get_numeric(const char *s, int len, FitsValueResult &result)
static const int maxexpdig
Definition fits.h:312
ReservedName
FITS Reserved Names.
Definition fits.h:236
static void l2f(void *, float *, int)
static FITS::ValueType getfitstype(NoConvert< float > x)
Definition fits.h:187
static void f2l(FitsBit *, void *, int)
static void l2f(void *, char *, int)
static Bool isa_text(char c)
Definition fits.h:322
static void swap2(void *, void *, int)
static int str2fstr(char *, const char *, int)
static void l2f(void *, FitsBit *, int)
static void f2l(unsigned char *, void *, int)
static void l2f(void *, IComplex *, int)
static void f2l(FitsVADesc *, void *, int)
static void f2l(Int *, void *, int)
static FITS::ValueType getfitstype(NoConvert< short > x)
Definition fits.h:181
static const double mindouble
Definition fits.h:299
static const int maxdblexp
Definition fits.h:309
static ReservedFitsKeywordCollection & ResWord
Definition fits.h:270
static void f2l(long *, void *, int)
static int fitssize(FITS::ValueType t)
static FITS::ValueType getfitstype(NoConvert< DComplex > x)
Definition fits.h:195
static void swap4(void *, void *, int)
static void l2f(void *, FitsVADesc *, int)
static void l2f(void *, Int *, int)
static void l2f(void *, Complex *, int)
static double tenD(Int, int)
Definition fits.h:328
static int ckaccum(float &, Int, int)
static void f2l(Complex *, void *, int)
FitsRecType
Types of FITS Records.
Definition fits.h:250
@ UnrecognizableRecord
Definition fits.h:252
@ BadBeginningRecord
Definition fits.h:251
@ SpecialRecord
Definition fits.h:252
static FITS::ValueType getfitstype(NoConvert< unsigned char > x)
Definition fits.h:179
static double tenpowerD[309]
Definition fits.h:304
ValueType
FITS I/O Error message types.
Definition fits.h:165
static FITS::ValueType getfitstype(NoConvert< FitsVADesc > x)
Definition fits.h:197
static Bool isa_letter(char)
Definition fits.h:323
static void fstr2str(char *, const char *, int)
static FITS::ValueType getfitstype(NoConvert< FitsBit > x)
Definition fits.h:175
static const float minfloat
Definition fits.h:297
static void l2f(void *, long *, int)
static FITS::ValueType getfitstype(NoConvert< Complex > x)
Definition fits.h:191
static void l2f(void *, double *, int)
static const int minfltexp
Definition fits.h:306
static FITS::ValueType getfitstype(NoConvert< FitsLogical > x)
STRING and FSTRING are used internally in parsing keywords.
Definition fits.h:173
static float tenF(Int, int)
Definition fits.h:332
static FITS::ValueType getfitstype(NoConvert< Int > x)
Definition fits.h:183
static void valstr(ostream &o, const ValueType &ty, const void *val)
static void f2l(IComplex *, void *, int)
static void l2f(void *, DComplex *, int)
static void f2l(char *, void *, int)
static const Int maxInt
Definition fits.h:296
static int ckaccum(double &, Int, int)
static int get_value_id(const char *s, int l, int &pos)
FitsArrayOption
Options on FITS array manipulations.
Definition fits.h:268
static Bool isa_digit(char c)
Definition fits.h:320
static const double maxdouble
Definition fits.h:300
static const int maxfltexp
Definition fits.h:307
static void l2f(void *, short *, int)
static FITS::ValueType getfitstype(NoConvert< long > x)
Definition fits.h:185
static const float maxfloat
Definition fits.h:298
static void get_value(const char *s, int len, FitsValueResult &result)
static int chk_comment(const char *s, int len)
static const int maxdigl
Definition fits.h:311
static void parse_vatform(const char *s, FITS::ValueType &valType, int &maxelem)
utility function to parse the binary table variable array column (i.e.
static void l2f(void *, unsigned char *, int)
HDUType
Types of FITS Header-Data Units.
Definition fits.h:261
@ ImageExtensionHDU
Definition fits.h:263
@ PrimaryGroupHDU
Definition fits.h:262
@ AsciiTableHDU
Definition fits.h:262
@ BinaryTableHDU
Definition fits.h:263
@ PrimaryTableHDU
Definition fits.h:264
@ PrimaryArrayHDU
Definition fits.h:262
@ UnknownExtensionHDU
Definition fits.h:263
static void get_name(const char *s, int len, FitsNameResult &result)
static void f2l(FitsLogical *, void *, int)
data conversion routines: FITS - local
FitsDevice
Supported FITS Physical Devices.
Definition fits.h:256
static void swap8(void *, void *, int)
static int digit2bin(char c)
Definition fits.h:321
static int localsize(FITS::ValueType t)
static void f2l(float *, void *, int)
static void f2l(double *, void *, int)
static int letter2bin(char)
Definition fits.h:324
static const Int minInt
Definition fits.h:295
static FITS::ValueType getfitstype(NoConvert< char > x)
Definition fits.h:177
helper class for FITS Binary Tables
Definition fits.h:114
FitsBit(unsigned char x)
Definition fits.h:117
unsigned char bit_array
Definition fits.h:121
FitsBit & operator=(unsigned char x)
Definition fits.h:118
Utility functions for floating point values.
Definition fits.h:1017
static void setNaN(float &val)
static Bool isFP(const double *)
static Bool isFP(const float *)
These functions are useful to tell if some type is a floating point type.
static Bool isFP(const void *)
static void setNaN(double &val)
For blanking purposes, we need to be able to get a NaN.
translator between Keyword lists and fixed FITS cars
Definition fits.h:983
static constexpr int FitsCardSize
Definition fits.h:996
static void fmtcard(char *, const FitsKeyword &)
static constexpr int FitsRecSize
Definition fits.h:998
int err_cardno(int) const
Definition fits.h:1010
FitsKeywordList & parse(const char *, FitsKeywordList &, int, FITSErrorHandler, Bool)
int build(char *, FitsKeywordList &)
static constexpr int FitsMaxCard
Definition fits.h:997
const char * err(int) const
Definition fits.h:1009
linked list of FITS keywords
Definition fits.h:735
void end()
add the end card.
Definition fits.h:942
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
int rules(FitsKeyword &, FITSErrorHandler errhandler=FITSError::defaultHandler)
FitsKeyword * pos
Definition fits.h:846
FitsKeyword * beg_
Definition fits.h:844
int rules(FITSErrorHandler errhandler=FITSError::defaultHandler)
FitsKeyword * operator()(int)
Retrieve specific keywords – these also set the current mark.
FitsKeyword & make(const char *nm, FITS::ValueType t, const void *v, const char *c)
FitsKeyword * next(const FITS::ReservedName &)
void parse(const char *, int)
For parsing a single string.
Definition fits.h:881
std::string toString() const
Convert the list to a string containing the 80-byte FITS headers.
FitsKeyword * curr()
Definition fits.h:874
int no_parse_errs() const
Definition fits.h:883
Bool isempty() const
Definition fits.h:871
FitsKeywordList & operator=(const FitsKeywordList &)
void spaces(const char *n=0, const char *c=0)
add a spaces line
Definition fits.h:932
void del()
delete the current keyword (the thing returned by curr()) from the list
const char * parse_err(int) const
Definition fits.h:884
void insert(FitsKeyword &)
void comment(const char *n=0, const char *c=0)
add a comment card
Definition fits.h:936
FitsKeyword * next(const FITS::ReservedName &, int)
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 ...
FitsKeyword & make(FITS::ReservedName nm, FITS::ValueType t, const void *v, const char *c)
FitsKeywordList(const FitsKeywordList &)
FitsKeyword * next(const char *)
FitsKeyword & make(int ind, FITS::ReservedName nm, FITS::ValueType t, const void *v, const char *c)
void history(const char *c=0)
add a history card
Definition fits.h:940
FitsKeywordList(ConstFitsKeywordList &)
FitsKeyword * end_
Definition fits.h:845
FITS keyword.
Definition fits.h:513
FitsKeyword(const FitsKeyword &)
A word about friends: FitsKeywordList accesses the next and prev pointers and the FitsKeyword constru...
Definition fits.h:641
Bool asBool() const
access the value of the keyword
Definition fits.h:667
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
const char * comm() const
access the keyword comment
Definition fits.h:661
const ReservedFitsKeyword * kw_
Definition fits.h:589
FitsKeyword(const char *, int, FITS::ValueType, const void *, int, const char *, int)
private constructors for use by friends
const ReservedFitsKeyword & kw() const
Definition fits.h:651
char * comm_
the keyword comment if comm_ is 0, there is no comment
Definition fits.h:597
void init(const FitsKeyword &)
FitsKeyword & operator=(const FitsKeyword &)
Definition fits.h:643
double asDouble() const
Definition fits.h:691
FitsKeyword * prev_
Definition fits.h:582
void setval(const FITS::ValueType &, const void *, int)
Int asInt() const
Definition fits.h:671
Bool isindexed() const
Definition fits.h:658
int namelen() const
Definition fits.h:657
static void err(const char *, const FITS::ValueType &, const void *, const char *)
void name(const char *)
change the name of the keyword
FITS::ValueType type() const
the datatype of the keyword
Definition fits.h:665
const char * asString() const
Definition fits.h:668
FITS::ValueType type_
the keyword value
Definition fits.h:604
int commlen() const
Definition fits.h:663
float asFloat() const
Definition fits.h:678
const void * value() const
void setcomm(const char *, int)
static void memchk(void *)
Bool isreserved() const
Definition fits.h:652
int valStrlen() const
Definition fits.h:670
int err() const
access the error status
Definition fits.h:664
const char * name() const
get info about the name
Definition fits.h:655
DComplex asDComplex() const
Definition fits.h:708
void comm(const char *)
change the comment of the keyword
FitsKeyword * next_
Definition fits.h:581
int index() const
Definition fits.h:659
IComplex asIComplex() const
Definition fits.h:704
FitsKeyword(const ReservedFitsKeyword *, int, FITS::ValueType, const void *, int, const char *, int)
constructs reserved keywords parms: resword, index, val, vallen, comm, commlen
Complex asComplex() const
Definition fits.h:706
FITS helper class.
Definition fits.h:88
friend ostream & operator<<(ostream &o, const FitsLogical &)
void undefine()
ARO 2021-02-20: Removed the following function, because it seems incorrectly implemented and isn't us...
Definition fits.h:98
FitsLogical & operator=(Bool x)
Definition fits.h:93
FitsLogical(Bool x)
Definition fits.h:92
analyse the name of a header card
Definition fits.h:438
parse a header card
Definition fits.h:485
const char * err(int) const
Definition fits.h:503
int no_errs() const
Definition fits.h:502
int seterr(const char *)
Definition fits.h:504
FitsKeyword & parse(const char *, int)
const char ** err_
Definition fits.h:496
const int max_errs
Definition fits.h:495
FitsKeyword & mkerr(const char *s, int len)
Variable Length Array Descriptor.
Definition fits.h:128
friend ostream & operator<<(ostream &o, const FitsVADesc &)
FitsVADesc & operator=(const FitsVADesc &x)
Definition fits.h:134
int num() const
Definition fits.h:139
FitsVADesc(int n, int o)
Definition fits.h:137
FitsVADesc(const FitsVADesc &x)
Definition fits.h:132
int offset() const
Definition fits.h:140
void set(int n, int o)
Definition fits.h:138
analyse the value of a header card
Definition fits.h:457
const char * errmsg
Definition fits.h:475
FITS::ValueType type
Definition fits.h:459
void operator=(int)
Definition fits.h:64
collection of reserved FITS keywords
Definition fits.h:375
static const ReservedFitsKeyword & user_def_item
Definition fits.h:400
const ReservedFitsKeyword & history() const
Definition fits.h:428
int essential_name(const char *, int) const
const ReservedFitsKeyword & operator[](int i) const
Definition fits.h:414
const ReservedFitsKeyword & comment() const
Definition fits.h:426
static const ReservedFitsKeyword & error_item
Definition fits.h:401
const ReservedFitsKeyword & get_essential(int, Bool, FITS::ValueType, const void *, int, const char *&) const
const ReservedFitsKeyword & get(FITS::ReservedName, Bool, FITS::ValueType, const void *, int, const char *&) const
const ReservedFitsKeyword & end_item() const
Definition fits.h:422
const ReservedFitsKeyword & match(int, const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
static const ReservedFitsKeyword & history_item
Definition fits.h:405
static const int resalpha[26]
Definition fits.h:407
static const ReservedFitsKeyword & comment_item
Definition fits.h:404
const char * aname(FITS::ReservedName) const
int rules(const ReservedFitsKeyword &, const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
const ReservedFitsKeyword & err_item() const
Definition fits.h:420
int isreserved(const char *, int) const
const ReservedFitsKeyword & get(const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
const ReservedFitsKeyword & userdef_item() const
Definition fits.h:418
const ReservedFitsKeyword & spaces() const
Definition fits.h:424
static const ReservedFitsKeyword resword[]
Definition fits.h:406
static const ReservedFitsKeyword & end__item
Definition fits.h:402
static const ReservedFitsKeyword & spaces_item
Definition fits.h:403
reserved FITS keyword
Definition fits.h:341
FITS::ValueType type() const
Definition fits.h:366
FITS::ReservedName name_
Definition fits.h:356
Bool isessential() const
Definition fits.h:368
FITS::ValueType type_
Definition fits.h:359
const char * aname() const
Definition fits.h:364
FITS::ReservedName name() const
void(* FITSErrorHandler)(const char *errMessage, FITSError::ErrorLevel severity)
Define a typedef for the handler function signature for convenience.
Definition FITSError.h:108
this file contains all the compiler specific defines
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:42
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
int FitsLong
All FITS code seems to assume longs are 4 bytes.
Definition aipsxtype.h:41
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
const Bool True
Definition aipstype.h:41