casacore
Loading...
Searching...
No Matches
SDFITSTable.h
Go to the documentation of this file.
1//# SDFITSTable.h : this defines SDFITSTable, a FITSTable following the SD convention
2//# Copyright (C) 1997,1999
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#ifndef FITS_SDFITSTABLE_H
27#define FITS_SDFITSTABLE_H
28
29
30#include <casacore/casa/aips.h>
31#include <casacore/fits/FITS/FITSTable.h>
32#include <casacore/casa/Containers/Block.h>
33
34namespace casacore { //# NAMESPACE CASACORE - BEGIN
35
36// <summary>
37// SDFITSTable is a FITSTable which follows the Single Dish FITS Convention.
38// </summary>
39
40// <use visibility=export>
41
42// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
43// </reviewed>
44
45// <prerequisite>
46// <li> FITSTable
47// </prerequisite>
48//
49// <etymology>
50// SDFITSTable is derived from FITSTable. It contains additional
51// checks and behaviour appropriate to the Single Dish FITS Convention
52// hence this is a Single Dish FITS Table, or SDFITSTable.
53// </etymology>
54//
55// <synopsis>
56// This class behaves much like FITSTable. It additionally verifies
57// that the indicated HDU in the input FITS file follows the SDFITS
58// convention (it has all of the required columns) and it treats
59// keywords as virtual columns when appropriate. These virtual
60// columns will appear as fields in the currentRecord and description
61// and will NOT appear in the keywords.
62// </synopsis>
63//
64// <example>
65// </example>
66//
67// <motivation>
68// It was useful to encapsulate this behaviour in a class so that
69// the checks on a valid SDFITS table and the treatment of keywords
70// as virtual columns would not need to appear everywhere it might
71// be used.
72// </motivation>
73//
74// <thrown>
75// <li>
76// <li>
77// </thrown>
78//
79// <todo asof="1997/01/14">
80// <li> everything
81// </todo>
82
83class SDFITSTable : public FITSTable
84{
85public:
86 // the core keywords, UNKNOWN is not a core keyword,
87 // NUM_CORE_KEYWORDS is a place holder
91
92 // construct from a file
93 SDFITSTable(const String &fileName, uInt whichHDU=1);
94
95 // The destructor
97
98 // Attach this SDFITSTable to a new file name, same HDU# as at open time
99 virtual Bool reopen(const String &fileName);
100
101 // is this a valid SDFITS file
102 virtual Bool isSDFITS() const { return isSDFITS_p;}
103
104 // translate to/from core keyword names to enumeration
107
108private:
110
111 // block of core keyword names
113 // kwNames initialization function
114 static void init_kwNames();
115
116 // check to see if the named keyword should
117 // be turned into a column, all non-reserved keywords will
118 // always be turned into a column.
120
121 // the array of keyword names
122 // the regular FITSTable::reopen does nearly everything fine,
123 // this function moves stuff out of the keywords and into the
124 // output record as appropriate
126
127 // undefined an inaccessible
131};
132
133} //# NAMESPACE CASACORE - END
134
135#endif
136
137
simple 1-D array
Definition Block.h:198
Attach a FITSTabular to a binary or ASCII table.
Definition FITSTable.h:198
virtual const String & name() const
return the name
Definition FITSTable.h:218
SDFITSTable & operator=(const SDFITSTable &)
CoreKeyword
the core keywords, UNKNOWN is not a core keyword, NUM_CORE_KEYWORDS is a place holder
Definition SDFITSTable.h:88
virtual Bool reopen(const String &fileName)
Attach this SDFITSTable to a new file name, same HDU# as at open time.
static String coreKeywordName(CoreKeyword kw)
SDFITSTable(const String &fileName, uInt whichHDU=1)
construct from a file
~SDFITSTable()
The destructor.
void sdfits_shuffle()
the array of keyword names the regular FITSTable::reopen does nearly everything fine,...
static CoreKeyword coreKeyword(const String &name)
translate to/from core keyword names to enumeration
virtual Bool isSDFITS() const
is this a valid SDFITS file
SDFITSTable(const SDFITSTable &)
static Bool isSDFitsColumn(const String &name)
check to see if the named keyword should be turned into a column, all non-reserved keywords will alwa...
static Block< String > kwNames
block of core keyword names
SDFITSTable()
undefined an inaccessible
static void init_kwNames()
kwNames initialization function
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40