- Timestamp:
- 04/09/14 12:51:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STApplyCal.cpp
r2916 r2925 227 227 cols[2] = "IFNO" ; 228 228 CountedPtr<STIdxIter2> iter = new STIdxIter2(work_, cols) ; 229 double start = mathutil::gettimeofday_sec(); 230 os_ << LogIO::DEBUGGING << "start iterative doapply: " << start << LogIO::POST; 229 231 while (!iter->pastEnd()) { 230 232 Record ids = iter->currentValue(); … … 234 236 iter->next(); 235 237 } 238 double end = mathutil::gettimeofday_sec(); 239 os_ << LogIO::DEBUGGING << "end iterative doapply: " << end << LogIO::POST; 240 os_ << LogIO::DEBUGGING << "elapsed time for doapply: " << end - start << " sec" << LogIO::POST; 236 241 237 242 target_->unsetSelection(); … … 299 304 uInt nchanSp = skytable_[skylist[0]]->nchan(ifno); 300 305 Vector<Double> timeSky(nrowSky); 301 Matrix<Float> spoff(n chanSp, nrowSky);306 Matrix<Float> spoff(nrowSky, nchanSp); 302 307 Vector<Float> iOff(nchanSp); 303 308 nrowSky = 0; … … 308 313 for (uInt j = 0; j < t.nelements(); j++) { 309 314 timeSky[nrowSky] = t[j]; 310 spoff. column(nrowSky) = sp.column(j);315 spoff.row(nrowSky) = sp.column(j); 311 316 nrowSky++; 312 317 } … … 334 339 //os_ << "doTsys" << LogIO::POST; 335 340 timeTsys.resize(nrowTsys); 336 tsys.resize(n chanTsys, nrowTsys);341 tsys.resize(nrowTsys, nchanTsys); 337 342 nrowTsys = 0; 338 343 for (uInt i = 0 ; i < tsystable_.size(); i++) { … … 342 347 for (uInt j = 0; j < t.nelements(); j++) { 343 348 timeTsys[nrowTsys] = t[j]; 344 tsys. column(nrowTsys) = ts.column(j);349 tsys.row(nrowTsys) = ts.column(j); 345 350 nrowTsys++; 346 351 } … … 364 369 ScalarColumn<Double> timeCol(tab, "TIME"); 365 370 Vector<Float> on; 371 372 // Array for scaling factor (aka Tsys) 373 Vector<Float> iTsys(IPosition(1,nchanSp), new Float[nchanSp], TAKE_OVER); 374 366 375 for (uInt i = 0; i < rows.nelements(); i++) { 367 376 //os_ << "start i = " << i << " (row = " << rows[i] << ")" << LogIO::POST; … … 376 385 Double t0 = timeCol(irow); 377 386 for (uInt ichan = 0; ichan < nchanSp; ichan++) { 378 Vector<Float> spOffSlice = spoff.row(ichan);379 //os_ << "spOffSlice = " << spOffSlice << LogIO::POST;380 387 for (uInt j = 0; j < skyIdx.nelements(); j++) { 381 tmpOff[j] = sp OffSlice[skyIdx[j]];388 tmpOff[j] = spoff(skyIdx[j], ichan); 382 389 } 383 390 interpolatorS_->setY(ya, skyIdx.nelements()); … … 387 394 calibrator_->setReference(iOff); 388 395 389 Float *Y = new Float[nchanSp];390 Vector<Float> iTsys(IPosition(1,nchanSp), Y, TAKE_OVER);391 396 if (doTsys) { 392 397 // Tsys correction … … 395 400 Float *yb = tmpTsys.data(); 396 401 for (uInt ichan = 0; ichan < nchanTsys; ichan++) { 397 Vector<Float> tsysSlice = tsys.row(ichan);398 402 for (uInt j = 0; j < tsysIdx.nelements(); j++) { 399 tmpTsys[j] = tsys Slice[tsysIdx[j]];403 tmpTsys[j] = tsys(tsysIdx[j], ichan); 400 404 } 401 405 interpolatorT_->setY(yb, tsysIdx.nelements());
Note:
See TracChangeset
for help on using the changeset viewer.