Ignore:
Timestamp:
01/31/13 18:55:29 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4770

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdcal2

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Replace assert with casa::assert_ to avoid aborting casapy session.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Calibrator.cpp

    r2720 r2756  
    1414#include <casa/Arrays/Vector.h>
    1515#include <casa/Exceptions/Error.h>
     16#include <casa/Utilities/Assert.h>
    1617
    1718#include "Calibrator.h"
     
    7172void Calibrator::setReference(Vector<Float> &v)
    7273{
    73   assert(v.nelements() == nchan_);
     74  //assert(v.nelements() == nchan_);
     75  assert_<AipsError>(v.nelements() == nchan_, "Reference spectrum shape mismatch.");
    7476  set(ref_, v);
    7577}
     
    7779void Calibrator::setReference2(Vector<Float> &v)
    7880{
    79   assert(v.nelements() == nchan_);
     81  //assert(v.nelements() == nchan_);
     82  assert_<AipsError>(v.nelements() == nchan_, "Second reference spectrum shape mismatch.");
    8083  if (!ref2_)
    8184    ref2_ = new Float[nchan_];
     
    8588void Calibrator::setScaler(Vector<Float> &v)
    8689{
    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.");
    8893  if (nchanS_ == 0) {
    8994    nchanS_ = v.nelements();
Note: See TracChangeset for help on using the changeset viewer.