Changeset 79
- Timestamp:
- 08/10/04 16:26:33 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDContainer.cc
r67 r79 66 66 flags_(IPosition(4,nBeam,nIF,nPol,nChan)), 67 67 tsys_(IPosition(4,nBeam,nIF,nPol,nChan)), 68 freqidx_(nIF) { 68 freqidx_(nIF), 69 direction_(IPosition(2,nBeam,2)) { 69 70 uChar x = 0; 70 71 flags_ = ~x; … … 79 80 flags_(shp), 80 81 tsys_(shp), 81 freqidx_(shp(1)){ 82 freqidx_(shp(1)) { 83 IPosition ip(2,shp(0),2); 84 direction_.resize(ip); 82 85 uChar x = 0; 83 86 flags_ = ~x; … … 96 99 tsys_.resize(shp); 97 100 freqidx_.resize(shp(1)); 101 IPosition ip(2,shp(0),2); 102 direction_.resize(ip); 98 103 } 99 104 … … 284 289 } 285 290 291 Array<Double> SDContainer::getDirection(uInt whichBeam) const { 292 Vector<Double> direct(2); 293 ArrayAccessor<Double, Axis<0> > i0(direction_); 294 i0.reset(i0.begin(whichBeam)); 295 ArrayAccessor<Double, Axis<0> > o0(direct); 296 ArrayAccessor<Double, Axis<1> > i1(i0); 297 while (i1 != i1.end()) { 298 *o0 = *i1; 299 i1++; 300 o0++; 301 } 302 return direct.copy(); 303 } 304 305 286 306 Bool SDContainer::setFrequencyMap(uInt freqslot, uInt whichIF) { 287 307 freqidx_[whichIF] = freqslot; … … 292 312 freqidx_.resize(); 293 313 freqidx_ = freqs; 314 return True; 315 } 316 317 Bool SDContainer::setDirection(const Vector<Double>& point, uInt whichBeam) { 318 if (point.nelements() != 2) return False; 319 ArrayAccessor<Double, Axis<0> > aa0(direction_); 320 aa0.reset(aa0.begin(whichBeam)); 321 ArrayAccessor<Double, Axis<0> > jj(point); 322 for (ArrayAccessor<Double, Axis<1> > i(aa0);i != i.end(); ++i) { 323 324 (*i) = (*jj); 325 jj++; 326 } 327 return True; 328 } 329 330 Bool SDContainer::putDirection(const Array<Double>& dir) { 331 direction_.resize(); 332 direction_ = dir; 294 333 return True; 295 334 } -
trunk/src/SDContainer.h
r67 r79 115 115 Bool putTsys(const Array<Float>& spec); 116 116 117 Bool setPointing(const Vector<Double>& point, uInt whichBeam) {;} 117 Bool setDirection(const Vector<Double>& point, uInt whichBeam); 118 Bool putDirection(const Array<Double>& dir); 118 119 119 120 Bool setFrequencyMap(uInt freqslot, uInt whichIF); … … 123 124 Array<uChar> getFlags(uInt whichBeam, uInt whichIF) const; 124 125 Array<Float> getTsys(uInt whichBeam, uInt whichIF) const; 126 Array<Double> getDirection(uInt whichBeam) const; 125 127 126 128 const Array<Float>& getSpectrum() const { return spectrum_; } 127 129 const Array<uChar>& getFlags() const { return flags_; } 128 130 const Array<Float>& getTsys() const { return tsys_; } 131 const Array<Double>& getDirection() const { return direction_; } 129 132 130 133 const Vector<uInt>& getFreqMap() const { return freqidx_; } 131 134 132 135 Double timestamp; 133 136 String sourcename; … … 147 150 Array<Float> tcal_; 148 151 149 //(nBeam) maybe use Measures here...150 //*** Vector<Vector<Double>> pointing_;151 152 //(nIF) indx into "global" frequency table 152 153 Vector<uInt> freqidx_; 154 //(nBeam,2) maybe use Measures here... 155 Array<Double> direction_; 153 156 154 157 }; -
trunk/src/SDMemTableWrapper.h
r51 r79 62 62 std::vector<double> getAbscissa(int whichRow, 63 63 const std::string& unit = "GHz", 64 const std::string& frame = "TOPO", 64 65 double restfreq=0.0) const { 65 return table_->getAbscissa(whichRow,unit, restfreq);66 return table_->getAbscissa(whichRow,unit,frame,restfreq); 66 67 } 67 68 -
trunk/src/SDReader.cc
r73 r79 193 193 sc.setFlags(flagtra, beamNo-1, IFno-1); 194 194 sc.setTsys(tsys, beamNo-1, IFno-1); 195 //sc.addPointing(direction, beamNo-1);195 sc.setDirection(direction, beamNo-1); 196 196 } 197 197 } -
trunk/src/SDWriter.cc
r75 r79 139 139 // None of these are stored in SDMemTable by SDReader. 140 140 String fieldName = ""; 141 Vector<Double> srcDir(2, 0.0);141 //Vector<Double> srcDir(2, 0.0); 142 142 Vector<Double> srcPM(2, 0.0); 143 143 Double srcVel = 0.0; … … 158 158 Float windAz = 0.0f; 159 159 Int refBeam = 0; 160 Vector<Double> direction(2, 0.0);160 //Vector<Double> direction(2, 0.0); 161 161 Vector<Double> scanRate(2, 0.0); 162 162 Vector<Float> sigma(nPol, 0.0f); … … 166 166 Complex xCalFctr; 167 167 Vector<Complex> xPol; 168 169 168 if (status = cWriter->write(sd.scanid, cycleNo, sd.timestamp, 170 169 sd.interval, fieldName, sd.sourcename, 171 srcDir, srcPM, srcVel, iIF+1, hdr.reffreq, 170 sd.getDirection(iBeam), 171 srcPM, srcVel, iIF+1, hdr.reffreq, 172 172 hdr.bandwidth, freqInc, restFreq, tcal, 173 173 tcalTime, azimuth, elevation, parAngle, 174 174 focusAxi, focusTan, focusRot, temperature, 175 175 pressure, humidity, windSpeed, windAz, 176 refBeam, iBeam+1, direction, scanRate, 176 refBeam, iBeam+1, 177 sd.getDirection(iBeam), 178 scanRate, 177 179 sd.getTsys(iBeam, iIF), sigma, calFctr, 178 180 baseLin, baseSub, -
trunk/src/python_SDMemTable.cc
r56 r79 51 51 (boost::python::arg("whichRow")=0, 52 52 boost::python::arg("unit")=std::string("GHz"), 53 boost::python::arg("frame")=std::string("TOPO"), 53 54 boost::python::arg("restFrequency")=0.0) ) 54 55 .def("getmask", &SDMemTableWrapper::getMask,
Note:
See TracChangeset
for help on using the changeset viewer.