- Timestamp:
- 03/21/06 13:56:43 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STPolLinear.cpp
r904 r911 120 120 } 121 121 122 void asap::STPolLinear::rotateLinPolPhase( casa::Float phase ) 123 { 124 // 125 // Rotate P = Q + iU but do it directly on the linear 126 // correlations. 127 // 128 // We are using I=(XX+YY)/2 convention 129 // C1 = XX; C2 = YY, C3 = Real(XY) 130 // 131 Vector<Float> I,Q,U; 132 I = getStokes(0); 133 Q = getStokes(1); 134 U = getStokes(2); 135 // Rotate Q & U (factor of 2 for polarization) 136 Float cosVal = cos(C::pi/180.0*2.0*phase); 137 Float sinVal = sin(C::pi/180.0*2.0*phase); 138 Vector<Float> Q2 = Q*cosVal - U*sinVal; 139 U = Q*sinVal + U*cosVal; 140 Q = Q2; 141 Matrix<Float>& specs = getSpectra(); 142 specs.column(0) = I+Q; 143 specs.column(1) = I-Q; 144 specs.column(2) = U; 145 122 146 } 147 148 }
Note:
See TracChangeset
for help on using the changeset viewer.