Changeset 453 for trunk/src/SDContainer.h
- Timestamp:
- 02/16/05 12:26:36 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDContainer.h
r449 r453 73 73 virtual ~SDFrequencyTable() {;} 74 74 75 // Add a new entry or match an existing one. Returns the index into the table 75 // Add a new entry or match an existing one. Returns the index into 76 // the table 76 77 casa::uInt addFrequency(casa::Double refPix, casa::Double refVal, 77 casa::Double inc);78 // 79 casa::Int length() const { return nFreq_;} 78 casa::Double inc); 79 80 casa::Int length() const { return nFreq_;} // # of stored Frequencies 80 81 void setLength(casa::uInt length) {nFreq_ = length;} 81 82 82 // Get attributes83 // Get attributes 83 84 casa::Double referencePixel(casa::uInt which) const { return refPix_[which];} 84 85 casa::Double referenceValue(casa::uInt which) const { return refVal_[which];} … … 86 87 casa::Float equinox() const { return equinox_; } 87 88 casa::String refFrame() const { return refFrame_; } 88 // 89 89 90 void restFrequencies(casa::Vector<casa::Double>& rfs, 90 91 casa::String& rfunit ) const ; 91 92 92 // Set attributes93 // Set attributes 93 94 void setEquinox(casa::Float eq) { equinox_ = eq; } 94 95 void setRefFrame(const casa::String& reff) { refFrame_ = reff; } 95 // 96 void deleteRestFrequencies 96 97 void deleteRestFrequencies() {restFreqs_.resize(0);} 97 98 casa::uInt addRestFrequency(casa::Double); 98 void setRestFrequencyUnit(const casa::String& theunit) {restFreqUnit_ = theunit;} 99 void setRestFrequencyUnit(const casa::String& theunit) 100 { restFreqUnit_ = theunit;} 99 101 100 102 private: … … 162 164 163 165 const casa::Vector<casa::uInt>& getFreqMap() const { return freqidx_; } 164 const casa::Vector<casa::uInt>& getRestFreqMap() const { return restfreqidx_; } 166 const casa::Vector<casa::uInt>& getRestFreqMap() const 167 { return restfreqidx_; } 165 168 166 169 const casa::Vector<casa::String>& getHistory() const { return history_; } 167 170 casa::Bool putHistory(const casa::Vector<casa::String>& hist); 168 171 casa::Bool appendHistory(const casa::String& hist); 172 173 casa::Bool putFitMap(const casa::Array<casa::Int>& arr); 174 175 const casa::Array<casa::Int>& getFitMap() const { return fitIDMap_; } 176 169 177 170 178 casa::Double timestamp; … … 187 195 casa::Array<casa::Float> spectrum_; 188 196 casa::Array<casa::uChar> flags_; 197 189 198 // (nBeam,nIF,nPol,[nChannel]) Tsys is not really a function of 190 199 // channel, but this makes it easier to work with at the expense of … … 195 204 //(nIF) indx into "global" frequency table 196 205 casa::Vector<casa::uInt> freqidx_; 206 197 207 // (nIF) indx into "global" rest frequency table 198 208 casa::Vector<casa::uInt> restfreqidx_; 209 199 210 //(nBeam,2) maybe use Measures here... 200 211 casa::Array<casa::Double> direction_; 201 212 casa::Vector<casa::String> history_; 202 void setSlice (casa::IPosition& start, casa::IPosition& end, 203 const casa::IPosition& shpIn, const casa::IPosition& shpOut, 204 casa::uInt whichBeam, casa::uInt whichIF, casa::Bool checkPol, 205 casa::Bool xPol) const; 206 void setSlice (casa::IPosition& start, casa::IPosition& end, 207 const casa::IPosition& shape, 208 casa::uInt whichBeam, casa::uInt whichIF) const; 213 casa::Array<casa::Int> fitIDMap_; 214 215 void setSlice(casa::IPosition& start, casa::IPosition& end, 216 const casa::IPosition& shpIn, const casa::IPosition& shpOut, 217 casa::uInt whichBeam, casa::uInt whichIF, casa::Bool checkPol, 218 casa::Bool xPol) const; 219 void setSlice(casa::IPosition& start, casa::IPosition& end, 220 const casa::IPosition& shape, 221 casa::uInt whichBeam, casa::uInt whichIF) const; 209 222 }; 210 223 … … 215 228 public: 216 229 217 // COnstructor230 // Constructor 218 231 SDDataDesc() : n_(0) {;} 219 232 ~SDDataDesc() {;} 220 233 221 // Add an entry if source name and Integer ID (can be anything you like, such 222 // as FreqID) are unique. You can add secondary entries direction 223 // and another integer index which are just stored along with the 224 //the primary entries225 casa::uInt addEntry 226 227 228 // Number of entries234 // Add an entry if source name and Integer ID (can be anything you 235 // like, such as FreqID) are unique. You can add secondary entries 236 // direction and another integer index which are just stored along 237 // with the the primary entries 238 casa::uInt addEntry(const casa::String& source, casa::uInt ID, 239 const casa::MDirection& secDir, casa::uInt secID); 240 241 // Number of entries 229 242 casa::Int length() const { return n_;} 230 231 // Get attributes232 casa::String source 243 244 // Get attributes 245 casa::String source(casa::uInt which) const {return source_[which];} 233 246 casa::uInt ID(casa::uInt which) const {return ID_[which];} 234 247 casa::uInt secID(casa::uInt which) const {return secID_[which];} 235 casa::MDirection secDir 236 237 // Summary248 casa::MDirection secDir(casa::uInt which) const {return secDir_[which];} 249 250 // Summary 238 251 void summary() const; 239 252 … … 243 256 casa::Vector<casa::uInt> ID_, secID_; 244 257 casa::Block<casa::MDirection> secDir_; 245 // 258 246 259 SDDataDesc(const SDDataDesc& other); 260 261 }; 262 263 class SDFitTable { 264 public: 265 // Create a FitTable with "n" rows 266 SDFitTable(casa::uInt n=0) : n_(n) {;}; 267 268 casa::uInt length() const { return n_; }; 269 const casa::Vector<casa::Double>& getFitParameters(casa::uInt which) const; 270 const casa::Vector<casa::Bool>& getFitParameterMask(casa::uInt which) const; 271 const casa::Vector<casa::String>& getFitFunctions(casa::uInt which) const; 272 const casa::Vector<casa::Int>& getFitComponents(casa::uInt which) const; 273 274 void putFitParameters(casa::uInt whichRow, 275 const casa::Vector<casa::Double>& arr); 276 void putFitParameterMask(casa::uInt whichRow, 277 const casa::Vector<casa::Bool>& arr); 278 void putFitFunctions(casa::uInt whichRow, 279 const casa::Vector<casa::String>& arr); 280 void putFitComponents(casa::uInt whichRow, 281 const casa::Vector<casa::Int>& arr); 282 283 private: 284 285 casa::uInt n_; 286 casa::Vector<casa::Vector<casa::Double> > fitParms_; 287 // (npars,nrows) 288 casa::Vector<casa::Vector<casa::Bool> > parMask_; 289 // the fit function names (nnames,nrows) 290 casa::Vector<casa::Vector<casa::String> > fitFuncs_; 291 // the number of components of the function (ncomps, nrows) 292 casa::Vector<casa::Vector<casa::Int> > fitComps_; 247 293 248 294 };
Note: See TracChangeset
for help on using the changeset viewer.