Changeset 745 for trunk/src/SDMemTable.h
- Timestamp:
- 11/28/05 15:25:18 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.h
r717 r745 49 49 50 50 namespace asap { 51 51 52 52 class SDContainer; 53 53 class SDHeader; … … 71 71 SDMemTable(const casa::Table& tab, const std::string& expr); 72 72 73 // Assignment operator (copy semantics) 73 // Assignment operator (copy semantics) 74 74 SDMemTable &operator=(const SDMemTable& other); 75 75 76 76 virtual ~SDMemTable(); 77 77 … … 86 86 SDHeader getSDHeader() const; 87 87 88 // Get SD Frequency table. 88 // Get SD Frequency table. 89 89 SDFrequencyTable getSDFreqTable() const; 90 90 … … 101 101 // I,P,PA,V (doPol=True) (determined by the polSel cursor location 102 102 // 0->3) If the latter, you can add a PA offset (degrees) 103 virtual std::vector<float> getStokesSpectrum(casa::Int whichRow=0, 103 virtual std::vector<float> getStokesSpectrum(casa::Int whichRow=0, 104 104 casa::Bool doPol=casa::False) const; 105 105 … … 108 108 // label for raw correlations (linear or circular). If True returns 109 109 // label for Stokes. If doPol=False, I,Q,U,V else I,P,PA,V 110 std::string getPolarizationLabel(casa::Bool linear, casa::Bool stokes, 111 casa::Bool linPol, 112 110 std::string getPolarizationLabel(casa::Bool linear, casa::Bool stokes, 111 casa::Bool linPol, 112 casa::Int polIdx=-1) const; 113 113 114 114 // Convert Stokes to linear or circular polarizations (specified by … … 116 116 // supported. 117 117 virtual std::vector<float> stokesToPolSpectrum(casa::Int whichRow, 118 119 118 casa::Bool toLinear, 119 casa::Int polIdx) const; 120 120 121 121 // Get all Stokes at the specified Beam/IF cursor location (ignoring … … 125 125 // is not the same as nPol(), I have put it here for direct access as needed 126 126 virtual casa::Array<casa::Float> getStokesSpectrum(casa::Int whichRow=0, 127 casa::Int iBeam=-1, 127 casa::Int iBeam=-1, 128 128 casa::Int iIF=-1) const; 129 129 … … 132 132 133 133 // get all as aips++ Vectors 134 virtual void getSpectrum(casa::Vector<casa::Float>& spectrum, 135 casa::Int whichRow=0) const; 136 //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const; 134 virtual void getSpectrum(casa::Vector<casa::Float>& spectrum, 135 casa::Int whichRow=0) const; 137 136 138 137 // Get rest frequencies 139 138 std::vector<double> getRestFreqs() const; 140 141 // get info for current row 139 140 // get info for current row 142 141 // if whichRow == -1 the Header time is given 143 std::string getTime(casa::Int whichRow=0, 144 145 casa::MEpoch getEpoch(casa::Int whichRow=0) const; 142 std::string getTime(casa::Int whichRow=0, 143 casa::Bool showDate=casa::False) const ; 144 casa::MEpoch getEpoch(casa::Int whichRow=0) const; 146 145 casa::MDirection getDirection(casa::Int whichRow=0, 147 casa::Bool refBeam=casa::False) const; 146 casa::Bool refBeam=casa::False) const; 148 147 149 148 std::string getSourceName(casa::Int whichRow=0) const; … … 154 153 155 154 // Set RestFreqID. source="" and IF=-1 means select all 156 virtual casa::Bool setRestFreqs(const casa::Vector<casa::Double>& restFreqs, 157 158 159 160 155 virtual casa::Bool setRestFreqs(const casa::Vector<casa::Double>& restFreqs, 156 const casa::String& unit, 157 const std::vector<std::string>& lines, 158 const casa::String& source, 159 casa::Int whichIF=-1); 161 160 162 161 // List lines … … 166 165 std::string getFluxUnit() const; 167 166 void setFluxUnit (const std::string& unit); 168 167 169 168 // Set Instrument 170 169 void setInstrument (const std::string& instrument); … … 178 177 virtual void resetCursor(); 179 178 180 //sets the user mask applied to all spectra181 virtual bool setMask(std::vector<int> whichChans);182 179 // Hard flags the current spectrum, not reversible 183 180 virtual void flag(int whichRow); … … 226 223 // return a row as a Masked array, internally converting uChar flags 227 224 // to bool mask 228 casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow, 225 casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow, 229 226 casa::Bool toStokes=casa::False) const; 230 227 … … 237 234 // rest frequency. If row number given (>=0), also set 238 235 // frame conversion layer (needs direction & time which require row) 239 casa::SpectralCoordinate getSpectralCoordinate(casa::uInt freqID, 236 casa::SpectralCoordinate getSpectralCoordinate(casa::uInt freqID, 240 237 casa::uInt restFreqID, 241 238 casa::uInt row) const; … … 243 240 // Set just the reference value, pixel and increment into the table 244 241 // No other state is extracted. 245 casa::Bool setCoordinate(const casa::SpectralCoordinate& speccord, 246 242 casa::Bool setCoordinate(const casa::SpectralCoordinate& speccord, 243 casa::uInt whichIdx); 247 244 248 245 casa::Int nCoordinates() const; … … 263 260 264 261 void addFit(casa::uInt whichRow, 265 const casa::Vector<casa::Double>& p, 266 267 const casa::Vector<casa::String>& f, 268 269 270 262 const casa::Vector<casa::Double>& p, 263 const casa::Vector<casa::Bool>& m, 264 const casa::Vector<casa::String>& f, 265 const casa::Vector<casa::Int>& c); 266 267 271 268 private: 272 269 // utility func for nice printout … … 279 276 280 277 // Generate start and end for shape and current cursor selection 281 void getCursorSlice(casa::IPosition& start, casa::IPosition& end, 282 278 void getCursorSlice(casa::IPosition& start, casa::IPosition& end, 279 const casa::IPosition& shape) const; 283 280 284 281 // the current cursor into the array 285 282 casa::Int IFSel_,beamSel_,polSel_; 286 std::vector<bool> chanMask_;287 283 // the underlying memory table 288 284 casa::Table table_;
Note: See TracChangeset
for help on using the changeset viewer.