- Timestamp:
- 01/31/13 18:55:29 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/BufferedLinearInterpolator1D.tcc
r2733 r2756 11 11 // 12 12 #include <assert.h> 13 14 #include <casa/Exceptions/Error.h> 15 #include <casa/Utilities/Assert.h> 13 16 14 17 #include "BufferedLinearInterpolator1D.h" … … 43 46 U BufferedLinearInterpolator1D<T, U>::interpolate(T x) 44 47 { 45 assert(this->isready()); 48 //assert(this->isready()); 49 assert_<casa::AipsError>(this->isready(), "object is not ready to process."); 46 50 if (this->n_ == 1) 47 51 return this->y_[0]; -
trunk/src/CalibrationManager.cpp
r2750 r2756 14 14 #include <casa/Arrays/Vector.h> 15 15 #include <casa/Exceptions/Error.h> 16 #include <casa/Utilities/Assert.h> 16 17 #include <casa/Utilities/Regex.h> 17 18 #include <casa/BasicSL/String.h> … … 150 151 os_.origin(LogOrigin("CalibrationManager","calibrate",WHERE)); 151 152 os_ << LogIO::DEBUGGING << "start calibration with mode " << calmode_ << "." << LogIO::POST; 152 assert(!target_.null()); 153 //assert(!target_.null()); 154 assert_<AipsError>(!target_.null(), "You have to set target scantable first."); 153 155 if (calmode_ == "TSYS") { 154 assert(spwlist_.size() > 0); 156 //assert(spwlist_.size() > 0); 157 assert_<AipsError>(spwlist_.size() > 0, "You have to set list of IFNOs for ATM calibration."); 155 158 STCalTsys cal(target_, spwlist_); 156 159 cal.calibrate(); … … 198 201 os_.origin(LogOrigin("CalibrationManager","saveCaltable",WHERE)); 199 202 if (calmode_ == "TSYS") { 200 assert(tsystables_.size() > 0); 203 //assert(tsystables_.size() > 0); 204 assert_<AipsError>(tsystables_.size() > 0, "Tsys table list is empty."); 201 205 os_ << LogIO::DEBUGGING << "save latest STCalTsysTable as " << name << "." << LogIO::POST; 202 206 tsystables_[tsystables_.size()-1]->save(name); 203 207 } 204 208 else { 205 assert(skytables_.size() > 0); 209 //assert(skytables_.size() > 0); 210 assert_<AipsError>(skytables_.size() > 0, "Sky table list is empty."); 206 211 os_ << LogIO::DEBUGGING << "save latest STCalSkyTable as " << name << "." << LogIO::POST; 207 212 skytables_[skytables_.size()-1]->save(name); -
trunk/src/Calibrator.cpp
r2720 r2756 14 14 #include <casa/Arrays/Vector.h> 15 15 #include <casa/Exceptions/Error.h> 16 #include <casa/Utilities/Assert.h> 16 17 17 18 #include "Calibrator.h" … … 71 72 void Calibrator::setReference(Vector<Float> &v) 72 73 { 73 assert(v.nelements() == nchan_); 74 //assert(v.nelements() == nchan_); 75 assert_<AipsError>(v.nelements() == nchan_, "Reference spectrum shape mismatch."); 74 76 set(ref_, v); 75 77 } … … 77 79 void Calibrator::setReference2(Vector<Float> &v) 78 80 { 79 assert(v.nelements() == nchan_); 81 //assert(v.nelements() == nchan_); 82 assert_<AipsError>(v.nelements() == nchan_, "Second reference spectrum shape mismatch."); 80 83 if (!ref2_) 81 84 ref2_ = new Float[nchan_]; … … 85 88 void Calibrator::setScaler(Vector<Float> &v) 86 89 { 87 assert(v.nelements() == nchan_ || v.nelements() == 1); 90 //assert(v.nelements() == nchan_ || v.nelements() == 1); 91 assert_<AipsError>(v.nelements() == nchan_ || v.nelements() == 1, 92 "Scaling factor shape mismatch."); 88 93 if (nchanS_ == 0) { 89 94 nchanS_ = v.nelements(); -
trunk/src/CubicSplineInterpolator1D.tcc
r2736 r2756 11 11 // 12 12 #include <assert.h> 13 14 #include <casa/Exceptions/Error.h> 15 #include <casa/Utilities/Assert.h> 13 16 14 17 #include <iostream> … … 58 61 U CubicSplineInterpolator1D<T, U>::interpolate(T x) 59 62 { 60 assert(this->isready()); 63 //assert(this->isready()); 64 assert_<casa::AipsError>(this->isready(), "object is not ready to process."); 61 65 if (this->n_ == 1) 62 66 return this->y_[0]; -
trunk/src/Interpolator1D.tcc
r2733 r2756 14 14 #include <casa/Arrays/Vector.h> 15 15 #include <casa/Exceptions/Error.h> 16 #include <casa/Utilities/Assert.h> 16 17 17 18 #include "Interpolator1D.h" … … 52 53 void Interpolator1D<T, U>::setX(T *x, unsigned int n) 53 54 { 54 assert(n_ == 0 || n_ == n); 55 //assert(n_ == 0 || n_ == n); 56 casa::assert_<casa::AipsError>(n_ == 0 || n_ == n, "length mismatch in data."); 55 57 x_ = x; 56 58 n_ = n; … … 62 64 void Interpolator1D<T, U>::setY(U *y, unsigned int n) 63 65 { 64 assert(n_ == 0 || n_ == n); 66 //assert(n_ == 0 || n_ == n); 67 casa::assert_<casa::AipsError>(n_ == 0 || n_ == n, "length mismatch in data."); 65 68 y_ = y; 66 69 n_ = n; -
trunk/src/LinearInterpolator1D.tcc
r2733 r2756 11 11 // 12 12 #include <assert.h> 13 14 #include <casa/Exceptions/Error.h> 15 #include <casa/Utilities/Assert.h> 13 16 14 17 #include "LinearInterpolator1D.h" … … 27 30 template <class T, class U> U LinearInterpolator1D<T, U>::interpolate(T x) 28 31 { 29 assert(this->isready()); 32 //assert(this->isready()); 33 assert_<AipsError>(this->isready(),"object is not ready to process."); 30 34 if (this->n_ == 1) 31 35 return this->y_[0]; -
trunk/src/NearestInterpolator1D.tcc
r2733 r2756 11 11 // 12 12 #include <assert.h> 13 14 #include <casa/Exceptions/Error.h> 15 #include <casa/Utilities/Assert.h> 13 16 14 17 #include "NearestInterpolator1D.h" … … 29 32 template <class T, class U> U NearestInterpolator1D<T, U>::interpolate(T x) 30 33 { 31 assert(this->isready()); 34 //assert(this->isready()); 35 casa::assert_<casa::AipsError>(this->isready(),"object is not ready to process."); 32 36 if (this->n_ == 1) 33 37 return this->y_[0]; -
trunk/src/PSAlmaCalibrator.cpp
r2720 r2756 11 11 // 12 12 #include <assert.h> 13 14 #include <casa/Exceptions/Error.h> 15 #include <casa/Utilities/Assert.h> 13 16 14 17 #include "PSAlmaCalibrator.h" … … 28 31 void PSAlmaCalibrator::calibrate() 29 32 { 30 assert(source_); 31 assert(ref_); 32 assert(scaler_); 33 assert(calibrated_); 33 //assert(source_); 34 //assert(ref_); 35 //assert(scaler_); 36 //assert(calibrated_); 37 assert_<AipsError>(source_, "Source spectrum is null."); 38 assert_<AipsError>(ref_, "Reference spectrum is null."); 39 assert_<AipsError>(scaler_, "Scaling factor is null."); 40 assert_<AipsError>(calibrated_, "Calibrated spectrum is null."); 34 41 35 42 Float *p_s = source_; -
trunk/src/PolynomialInterpolator1D.tcc
r2733 r2756 16 16 17 17 #include <casa/Exceptions/Error.h> 18 #include <casa/Utilities/Assert.h> 18 19 19 20 #include "PolynomialInterpolator1D.h" … … 33 34 U PolynomialInterpolator1D<T, U>::interpolate(T x) 34 35 { 35 assert(this->isready()); 36 //casa::AlwaysAssert((this->isready()),(casa::AipsError)); 37 casa::assert_<casa::AipsError>(this->isready(), "object is not ready to process."); 36 38 if (this->n_ == 1) 37 39 return this->y_[0]; -
trunk/src/STApplyCal.cpp
r2750 r2756 22 22 #include <casa/Utilities/CountedPtr.h> 23 23 #include <casa/Utilities/Sort.h> 24 #include <casa/Utilities/Assert.h> 24 25 #include <tables/Tables/Table.h> 25 26 … … 169 170 os_.origin(LogOrigin("STApplyCal","apply",WHERE)); 170 171 171 assert(!target_.null()); 172 //assert(!target_.null()); 173 assert_<AipsError>(!target_.null(),"You have to set target scantable first."); 172 174 173 175 // calibrator … … 458 460 void STApplyCal::save(const String &name) 459 461 { 460 assert(!work_.null()); 462 //assert(!work_.null()); 463 assert_<AipsError>(!work_.null(),"You have to execute apply method first."); 461 464 462 465 work_->setSelection(sel_); … … 467 470 Vector<Double> STApplyCal::getBaseFrequency(uInt whichrow) 468 471 { 469 assert(whichrow <= (uInt)work_->nrow()); 472 //assert(whichrow <= (uInt)work_->nrow()); 473 assert_<AipsError>(whichrow <= (uInt)work_->nrow(),"row index out of range."); 470 474 ROTableColumn col(work_->table(), "IFNO"); 471 475 uInt ifno = col.asuInt(whichrow); -
trunk/src/STApplyCal.h
r2750 r2756 28 28 #include "STApplyTable.h" 29 29 #include "STCalEnum.h" 30 #include "Calibrator.h"31 #include "Interpolator1D.h"30 //#include "Calibrator.h" 31 //#include "Interpolator1D.h" 32 32 #include "STCalSkyTable.h" 33 33 #include "STCalTsysTable.h" 34 34 35 35 namespace asap { 36 37 template<class T, class U> class Interpolator1D; 38 class Calibrator; 36 39 37 40 /** -
trunk/src/STCalTsysTable.cpp
r2724 r2756 13 13 14 14 #include <casa/Exceptions/Error.h> 15 #include <casa/Utilities/Assert.h> 15 16 #include <tables/Tables/TableDesc.h> 16 17 #include <tables/Tables/SetupNewTab.h> … … 107 108 Vector<Double> STCalTsysTable::getBaseFrequency(uInt whichrow) 108 109 { 109 assert(whichrow < nrow()); 110 //assert(whichrow < nrow()); 111 assert_<AipsError>(whichrow < nrow(), "row index out of range."); 110 112 uInt freqid = freqidCol_(whichrow); 111 113 uInt nc = tsysCol_(whichrow).nelements();
Note:
See TracChangeset
for help on using the changeset viewer.