Changeset 457 for trunk/src/SDMemTable.cc
- Timestamp:
- 02/16/05 12:40:39 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r455 r457 64 64 #include "MathUtils.h" 65 65 #include "SDPol.h" 66 66 67 67 68 … … 1671 1672 1672 1673 1673 void SDMemTable::rotateXYPhase (Float value, Bool doAll)1674 // phase in degrees1675 // Applies to all Beams and IFs1676 // Might want to optionally select on Beam/IF1677 {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 slice1692 if (!doAll) {1693 setCursorSlice (start, end, shape);1694 } else {1695 end = shape-1;1696 }1697 1698 // Get polarization slice references1699 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 // Rotate1708 SDPolUtil::rotateXYPhase(C3, C4, value);1709 1710 // Put1711 specCol_.put(i,data);1712 }1713 }1714 1715 1674 void SDMemTable::setCursorSlice(IPosition& start, IPosition& end, 1716 1675 const IPosition& shape) const
Note: See TracChangeset
for help on using the changeset viewer.