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#include <casacore/casa/aips.h>
30#include <casacore/fits/FITS/FITSTable.h>
31#include <casacore/casa/Containers/Block.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// SDFITSTable is a FITSTable which follows the Single Dish FITS Convention.
37// </summary>
38
39// <use visibility=export>
40
41// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
42// </reviewed>
43
44// <prerequisite>
45// <li> FITSTable
46// </prerequisite>
47//
48// <etymology>
49// SDFITSTable is derived from FITSTable. It contains additional
50// checks and behaviour appropriate to the Single Dish FITS Convention
51// hence this is a Single Dish FITS Table, or SDFITSTable.
52// </etymology>
53//
54// <synopsis>
55// This class behaves much like FITSTable. It additionally verifies
56// that the indicated HDU in the input FITS file follows the SDFITS
57// convention (it has all of the required columns) and it treats
58// keywords as virtual columns when appropriate. These virtual
59// columns will appear as fields in the currentRecord and description
60// and will NOT appear in the keywords.
61// </synopsis>
62//
63// <example>
64// </example>
65//
66// <motivation>
67// It was useful to encapsulate this behaviour in a class so that
68// the checks on a valid SDFITS table and the treatment of keywords
69// as virtual columns would not need to appear everywhere it might
70// be used.
71// </motivation>
72//
73// <thrown>
74// <li>
75// <li>
76// </thrown>
77//
78// <todo asof="1997/01/14">
79// <li> everything
80// </todo>
81
82class SDFITSTable : public FITSTable {
83 public:
84 // the core keywords, UNKNOWN is not a core keyword,
85 // NUM_CORE_KEYWORDS is a place holder
96
97 // construct from a file
98 SDFITSTable(const String &fileName, uInt whichHDU = 1);
99
100 // The destructor
102
103 // Attach this SDFITSTable to a new file name, same HDU# as at open time
104 virtual Bool reopen(const String &fileName);
105
106 // is this a valid SDFITS file
107 virtual Bool isSDFITS() const { return isSDFITS_p; }
108
109 // translate to/from core keyword names to enumeration
112
113 private:
115
116 // block of core keyword names
118 // kwNames initialization function
119 static void init_kwNames();
120
121 // check to see if the named keyword should
122 // be turned into a column, all non-reserved keywords will
123 // always be turned into a column.
125
126 // the array of keyword names
127 // the regular FITSTable::reopen does nearly everything fine,
128 // this function moves stuff out of the keywords and into the
129 // output record as appropriate
131
132 // undefined an inaccessible
136};
137
138} // namespace casacore
139
140#endif
FITSTable(uInt whichHDU=1, Bool allKeywords=False)
this creates an invalid (isValid() return False) FITSTable Its primary purpose is so that FITSTables ...
virtual const String & name() const
return the name
Definition FITSTable.h:213
SDFITSTable & operator=(const SDFITSTable &)
CoreKeyword
the core keywords, UNKNOWN is not a core keyword, NUM_CORE_KEYWORDS is a place holder
Definition SDFITSTable.h:86
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:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40