Changeset 88
- Timestamp:
- 11/12/04 12:11:13 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.h
r83 r88 84 84 // get all as aips++ Vectors 85 85 virtual void getSpectrum(Vector<Float>& spectrum, Int whichRow=0); 86 virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const; 86 87 //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const; 87 88 88 89 // get info for current row … … 91 92 double getInterval(Int whichRow=0) const; 92 93 94 virtual void setSpectrum(std::vector<float> spectrum, int whichRow=0); 95 virtual void setRestFreqs(std::vector<double> freqs, const std::string& theunit); 96 93 97 // set the current value 94 98 virtual bool setIF(Int whichIF=0); 95 99 virtual bool setBeam(Int whichBeam=0); 96 virtual bool setPol(Int whichPol=0); 97 //sets the user mask 100 virtual bool setPol(Int whichPol=0); 101 102 //sets the user mask applied to all spectra 98 103 virtual bool setMask(std::vector<int> whichChans); 99 104 // Hard flags the current spectrum, not reversible 105 virtual void flag(int whichRow); 106 100 107 // return the currently selected values 101 108 virtual Int getIF() { return IFSel_; } 102 109 virtual Int getBeam() { return beamSel_; } 103 virtual Int getPol() { return polSel_; } 104 110 virtual Int getPol() { return polSel_; } 111 105 112 // number of scans in table 106 virtual Int nScan s() const;113 virtual Int nScan() const; 107 114 108 115 // print a summary to stdout 109 virtual voidsummary() const;110 116 virtual std::string summary() const; 117 111 118 // write to disk as aips++ table 112 119 void makePersistent(const std::string& filename); 113 120 114 // get a new SDMemTable contain g all rows with the same give SCANID121 // get a new SDMemTable containing all rows with the same give SCANID 115 122 SDMemTable getScan(Int scanID); 116 123 SDMemTable getSource(const std::string& source); … … 127 134 128 135 // return the number of rows (integrations) in the table 129 Int nRow s() const { return table_.nrow(); }136 Int nRow() const { return table_.nrow(); } 130 137 131 138 // return a row as a Masked array, internally converting uChar flags 132 139 // to bool mask 133 140 MaskedArray<Float> rowAsMaskedArray(uInt whichRow, 134 141 Bool useSelection = False); 135 142 136 143 SpectralCoordinate getCoordinate(uInt whichIdx) const; 137 144 Bool setCoordinate(const SpectralCoordinate& speccord, uInt whichIdx); 138 145 139 std::vector<double> getAbscissa(int whichRow, 140 const std::string& whichUnit="GHz", 141 const std::string& whichFrame="TOPO", 142 double restfreq=0.0); 146 Int nCoordinates() const; 147 148 std::vector<double> getAbscissa(int whichRow, 149 const std::string& whichUnit="GHz", 150 const std::string& whichFrame="TOPO", 151 double restfreq=0.0); 143 152 private: 144 153 // set up table structure … … 146 155 // the current cursor into the array 147 156 Int IFSel_,beamSel_,polSel_; 148 std::vector<bool> chanMask_; 157 std::vector<bool> chanMask_; 149 158 // the underlying memory table 150 159 Table table_;
Note:
See TracChangeset
for help on using the changeset viewer.