- Timestamp:
- 12/15/14 17:26:43 (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Locator.tcc
r2732 r3020 11 11 // 12 12 #include <assert.h> 13 #include <iostream> 14 #include <stdexcept> 13 15 14 16 #include "Locator.h" … … 57 59 x_ = v; 58 60 } 61 assert(n_ > 0); 62 if (n_ == 0) { 63 throw std::runtime_error("Input array length is 0."); 64 } 59 65 ascending_ = (x_[0] <= x_[n_-1]); 60 66 } -
trunk/src/STApplyCal.cpp
r2965 r3020 507 507 timeTsys, tsys, flagtsys); 508 508 nrowTsys = timeTsys.nelements(); 509 510 if (allNE(flagtsys, (uChar)0)) { 511 os_ << LogIO::WARN << "No valid Tsys measurement. Skip Tsys calibration." << LogIO::POST; 512 doTsys = False; 513 } 509 514 } 510 515 … … 574 579 uInt wnchan = setupWorkingData(nchanTsys, ftsys.data(), iTsysT.data(), 575 580 fwork_p, xwork_p, ywork_p); 581 assert(wnchan > 0); 582 if (wnchan == 0) { 583 throw AipsError("No valid Tsys measurements."); 584 } 576 585 interpolatorF_->setData(xwork_p, ywork_p, wnchan); 577 586 for (uInt ichan = 0; ichan < nchanSp; ichan++) { 578 587 iTsys[ichan] = interpolatorF_->interpolate(fsp[ichan]); 579 588 }
Note:
See TracChangeset
for help on using the changeset viewer.