1 | // |
---|
2 | // C++ Interface: STFrequencies |
---|
3 | // |
---|
4 | // Description: |
---|
5 | // |
---|
6 | // |
---|
7 | // Author: Malte Marquarding <asap@atnf.csiro.au>, (C) 2006 |
---|
8 | // |
---|
9 | // Copyright: See COPYING file that comes with this distribution |
---|
10 | // |
---|
11 | // |
---|
12 | #ifndef ASAPSTFREQUENCIES_H |
---|
13 | #define ASAPSTFREQUENCIES_H |
---|
14 | |
---|
15 | #include <casa/aips.h> |
---|
16 | #include <casa/BasicSL/String.h> |
---|
17 | #include <coordinates/Coordinates/SpectralCoordinate.h> |
---|
18 | #include <tables/Tables/Table.h> |
---|
19 | #include <tables/Tables/ScalarColumn.h> |
---|
20 | |
---|
21 | #include "STSubTable.h" |
---|
22 | |
---|
23 | namespace asap { |
---|
24 | |
---|
25 | /** |
---|
26 | The Frequencies subtable of the Scantable |
---|
27 | |
---|
28 | @author Malte Marquarding |
---|
29 | */ |
---|
30 | class STFrequencies : public STSubTable { |
---|
31 | public: |
---|
32 | STFrequencies( casa::Table::TableType tt = casa::Table::Memory); |
---|
33 | |
---|
34 | virtual ~STFrequencies(); |
---|
35 | /** |
---|
36 | * Add a new Entry to the Frequency subtable. This checks for duplicates. |
---|
37 | * @param[in] refpix the reference pixel |
---|
38 | * @param[in] refval the reference value |
---|
39 | * @param[in] inc the increment |
---|
40 | * @return an index into the frequency table |
---|
41 | */ |
---|
42 | casa::uInt addEntry( casa::Double refpix, casa::Double refval, |
---|
43 | casa::Double inc ); |
---|
44 | |
---|
45 | void getEntry( casa::Double& refpix, casa::Double& refval, |
---|
46 | casa::Double& inc, casa::uInt id ); |
---|
47 | |
---|
48 | casa::SpectralCoordinate getSpectralCoordinate( casa::uInt freqID ); |
---|
49 | |
---|
50 | const casa::Unit& getUnit() const; |
---|
51 | casa::MDoppler getDoppler() const; |
---|
52 | |
---|
53 | |
---|
54 | casa::MFrequency::Types getFrame() const; |
---|
55 | std::string getFrameString() const; |
---|
56 | void setFrame(const std::string& frame); |
---|
57 | void setFrame(casa::MFrequency::Types frame); |
---|
58 | |
---|
59 | void rescale(casa::Float factor, const std::string& mode); |
---|
60 | |
---|
61 | float getRefFreq(casa::uInt id, casa::uInt channel); |
---|
62 | |
---|
63 | std::string print(int id=-1); |
---|
64 | |
---|
65 | private: |
---|
66 | void setup(); |
---|
67 | casa::SpectralCoordinate binCsys(const casa::SpectralCoordinate& sc, casa::Int factor); |
---|
68 | casa::SpectralCoordinate resampleCsys(const casa::SpectralCoordinate& sc, casa::Float width); |
---|
69 | |
---|
70 | static const casa::String name_; |
---|
71 | //casa::Table table_; |
---|
72 | //casa::ScalarColumn<casa::uInt> freqidCol_; |
---|
73 | casa::ScalarColumn<casa::Double> refvalCol_, refpixCol_, incrCol_; |
---|
74 | }; |
---|
75 | |
---|
76 | } |
---|
77 | |
---|
78 | #endif |
---|