26#ifndef MS_MSFITSINPUT_H
27#define MS_MSFITSINPUT_H
29#include <casacore/casa/aips.h>
30#include <casacore/casa/Arrays/Matrix.h>
31#include <casacore/casa/Arrays/Vector.h>
32#include <casacore/casa/Containers/Block.h>
33#include <casacore/casa/Containers/Record.h>
34#include <casacore/fits/FITS/fits.h>
35#include <casacore/fits/FITS/hdu.h>
36#include <casacore/casa/Logging/LogIO.h>
37#include <casacore/ms/MeasurementSets/MeasurementSet.h>
38#include <casacore/measures/Measures/MDirection.h>
39#include <casacore/measures/Measures/MFrequency.h>
40#include <casacore/casa/BasicSL/String.h>
41#include <casacore/ms/MeasurementSets/MSTileLayout.h>
42#include <casacore/tables/Tables/BaseTable.h>
89 {
return hdu_p->dims();}
93 {
return hdu_p->dim(i);}
97 {
return pf ?
pf->ctype(i) : (
pl ?
pl->ctype(i) :
ps->ctype(i));}
101 {
return pf ?
pf->crval(i) : (
pl ?
pl->crval(i) :
ps->crval(i));}
105 {
return pf ?
pf->crpix(i) : (
pl ?
pl->crpix(i) :
ps->crpix(i));}
109 {
return pf ?
pf->cdelt(i) : (
pl ?
pl->cdelt(i) :
ps->cdelt(i));}
113 {
return hdu_p->kw(n);}
117 {
return hdu_p->kwlist();}
121 {
return hdu_p->nextkw();}
125 if (
pf)
return pf->read();
126 else if (
pl)
return pl->read();
127 else if (
ps)
return ps->read();
128 else if (
pb)
return pb->read();
129 else cout <<
"can not read the table" << endl;
179 {
return hdu_p->dims();}
183 {
return hdu_p->dim(i);}
187 {
return pf ?
pf->ctype(i) : (
pl ?
pl->ctype(i) :
ps->ctype(i));}
191 {
return pf ?
pf->crval(i) : (
pl ?
pl->crval(i) :
ps->crval(i));}
195 {
return pf ?
pf->crpix(i) : (
pl ?
pl->crpix(i) :
ps->crpix(i));}
199 {
return pf ?
pf->cdelt(i) : (
pl ?
pl->cdelt(i) :
ps->cdelt(i));}
203 {
return hdu_p->kw(n);}
207 {
return hdu_p->kwlist();}
211 {
return hdu_p->nextkw();}
215 {
return pf ?
pf->gcount() : (
pl ?
pl->gcount() :
ps->gcount());}
219 {
return pf ?
pf->pcount() : (
pl ?
pl->pcount() :
ps->pcount());}
223 {
return pf ?
pf->ptype(i) : (
pl ?
pl->ptype(i) :
ps->ptype(i));}
227 {
return pf ?
pf->read() : (
pl ?
pl->read() :
ps->read());}
231 {
return pf ?
pf->parm(i) : (
pl ?
pl->parm(i) :
ps->parm(i));}
235 {
return pf ? (*pf)(i) : (
pl ? (*pl)(i) : (*ps)(i));}
list of read-only FITS keywords
ReservedName
FITS Reserved Names.
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
A helper class for MSFitsInput.
PrimaryGroup< Float > * pf
Int gcount() const
Number of groups.
Char * ctype(Int i)
Coordinate type.
MSPrimaryGroupHolder(FitsInput &infile)
Construct from an input file containing a FITS primary group hdu.
ConstFitsKeywordList & kwlist()
All keywords.
void detach()
Detach from the input file.
Double crval(Int i)
Coordinate reference value.
Int dim(Int i)
Length of i'th axis.
Double operator()(Int i) const
Get group data with index i, scaled and converted to Double.
Double crpix(Int i)
Coordinate reference pixel.
Char * ptype(Int i) const
Parameter type.
Int pcount() const
Number of parameters.
const FitsKeyword * kw(const FITS::ReservedName &n)
Keyword of given type.
const FitsKeyword * nextkw()
Advance to next keyword.
Int dims()
Number of dimensions.
Double cdelt(Int i)
Coordinate delta.
PrimaryGroup< FitsLong > * pl
PrimaryGroup< Short > * ps
MSPrimaryGroupHolder()
This is a helper class to avoid cumbersome switch statements on the template type of the primary grou...
Int read()
Read the next group.
void attach(FitsInput &infile)
Attach to the input file, create the appropriate PrimaryGroup.
Double parm(Int i)
Get i'th parameter.
PrimaryTable< Float > * pf
Int read()
Read the next group.
const FitsKeyword * kw(const FITS::ReservedName &n)
Keyword of given type.
const FitsKeyword * nextkw()
Advance to next keyword.
PrimaryTable< FitsLong > * pl
PrimaryTable< uChar > * pb
Int dim(Int i)
Length of i'th axis.
Char * ctype(Int i)
Coordinate type.
Int dims()
Number of dimensions.
ConstFitsKeywordList & kwlist()
All keywords.
void detach()
Detach from the input file.
Double crpix(Int i)
Coordinate reference pixel.
PrimaryTable< Short > * ps
void attach(FitsInput &infile)
Attach to the input file, create the appropriate PrimaryArray.
Double cdelt(Int i)
Coordinate delta.
MSPrimaryTableHolder()
This is a helper class to avoid cumbersome switch statements on the template type of the primary arra...
Double crval(Int i)
Coordinate reference value.
MSPrimaryTableHolder(FitsInput &infile)
Construct from an input file containing a FITS primary group hdu.
@ Standard
Standard, optimizes i/o by using large tiles (128 kB).
Random Group datastructure.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.