Changeset 247 for trunk/src


Ignore:
Timestamp:
01/21/05 15:09:39 (20 years ago)
Author:
kil064
Message:

fix error in nRow test in function quotient

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMath.cc

    r244 r247  
    374374  const uInt nRowOff = off->nRow();
    375375  Bool ok = (nRowOff==1&&nRowOn>0) ||
    376             (nRowOn>0&&nRowOn==nRowOff);
     376            (nRowOff>=1&&nRowOn==nRowOff);
    377377  if (!ok) {
    378378     throw (AipsError("The reference Scan Table can have one row or the same number of rows as the source Scan Table"));
     
    402402     MaskedArray<Float> mOn(on->rowAsMaskedArray(i));
    403403     IPosition shpOn = mOn.shape();
     404     tSysOn.get(i, tSysOnArr);
    404405//
    405406     if (nRowOff>1) {
     
    407408        pMOff = new MaskedArray<Float>(off->rowAsMaskedArray(i));
    408409        shpOff = pMOff->shape();
    409         if (!shpOn.isEqual(shpOff)) {
    410            throw(AipsError("on/off data are not conformant"));
    411         }
    412 //
    413410        tSysOff.get(i, tSysOffArr);
    414         tSysOn.get(i, tSysOnArr);
    415         if (!tSysOnArr.shape().isEqual(tSysOffArr.shape())) {
    416            throw(AipsError("on/off Tsys data are not conformant"));
    417         }
    418 //
    419         if (!shpOn.isEqual(tSysOnArr.shape())) {
    420            throw(AipsError("Correlation and Tsys data are not conformant"));
    421         }
     411     }
     412
     413// Conformance
     414
     415     if (!shpOn.isEqual(shpOff)) {
     416        throw(AipsError("on/off data are not conformant"));
     417     }
     418     if (!tSysOnArr.shape().isEqual(tSysOffArr.shape())) {
     419        throw(AipsError("on/off Tsys data are not conformant"));
     420     }
     421     if (!shpOn.isEqual(tSysOnArr.shape())) {
     422        throw(AipsError("Correlation and Tsys data are not conformant"));
    422423     }
    423424
Note: See TracChangeset for help on using the changeset viewer.