Changeset 1334 for trunk/src


Ignore:
Timestamp:
04/18/07 16:21:15 (18 years ago)
Author:
mar637
Message:

Use CountedPointer for STPol instance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r1333 r1334  
    684684    specCol_.get(whichrow, arr);
    685685  } else {
    686     STPol* stpol = 0;
    687     stpol =STPol::getPolClass(Scantable::factories_, basetype);
    688     try {
    689       uInt row = uInt(whichrow);
    690       stpol->setSpectra(getPolMatrix(row));
    691       Float fang,fhand,parang;
    692       fang = focusTable_.getTotalFeedAngle(mfocusidCol_(row));
    693       fhand = focusTable_.getFeedHand(mfocusidCol_(row));
    694       parang = paraCol_(row);
    695       /// @todo re-enable this
    696       // disable total feed angle to support paralactifying Caswell style
    697       stpol->setPhaseCorrections(parang, -parang, fhand);
    698       arr = stpol->getSpectrum(requestedpol, ptype);
    699       delete stpol;
    700     } catch (AipsError& e) {
    701       delete stpol;
    702       throw(e);
    703     }
     686    CountedPtr<STPol> stpol(STPol::getPolClass(Scantable::factories_, basetype));
     687    uInt row = uInt(whichrow);
     688    stpol->setSpectra(getPolMatrix(row));
     689    Float fang,fhand,parang;
     690    fang = focusTable_.getTotalFeedAngle(mfocusidCol_(row));
     691    fhand = focusTable_.getFeedHand(mfocusidCol_(row));
     692    parang = paraCol_(row);
     693    /// @todo re-enable this
     694    // disable total feed angle to support paralactifying Caswell style
     695    stpol->setPhaseCorrections(parang, -parang, fhand);
     696    arr = stpol->getSpectrum(requestedpol, ptype);
    704697  }
    705698  if ( arr.nelements() == 0 )
Note: See TracChangeset for help on using the changeset viewer.