casacore
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
casacore::PrimaryTable< TYPE > Class Template Reference

Primary Table structure. More...

#include <hdu.h>

Public Types

typedef TYPE ElementType
 
- Public Types inherited from casacore::PrimaryArray< TYPE >
typedef TYPE ElementType
 
- Public Types inherited from casacore::HeaderDataUnit
enum  HDUErrs {
  OK ,
  NOMEM ,
  MISSKEY ,
  BADBITPIX ,
  NOAXISN ,
  NOPCOUNT ,
  NOGCOUNT ,
  BADPCOUNT ,
  BADGCOUNT ,
  NOGROUPS ,
  BADNAXIS ,
  BADREC ,
  BADTYPE ,
  BADRULES ,
  BADSIZE ,
  BADOPER ,
  BADCONV ,
  BADIO
}
 error handling and error codes that can be returned More...
 

Public Member Functions

 PrimaryTable (FitsInput &, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 PrimaryTable (FitsKeywordList &, FITSErrorHandler errhandler=FITSError::defaultHandler)
 
 PrimaryTable (FITSErrorHandler errhandler=FITSError::defaultHandler)
 constructor for header consisted required keywords only
More...
 
 ~PrimaryTable ()
 
int write_priTable_hdr (FitsOutput &fout, int bitpix, int naxis, long *naxes)
 write required keywords for PrimaryTable More...
 
int read ()
 The ‘read()’ and ‘write()’ functions control reading and writing data from the external FITS I/O medium into the FITS array. More...
 
int read (int)
 
int write (FitsOutput &)
 
char * object () const
 
char * telescop () const
 
char * instrume () const
 
char * dateobs () const
 
char * datemap () const
 
char * bunit () const
 
float bscal () const
 
float bzero () const
 
float equinox () const
 
float altrpix () const
 
- Public Member Functions inherited from casacore::PrimaryArray< TYPE >
 PrimaryArray (FitsInput &, FITSErrorHandler=FITSError::defaultHandler)
 constructor from a FitsInput More...
 
 PrimaryArray (FitsKeywordList &, FITSErrorHandler=FITSError::defaultHandler)
 constructor from a FitsKeywordList More...
 
 PrimaryArray (FITSErrorHandler=FITSError::defaultHandler)
 constructor does not require a FitsKeywordList. More...
 
virtual ~PrimaryArray ()
 destructor More...
 
double bscale () const
 General access routines for a primary array. More...
 
double bzero () const
 
char * bunit () const
 
Bool isablank () const
 
Int blank () const
 
char * ctype (int n) const
 
double crpix (int n) const
 
double crota (int n) const
 
double crval (int n) const
 
double cdelt (int n) const
 
double datamax () const
 
double datamin () const
 
OFF_T nelements () const
 
double operator() (int, int, int, int, int) const
 The overloaded operator functions ‘()’ all return physical data, i. More...
 
double operator() (int, int, int, int) const
 
double operator() (int, int, int) const
 
double operator() (int, int) const
 
double operator() (int) const
 
TYPE & data (int, int, int, int, int)
 The various ‘data()’ functions allow one to access and set the raw data itself. More...
 
TYPE & data (int, int, int, int)
 
TYPE & data (int, int, int)
 
TYPE & data (int, int)
 
TYPE & data (int)
 
int store (const TYPE *source, FITS::FitsArrayOption=FITS::NoOpt)
 The ‘store()’, ‘move()’ and ‘copy()’ functions allow bulk data transfer between the internal FITS array and an external data storage area. More...
 
void copy (double *target, FITS::FitsArrayOption=FITS::NoOpt) const
 
void copy (float *target, FITS::FitsArrayOption=FITS::NoOpt) const
 
void move (TYPE *target, FITS::FitsArrayOption=FITS::NoOpt) const
 
int store (const TYPE *source, int npixels)
 Use these versions if you are reading/writing "chunk by chunk. More...
 
void copy (double *target, int npixels) const
 
void copy (float *target, int npixels) const
 
void move (TYPE *target, int npixels) const
 
int write_priArr_hdr (FitsOutput &fout, int simple, int bitpix, int naxis, long naxes[], int extend)
 
virtual OFF_T set_next (OFF_T)
 
- Public Member Functions inherited from casacore::HeaderDataUnit
virtual ~HeaderDataUnit ()
 
Int dims () const
 
Int dim (int n) const
 
OFF_T fitsdatasize () const
 
FITS::ValueType datatype () const
 
Int fitsitemsize () const
 
Int localitemsize () const
 
FITS::HDUType hdutype () const
 
int err () const
 
int skip (uInt n)
 skipping one or more HDU's More...
 
int skip ()
 
int write_hdr (FitsOutput &)
 write the current header More...
 
ConstFitsKeywordListkwlist ()
 Operations on the HDU's keyword list. More...
 
Vector< Stringkwlist_str (Bool length80=False)
 return the header of the chdu as a vector of String. More...
 
void firstkw ()
 
void lastkw ()
 
const FitsKeywordnextkw ()
 
const FitsKeywordprevkw ()
 
const FitsKeywordcurrkw ()
 
const FitsKeywordkw (int n)
 
const FitsKeywordkw (const FITS::ReservedName &n)
 
const FitsKeywordnextkw (FITS::ReservedName &n)
 
const FitsKeywordkw (FITS::ReservedName &n, int i)
 
const FitsKeywordnextkw (FITS::ReservedName &n, int i)
 
const FitsKeywordkw (const char *n)
 
const FitsKeywordnextkw (const char *n)
 
void mk (FITS::ReservedName k, Bool v, const char *c=0)
 
void mk (FITS::ReservedName k, const char *v=0, const char *c=0)
 
void mk (FITS::ReservedName k, Int v, const char *c=0)
 
void mk (FITS::ReservedName k, double v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, Bool v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, const char *v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, Int v, const char *c=0)
 
void mk (int n, FITS::ReservedName k, double v, const char *c=0)
 
void mk (const char *n, Bool v, const char *c=0)
 
void mk (const char *n, const char *v=0, const char *c=0)
 
void mk (const char *n, Int v, const char *c=0)
 
void mk (const char *n, float v, const char *c=0)
 
void mk (const char *n, double v, const char *c=0)
 
void mk (const char *n, Int r, Int i, const char *c=0)
 
void mk (const char *n, float r, float i, const char *c=0)
 
void mk (const char *n, double r, double i, const char *c=0)
 
void spaces (const char *n=0, const char *c=0)
 
void comment (const char *n=0, const char *c=0)
 
void history (const char *c=0)
 
Bool notnull (double x) const
 
Bool notnull (char *s) const
 
Bool notnull (Int l) const
 
int get_hdr (FITS::HDUType, FitsKeywordList &)
 
int read_data (char *, Int)
 
int write_data (FitsOutput &, char *, Int)
 
OFF_T read_all_data (char *)
 
int write_all_data (FitsOutput &, char *)
 

Protected Attributes

char * object_x
 
char * telescop_x
 
char * instrume_x
 
char * dateobs_x
 
char * datemap_x
 
Float bscale_x
 
Float bzero_x
 
char * bunit_x
 
Float equinox_x
 
Float altrpix_x
 
- Protected Attributes inherited from casacore::PrimaryArray< TYPE >
double bscale_x
 
double bzero_x
 
char * bunit_x
 
Bool isablank_x
 
Int blank_x
 
char ** ctype_x
 
double * crpix_x
 
double * crota_x
 
double * crval_x
 
double * cdelt_x
 
double datamax_x
 
double datamin_x
 
OFF_T totsize
 
int * factor
 
OFF_T alloc_elems
 
OFF_T beg_elem
 
OFF_T end_elem
 
TYPE * array
 the allocated array More...
 
- Protected Attributes inherited from casacore::HeaderDataUnit
FitsKeywordListkwlist_
 
ConstFitsKeywordList constkwlist_
 
FitsInputfin
 
FITSErrorHandler errfn
 
HDUErrs err_status
 
Int no_dims
 
Intdimn
 
OFF_T fits_data_size
 uInt fits_data_size; // size in bytes of total amount of data More...
 
FITS::ValueType data_type
 
Int fits_item_size
 
Int local_item_size
 
FITS::HDUType hdu_type
 
char pad_char
 
double double_null
 
char char_null
 
Int Int_null
 

Private Member Functions

void pt_assign ()
 

Additional Inherited Members

- Static Public Member Functions inherited from casacore::HeaderDataUnit
static Bool determine_type (FitsKeywordList &, FITS::HDUType &, FITS::ValueType &, FITSErrorHandler, HDUErrs &)
 Determines the HDU type and the data type Parameterss: keyword list, hdu type, data type, error handler and error status. More...
 
static Bool compute_size (FitsKeywordList &, OFF_T &, Int &, FITS::HDUType &, FITS::ValueType &, FITSErrorHandler, HDUErrs &)
 Compute the total size of the data associated with an HDU. More...
 
- Protected Member Functions inherited from casacore::PrimaryArray< TYPE >
 PrimaryArray (FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 construct from a FitsInput with given HDU type More...
 
 PrimaryArray (FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 construct from a FitsKeywordList with given HDU type More...
 
 PrimaryArray (FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 construct witout FitsKeywordList for given HDU type(for ImageExtension and PrimaryGroup) More...
 
int offset (int, int) const
 compute a linear offset from array indicies More...
 
int offset (int, int, int) const
 
int offset (int, int, int, int) const
 
int offset (int, int, int, int, int) const
 
void pa_assign ()
 
- Protected Member Functions inherited from casacore::HeaderDataUnit
 HeaderDataUnit (FitsInput &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler)
 For input – ~ should delete the keyword list: kwflag = 1. More...
 
 HeaderDataUnit (FitsKeywordList &, FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler, FitsInput *=0)
 For output – ~ should not delete keyword list: kwflag = 0 07/21/98 AKH Clarification: HeaderDataUnit has a copy of the FitsKeywordList, and should delete it. More...
 
 HeaderDataUnit (FITS::HDUType, FITSErrorHandler errhandler=FITSError::defaultHandler, FitsInput *=0)
 constructor for objects that write only required keyword to fits file. More...
 
bool init_data_unit (FITS::HDUType t)
 for write required keywords only to use. More...
 
void posEnd ()
 
void errmsg (HDUErrs, const char *)
 
char * assign (FITS::ReservedName)
 
char * assign (FITS::ReservedName, int)
 
double asgdbl (FITS::ReservedName, double)
 
double asgdbl (FITS::ReservedName, int, double)
 

Detailed Description

template<class TYPE>
class casacore::PrimaryTable< TYPE >

Primary Table structure.

Template Type Argument Requirements

Definition at line 706 of file hdu.h.

Member Typedef Documentation

◆ ElementType

template<class TYPE >
typedef TYPE casacore::PrimaryTable< TYPE >::ElementType

Definition at line 708 of file hdu.h.

Constructor & Destructor Documentation

◆ PrimaryTable() [1/3]

template<class TYPE >
casacore::PrimaryTable< TYPE >::PrimaryTable ( FitsInput ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)

◆ PrimaryTable() [2/3]

template<class TYPE >
casacore::PrimaryTable< TYPE >::PrimaryTable ( FitsKeywordList ,
FITSErrorHandler  errhandler = FITSError::defaultHandler 
)

◆ PrimaryTable() [3/3]

template<class TYPE >
casacore::PrimaryTable< TYPE >::PrimaryTable ( FITSErrorHandler  errhandler = FITSError::defaultHandler)

constructor for header consisted required keywords only

◆ ~PrimaryTable()

template<class TYPE >
casacore::PrimaryTable< TYPE >::~PrimaryTable ( )

Member Function Documentation

◆ altrpix()

template<class TYPE >
float casacore::PrimaryTable< TYPE >::altrpix ( ) const
inline

Definition at line 735 of file hdu.h.

References casacore::PrimaryTable< TYPE >::altrpix_x.

◆ bscal()

template<class TYPE >
float casacore::PrimaryTable< TYPE >::bscal ( ) const
inline

Definition at line 732 of file hdu.h.

References casacore::PrimaryTable< TYPE >::bscale_x.

◆ bunit()

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::bunit ( ) const
inline

Definition at line 731 of file hdu.h.

References casacore::PrimaryTable< TYPE >::bunit_x.

◆ bzero()

template<class TYPE >
float casacore::PrimaryTable< TYPE >::bzero ( ) const
inline

Definition at line 733 of file hdu.h.

References casacore::PrimaryTable< TYPE >::bzero_x.

◆ datemap()

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::datemap ( ) const
inline

Definition at line 730 of file hdu.h.

References casacore::PrimaryTable< TYPE >::datemap_x.

◆ dateobs()

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::dateobs ( ) const
inline

Definition at line 729 of file hdu.h.

References casacore::PrimaryTable< TYPE >::dateobs_x.

◆ equinox()

template<class TYPE >
float casacore::PrimaryTable< TYPE >::equinox ( ) const
inline

Definition at line 734 of file hdu.h.

References casacore::PrimaryTable< TYPE >::equinox_x.

◆ instrume()

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::instrume ( ) const
inline

Definition at line 728 of file hdu.h.

References casacore::PrimaryTable< TYPE >::instrume_x.

◆ object()

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::object ( ) const
inline

Definition at line 726 of file hdu.h.

References casacore::PrimaryTable< TYPE >::object_x.

◆ pt_assign()

template<class TYPE >
void casacore::PrimaryTable< TYPE >::pt_assign ( )
private

◆ read() [1/2]

template<class TYPE >
int casacore::PrimaryTable< TYPE >::read ( )
virtual

The ‘read()’ and ‘write()’ functions control reading and writing data from the external FITS I/O medium into the FITS array.

Appropriate conversions are made between FITS and local data representations. One can read the entire array into memory, or one can only read portions of the array. In the latter case, one must specify that the next N elements are to be read or written. Note that the number of elements must be specified, NOT the number of bytes. If one reads portions of the array, as opposed to the entire array, only that portion is in memory at a given time. One can still access the elements of the array via the ‘()’ and ‘data()’ functions, as if the entire array was in memory; obviously care must be taken in this case to access only those portions that are actually in memory.

Reimplemented from casacore::PrimaryArray< TYPE >.

Referenced by casacore::MSPrimaryTableHolder::read().

◆ read() [2/2]

template<class TYPE >
int casacore::PrimaryTable< TYPE >::read ( int  )
inlinevirtual

Reimplemented from casacore::PrimaryArray< TYPE >.

Definition at line 723 of file hdu.h.

◆ telescop()

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::telescop ( ) const
inline

Definition at line 727 of file hdu.h.

References casacore::PrimaryTable< TYPE >::telescop_x.

◆ write()

template<class TYPE >
int casacore::PrimaryTable< TYPE >::write ( FitsOutput )
inlinevirtual

Reimplemented from casacore::PrimaryArray< TYPE >.

Definition at line 724 of file hdu.h.

◆ write_priTable_hdr()

template<class TYPE >
int casacore::PrimaryTable< TYPE >::write_priTable_hdr ( FitsOutput fout,
int  bitpix,
int  naxis,
long *  naxes 
)

write required keywords for PrimaryTable

Member Data Documentation

◆ altrpix_x

template<class TYPE >
Float casacore::PrimaryTable< TYPE >::altrpix_x
protected

Definition at line 747 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::altrpix().

◆ bscale_x

template<class TYPE >
Float casacore::PrimaryTable< TYPE >::bscale_x
protected

Definition at line 743 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::bscal().

◆ bunit_x

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::bunit_x
protected

Definition at line 745 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::bunit().

◆ bzero_x

template<class TYPE >
Float casacore::PrimaryTable< TYPE >::bzero_x
protected

Definition at line 744 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::bzero().

◆ datemap_x

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::datemap_x
protected

Definition at line 742 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::datemap().

◆ dateobs_x

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::dateobs_x
protected

Definition at line 741 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::dateobs().

◆ equinox_x

template<class TYPE >
Float casacore::PrimaryTable< TYPE >::equinox_x
protected

Definition at line 746 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::equinox().

◆ instrume_x

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::instrume_x
protected

Definition at line 740 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::instrume().

◆ object_x

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::object_x
protected

Definition at line 738 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::object().

◆ telescop_x

template<class TYPE >
char* casacore::PrimaryTable< TYPE >::telescop_x
protected

Definition at line 739 of file hdu.h.

Referenced by casacore::PrimaryTable< TYPE >::telescop().


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