- Timestamp:
- 04/28/10 21:44:09 (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/CHANGELOG
r1725 r1730 4 4 Release 3.0.0 [2010-04-??] 5 5 6 * Ticket #183 Added scantable.get_weather 7 * Ticket #181 Added work-around for casacore bug in saving tables with selection 8 * Ticket #178 Added opacity_model based on miriad's atmospheric model 6 9 * Ticket #177 Added function skydip to determine opacities. 7 10 * Ticket #172 Fixed non-working scantable.resample … … 21 24 scantable.get_coordinate 22 25 * Added OS X 10.5 Disk image installer 26 * Added support for OS X 10.6 23 27 * Interactive plotting annotations via optional argument interactive=True 24 28 * Interactive creation of masks on the plotter - plotter.create_mask -
trunk/python/scantable.py
r1725 r1730 417 417 return list(Scantable.get_column_names(self)) 418 418 419 def get_tsys(self ):419 def get_tsys(self, row=-1): 420 420 """ 421 421 Return the System temperatures. … … 423 423 a list of Tsys values for the current selection 424 424 """ 425 425 if row > -1: 426 return self._get_column(self._gettsys, row) 426 427 return self._row_callback(self._gettsys, "Tsys") 428 429 430 def get_weather(self, row=-1): 431 values = self._get_column(self._get_weather, row) 432 if row > -1: 433 return {'temperature': values[0], 434 'pressure': values[1], 'humidity' : values[2], 435 'windspeed' : values[3], 'windaz' : values[4] 436 } 437 else: 438 out = [] 439 for r in values: 440 441 out.append({'temperature': r[0], 442 'pressure': r[1], 'humidity' : r[2], 443 'windspeed' : r[3], 'windaz' : r[4] 444 }) 445 return out 427 446 428 447 def _row_callback(self, callback, label): … … 455 474 return [callback(i) for i in range(self.nrow())] 456 475 else: 457 if 476 if 0 <= row < self.nrow(): 458 477 return callback(row) 459 478 … … 559 578 return self._get_column(self._getdirectionvec, row) 560 579 561 580 @print_log_dec 562 581 def set_unit(self, unit='channel'): 563 582 """ -
trunk/src/Scantable.cpp
r1728 r1730 279 279 rbeamCol_.attach(table_, "REFBEAMNO"); 280 280 281 mweatheridCol_.attach(table_,"WEATHER_ID"); 281 282 mfitidCol_.attach(table_,"FIT_ID"); 282 283 mfreqidCol_.attach(table_, "FREQ_ID"); … … 434 435 Table tab = table_.copyToMemoryTable(generateName()); 435 436 tab.deepCopy(inname, Table::New); 437 tab.markForDelete(); 438 436 439 } else { 437 440 table_.deepCopy(inname, Table::New); … … 1056 1059 } 1057 1060 1058 std::string asap::Scantable::getAntennaName() const1061 std::string Scantable::getAntennaName() const 1059 1062 { 1060 1063 String out; … … 1063 1066 } 1064 1067 1065 int asap::Scantable::checkScanInfo(const std::vector<int>& scanlist) const1068 int Scantable::checkScanInfo(const std::vector<int>& scanlist) const 1066 1069 { 1067 1070 String tbpath; … … 1131 1134 } 1132 1135 1133 std::vector<double> asap::Scantable::getDirectionVector(int whichrow) const1136 std::vector<double> Scantable::getDirectionVector(int whichrow) const 1134 1137 { 1135 1138 Vector<Double> Dir = dirCol_(whichrow).getAngle("rad").getValue(); … … 1139 1142 } 1140 1143 1144 std::vector<float> Scantable::getWeather(int whichrow) const 1145 { 1146 std::vector<float> out(5); 1147 //Float temperature, pressure, humidity, windspeed, windaz; 1148 weatherTable_.getEntry(out[0], out[1], out[2], out[3], out[4], 1149 mweatheridCol_(uInt(whichrow))); 1150 1151 1152 return out; 1153 } 1154 1141 1155 } 1142 1156 //namespace asap -
trunk/src/Scantable.h
r1727 r1730 348 348 std::vector<double> getAbcissa(int whichrow) const; 349 349 350 std::vector<float> getWeather(int whichrow) const; 351 350 352 std::string getAbcissaLabel(int whichrow) const; 351 353 std::vector<double> getRestFrequencies() const -
trunk/src/ScantableWrapper.h
r1598 r1730 210 210 { return table_->checkScanInfo(scanlist); } 211 211 212 std::vector<double> 212 std::vector<double> getDirectionVector(int whichrow) const 213 213 { return table_->getDirectionVector(whichrow); } 214 214 … … 219 219 return STCoordinate(table_->getSpectralCoordinate(row)); 220 220 } 221 222 std::vector<float> getWeather(int whichrow) const 223 { return table_->getWeather(whichrow); } 221 224 222 225 private: -
trunk/src/python_Scantable.cpp
r1598 r1730 126 126 .def("_parallactify", &ScantableWrapper::parallactify) 127 127 .def("get_coordinate", &ScantableWrapper::getCoordinate) 128 .def("_get_weather", &ScantableWrapper::getWeather) 128 129 ; 129 130 };
Note:
See TracChangeset
for help on using the changeset viewer.