casacore
Loading...
Searching...
No Matches
casacore::FITS Class Reference

static functions and enumerations More...

#include <fits.h>

Public Types

enum  ValueType {
  NOVALUE ,
  LOGICAL ,
  BIT ,
  CHAR ,
  BYTE ,
  SHORT ,
  LONG ,
  FLOAT ,
  DOUBLE ,
  COMPLEX ,
  ICOMPLEX ,
  DCOMPLEX ,
  VADESC ,
  STRING ,
  FSTRING ,
  REAL
}
 FITS I/O Error message types. More...
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
}
 FITS Reserved Names. More...
enum  FitsRecType {
  InitialState ,
  BadBeginningRecord ,
  HDURecord ,
  UnrecognizableRecord ,
  SpecialRecord ,
  EndOfFile
}
 Types of FITS Records. More...
enum  FitsDevice {
  Disk ,
  Std ,
  Tape9
}
 Supported FITS Physical Devices. More...
enum  HDUType {
  NotAHDU ,
  PrimaryArrayHDU ,
  PrimaryGroupHDU ,
  AsciiTableHDU ,
  BinaryTableHDU ,
  ImageExtensionHDU ,
  UnknownExtensionHDU ,
  PrimaryTableHDU
}
 Types of FITS Header-Data Units. More...
enum  FitsArrayOption {
  NoOpt ,
  CtoF ,
  FtoC
}
 Options on FITS array manipulations. More...

Static Public Member Functions

static FITS::ValueType getfitstype (NoConvert< FitsLogical > x)
 STRING and FSTRING are used internally in parsing keywords.
static FITS::ValueType getfitstype (NoConvert< FitsBit > x)
static FITS::ValueType getfitstype (NoConvert< char > x)
static FITS::ValueType getfitstype (NoConvert< unsigned char > x)
static FITS::ValueType getfitstype (NoConvert< short > x)
static FITS::ValueType getfitstype (NoConvert< Int > x)
static FITS::ValueType getfitstype (NoConvert< long > x)
static FITS::ValueType getfitstype (NoConvert< float > x)
static FITS::ValueType getfitstype (NoConvert< double > x)
static FITS::ValueType getfitstype (NoConvert< Complex > x)
static FITS::ValueType getfitstype (NoConvert< IComplex > x)
static FITS::ValueType getfitstype (NoConvert< DComplex > x)
static FITS::ValueType getfitstype (NoConvert< FitsVADesc > x)
static int fitssize (FITS::ValueType t)
static int localsize (FITS::ValueType t)
static void f2l (FitsLogical *, void *, int)
 data conversion routines: FITS - local
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)
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)
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 Public Attributes

static ReservedFitsKeywordCollectionResWord
static constexpr Int minInt
static constexpr Int maxInt
static constexpr float minfloat
static constexpr float maxfloat
static constexpr double mindouble
static constexpr double maxdouble

Private Member Functions

 FITS ()

Static Private Member Functions

static double tenD (Int, int)
static float tenF (Int, int)
static int ckaccum (double &, Int, int)
static int ckaccum (float &, Int, int)

Static Private Attributes

static constexpr double tenpowerD [309]
static constexpr float tenpowerF [39]
static constexpr int minfltexp
static constexpr int maxfltexp
static constexpr int mindblexp
static constexpr int maxdblexp
static constexpr int maxsigdigits
static constexpr int maxdigl
static constexpr int maxexpdig

Detailed Description

static functions and enumerations

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

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 NAXIS keyword, FITS::NAXIS should be used

Definition at line 161 of file fits.h.

Member Enumeration Documentation

◆ FitsArrayOption

Options on FITS array manipulations.

Enumerator
NoOpt 
CtoF 
FtoC 

Definition at line 270 of file fits.h.

◆ FitsDevice

Supported FITS Physical Devices.

Enumerator
Disk 
Std 
Tape9 

Definition at line 258 of file fits.h.

◆ FitsRecType

Types of FITS Records.

Enumerator
InitialState 
BadBeginningRecord 
HDURecord 
UnrecognizableRecord 
SpecialRecord 
EndOfFile 

Definition at line 252 of file fits.h.

◆ HDUType

Types of FITS Header-Data Units.

Enumerator
NotAHDU 
PrimaryArrayHDU 
PrimaryGroupHDU 
AsciiTableHDU 
BinaryTableHDU 
ImageExtensionHDU 
UnknownExtensionHDU 
PrimaryTableHDU 

Definition at line 263 of file fits.h.

◆ ReservedName

FITS Reserved Names.

PZERO is named strangely because it can conflict with a standard #define in sys/param.h.

Enumerator
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 

Definition at line 238 of file fits.h.

◆ ValueType

FITS I/O Error message types.

Basic FITS Data Types for keywords and data

Enumerator
NOVALUE 
LOGICAL 
BIT 
CHAR 
BYTE 
SHORT 
LONG 
FLOAT 
DOUBLE 
COMPLEX 
ICOMPLEX 
DCOMPLEX 
VADESC 
STRING 
FSTRING 
REAL 

Definition at line 167 of file fits.h.

Constructor & Destructor Documentation

◆ FITS()

casacore::FITS::FITS ( )
inlineprivate

Definition at line 365 of file fits.h.

Member Function Documentation

◆ chk_comment()

int casacore::FITS::chk_comment ( const char * s,
int len )
static

◆ ckaccum() [1/2]

int casacore::FITS::ckaccum ( double & ,
Int ,
int  )
staticprivate

◆ ckaccum() [2/2]

int casacore::FITS::ckaccum ( float & ,
Int ,
int  )
staticprivate

◆ digit2bin()

int casacore::FITS::digit2bin ( char c)
inlinestatic

Definition at line 367 of file fits.h.

◆ f2l() [1/13]

void casacore::FITS::f2l ( char * ,
void * ,
int  )
static

◆ f2l() [2/13]

void casacore::FITS::f2l ( Complex * ,
void * ,
int  )
static

◆ f2l() [3/13]

void casacore::FITS::f2l ( DComplex * ,
void * ,
int  )
static

◆ f2l() [4/13]

void casacore::FITS::f2l ( double * ,
void * ,
int  )
static

◆ f2l() [5/13]

void casacore::FITS::f2l ( FitsBit * ,
void * ,
int  )
static

◆ f2l() [6/13]

void casacore::FITS::f2l ( FitsLogical * ,
void * ,
int  )
static

data conversion routines: FITS - local

◆ f2l() [7/13]

void casacore::FITS::f2l ( FitsVADesc * ,
void * ,
int  )
static

◆ f2l() [8/13]

void casacore::FITS::f2l ( float * ,
void * ,
int  )
static

◆ f2l() [9/13]

void casacore::FITS::f2l ( IComplex * ,
void * ,
int  )
static

◆ f2l() [10/13]

void casacore::FITS::f2l ( Int * ,
void * ,
int  )
static

◆ f2l() [11/13]

void casacore::FITS::f2l ( long * ,
void * ,
int  )
static

◆ f2l() [12/13]

void casacore::FITS::f2l ( short * ,
void * ,
int  )
static

◆ f2l() [13/13]

void casacore::FITS::f2l ( unsigned char * ,
void * ,
int  )
static

◆ fitssize()

int casacore::FITS::fitssize ( FITS::ValueType t)
static

◆ fstr2str()

void casacore::FITS::fstr2str ( char * ,
const char * ,
int  )
static

◆ get_comment()

int casacore::FITS::get_comment ( const char * s,
int len,
int & begpos )
static

◆ get_name()

void casacore::FITS::get_name ( const char * s,
int len,
FitsNameResult & result )
static

◆ get_numeric()

void casacore::FITS::get_numeric ( const char * s,
int len,
FitsValueResult & result )
static

◆ get_value()

void casacore::FITS::get_value ( const char * s,
int len,
FitsValueResult & result )
static

◆ get_value_id()

int casacore::FITS::get_value_id ( const char * s,
int l,
int & pos )
static

◆ getfitstype() [1/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< char > x)
inlinestatic

Definition at line 179 of file fits.h.

References CHAR.

◆ getfitstype() [2/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< Complex > x)
inlinestatic

Definition at line 193 of file fits.h.

References COMPLEX.

◆ getfitstype() [3/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< DComplex > x)
inlinestatic

Definition at line 197 of file fits.h.

References DCOMPLEX.

◆ getfitstype() [4/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< double > x)
inlinestatic

Definition at line 191 of file fits.h.

References DOUBLE.

◆ getfitstype() [5/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< FitsBit > x)
inlinestatic

Definition at line 177 of file fits.h.

References BIT.

◆ getfitstype() [6/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< FitsLogical > x)
inlinestatic

STRING and FSTRING are used internally in parsing keywords.

Definition at line 175 of file fits.h.

References LOGICAL.

◆ getfitstype() [7/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< FitsVADesc > x)
inlinestatic

Definition at line 199 of file fits.h.

References VADESC.

◆ getfitstype() [8/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< float > x)
inlinestatic

Definition at line 189 of file fits.h.

References FLOAT.

◆ getfitstype() [9/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< IComplex > x)
inlinestatic

Definition at line 195 of file fits.h.

References ICOMPLEX.

◆ getfitstype() [10/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< Int > x)
inlinestatic

Definition at line 185 of file fits.h.

References LONG.

◆ getfitstype() [11/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< long > x)
inlinestatic

Definition at line 187 of file fits.h.

References LONG.

◆ getfitstype() [12/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< short > x)
inlinestatic

Definition at line 183 of file fits.h.

References SHORT.

◆ getfitstype() [13/13]

FITS::ValueType casacore::FITS::getfitstype ( NoConvert< unsigned char > x)
inlinestatic

Definition at line 181 of file fits.h.

References BYTE.

◆ isa_digit()

Bool casacore::FITS::isa_digit ( char c)
inlinestatic

Definition at line 366 of file fits.h.

References casacore::False, and casacore::True.

◆ isa_letter()

Bool casacore::FITS::isa_letter ( char c)
inlinestatic

Definition at line 369 of file fits.h.

References casacore::False, and casacore::True.

◆ isa_text()

Bool casacore::FITS::isa_text ( char c)
inlinestatic

Definition at line 368 of file fits.h.

References casacore::False, and casacore::True.

◆ l2f() [1/13]

void casacore::FITS::l2f ( void * ,
char * ,
int  )
static

◆ l2f() [2/13]

void casacore::FITS::l2f ( void * ,
Complex * ,
int  )
static

◆ l2f() [3/13]

void casacore::FITS::l2f ( void * ,
DComplex * ,
int  )
static

◆ l2f() [4/13]

void casacore::FITS::l2f ( void * ,
double * ,
int  )
static

◆ l2f() [5/13]

void casacore::FITS::l2f ( void * ,
FitsBit * ,
int  )
static

◆ l2f() [6/13]

void casacore::FITS::l2f ( void * ,
FitsLogical * ,
int  )
static

◆ l2f() [7/13]

void casacore::FITS::l2f ( void * ,
FitsVADesc * ,
int  )
static

◆ l2f() [8/13]

void casacore::FITS::l2f ( void * ,
float * ,
int  )
static

◆ l2f() [9/13]

void casacore::FITS::l2f ( void * ,
IComplex * ,
int  )
static

◆ l2f() [10/13]

void casacore::FITS::l2f ( void * ,
Int * ,
int  )
static

◆ l2f() [11/13]

void casacore::FITS::l2f ( void * ,
long * ,
int  )
static

◆ l2f() [12/13]

void casacore::FITS::l2f ( void * ,
short * ,
int  )
static

◆ l2f() [13/13]

void casacore::FITS::l2f ( void * ,
unsigned char * ,
int  )
static

◆ letter2bin()

int casacore::FITS::letter2bin ( char c)
inlinestatic

Definition at line 370 of file fits.h.

◆ localsize()

int casacore::FITS::localsize ( FITS::ValueType t)
static

◆ parse_vatform()

void casacore::FITS::parse_vatform ( const char * s,
FITS::ValueType & valType,
int & maxelem )
static

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.

◆ str2fstr()

int casacore::FITS::str2fstr ( char * ,
const char * ,
int  )
static

◆ swap2()

void casacore::FITS::swap2 ( void * ,
void * ,
int  )
static

◆ swap4()

void casacore::FITS::swap4 ( void * ,
void * ,
int  )
static

◆ swap8()

void casacore::FITS::swap8 ( void * ,
void * ,
int  )
static

◆ tenD()

double casacore::FITS::tenD ( Int numb,
int pow )
inlinestaticprivate

Definition at line 374 of file fits.h.

References casacore::pow(), and tenpowerD.

◆ tenF()

float casacore::FITS::tenF ( Int numb,
int pow )
inlinestaticprivate

Definition at line 378 of file fits.h.

References casacore::pow(), and tenpowerF.

◆ trim_comment()

int casacore::FITS::trim_comment ( const char * s,
int len )
static

◆ valstr()

void casacore::FITS::valstr ( ostream & o,
const ValueType & ty,
const void * val )
static

Member Data Documentation

◆ maxdblexp

int casacore::FITS::maxdblexp
staticconstexprprivate

Definition at line 355 of file fits.h.

◆ maxdigl

int casacore::FITS::maxdigl
staticconstexprprivate

Definition at line 357 of file fits.h.

◆ maxdouble

double casacore::FITS::maxdouble
staticconstexpr

Definition at line 302 of file fits.h.

◆ maxexpdig

int casacore::FITS::maxexpdig
staticconstexprprivate

Definition at line 358 of file fits.h.

◆ maxfloat

float casacore::FITS::maxfloat
staticconstexpr

Definition at line 300 of file fits.h.

◆ maxfltexp

int casacore::FITS::maxfltexp
staticconstexprprivate

Definition at line 353 of file fits.h.

◆ maxInt

Int casacore::FITS::maxInt
staticconstexpr

Definition at line 298 of file fits.h.

◆ maxsigdigits

int casacore::FITS::maxsigdigits
staticconstexprprivate

Definition at line 356 of file fits.h.

◆ mindblexp

int casacore::FITS::mindblexp
staticconstexprprivate

Definition at line 354 of file fits.h.

◆ mindouble

double casacore::FITS::mindouble
staticconstexpr

Definition at line 301 of file fits.h.

◆ minfloat

float casacore::FITS::minfloat
staticconstexpr

Definition at line 299 of file fits.h.

◆ minfltexp

int casacore::FITS::minfltexp
staticconstexprprivate

Definition at line 352 of file fits.h.

◆ minInt

Int casacore::FITS::minInt
staticconstexpr

Definition at line 297 of file fits.h.

◆ ResWord

ReservedFitsKeywordCollection& casacore::FITS::ResWord
static

Definition at line 272 of file fits.h.

◆ tenpowerD

double casacore::FITS::tenpowerD[309]
staticconstexprprivate

Definition at line 306 of file fits.h.

Referenced by tenD().

◆ tenpowerF

float casacore::FITS::tenpowerF[39]
staticconstexprprivate

Definition at line 346 of file fits.h.

Referenced by tenF().


The documentation for this class was generated from the following file: