Changeset 1189 for trunk/src/STPolLinear.cpp
- Timestamp:
- 08/28/06 12:28:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STPolLinear.cpp
r1007 r1189 49 49 break; 50 50 } 51 } else if (nspec() == 2) { 52 if ( index == 0 ) 53 out = Vector<Float>(getSpectrum(0) + getSpectrum(1)); 51 54 } 52 55 return out; … … 55 58 Vector<Float> asap::STPolLinear::getLinPol( uInt index ) 56 59 { 60 if (nspec() != 4) { 61 throw(AipsError("You must have 4 linear polarizations to run this function")); 62 } 57 63 if ( index < 0 || index >4 ) throw(AipsError("LinPol index out of range")); 58 64 Vector<Float> out,q,u; … … 87 93 // We use the convention 88 94 // I = (RR+LL) // definition changed 89 95 if (nspec() != 4) { 96 throw(AipsError("You must have 4 linear polarizations to run this function")); 97 } 90 98 if ( index == 2 || index ==3 ) throw(AipsError("Re/Imag RL not implemented")); 91 99 Vector<Float> I,V,out; … … 121 129 { 122 130 // phase isnt used, just ro keep interface the same for all pol operations 131 if (nspec() != 4) { 132 throw(AipsError("You must have 4 linear polarizations to run this function")); 133 } 123 134 Matrix<Float>& specs = getSpectra(); 124 135 Vector<Float> I = specs.column(3); … … 135 146 // C1 = XX; C2 = YY, C3 = Real(XY) 136 147 // 148 if (nspec() != 4) { 149 throw(AipsError("You must have 4 linear polarizations to run this function")); 150 } 137 151 Vector<Float> I,Q,U; 138 152 I = getStokes(0);
Note: See TracChangeset
for help on using the changeset viewer.