Ignore:
Timestamp:
02/16/05 12:40:39 (19 years ago)
Author:
kil064
Message:

move SDMemTable::rotateXYPhase to SDMath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.cc

    r455 r457  
    6464#include "MathUtils.h"
    6565#include "SDPol.h"
     66
    6667
    6768
     
    16711672
    16721673
    1673 void SDMemTable::rotateXYPhase (Float value, Bool doAll)
    1674   // phase in degrees
    1675   // Applies to all Beams and IFs
    1676   // Might want to optionally select on Beam/IF
    1677 {
    1678   if (nPol() != 4) {
    1679     throw(AipsError("You must have 4 polarizations to run this function"));
    1680   }
    1681  
    1682   IPosition start(asap::nAxes,0);
    1683   IPosition end(asap::nAxes);
    1684  
    1685   uInt nRow = specCol_.nrow();
    1686   Array<Float> data;
    1687   for (uInt i=0; i<nRow;++i) {
    1688     specCol_.get(i,data);
    1689     IPosition shape = data.shape();
    1690    
    1691     // Set slice
    1692     if (!doAll) {
    1693       setCursorSlice (start, end, shape);
    1694     } else {
    1695       end = shape-1;
    1696     }
    1697 
    1698     // Get polarization slice references
    1699     start(asap::PolAxis) = 2;
    1700     end(asap::PolAxis) = 2;
    1701     Array<Float> C3 = data(start,end);
    1702    
    1703     start(asap::PolAxis) = 3;
    1704     end(asap::PolAxis) = 3;
    1705     Array<Float> C4 = data(start,end);
    1706    
    1707     // Rotate
    1708     SDPolUtil::rotateXYPhase(C3, C4, value);
    1709    
    1710     // Put
    1711     specCol_.put(i,data);
    1712   }
    1713 }
    1714 
    17151674void SDMemTable::setCursorSlice(IPosition& start, IPosition& end,
    17161675                                const IPosition& shape) const
Note: See TracChangeset for help on using the changeset viewer.