- Timestamp:
- 08/28/06 12:28:27 (18 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 5 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); -
trunk/src/Scantable.cpp
r1170 r1189 56 56 #include "Scantable.h" 57 57 #include "STPolLinear.h" 58 #include "STPolCircular.h" 58 59 #include "STPolStokes.h" 59 60 #include "STAttr.h" … … 69 70 if ( factories_.empty() ) { 70 71 Scantable::factories_["linear"] = &STPolLinear::myFactory; 72 Scantable::factories_["circular"] = &STPolStokes::myFactory; 71 73 Scantable::factories_["stokes"] = &STPolStokes::myFactory; 72 74 } … … 398 400 nameU.upcase(); 399 401 table_.rwKeywordSet().define(String("AntennaName"), nameU); 402 } 403 404 void Scantable::setFeedType(const std::string& feedtype) 405 { 406 if ( Scantable::factories_.find(feedtype) == Scantable::factories_.end() ) { 407 std::string msg = "Illegal feed type "+ feedtype; 408 throw(casa::AipsError(msg)); 409 } 410 table_.rwKeywordSet().define(String("POLTYPE"), feedtype); 400 411 } 401 412 -
trunk/src/Scantable.h
r1170 r1189 202 202 203 203 /** 204 * Set the Stokes type of the data 205 * @param a string representing the type, e.g "circular" or "linear" 206 */ 207 void setFeedType( const std::string& feedtype ); 208 209 /** 204 210 * 205 211 * @param instrument a string representing an insturment. see xxx -
trunk/src/ScantableWrapper.h
r1170 r1189 93 93 94 94 void setInstrument(const std::string& name) {table_->setInstrument(name);} 95 void setFeedType(const std::string& ftype) {table_->setFeedType(ftype);} 95 96 96 97 std::vector<bool> getMask(int whichrow=0) const -
trunk/src/python_Scantable.cpp
r1111 r1189 73 73 .def("set_fluxunit", &ScantableWrapper::setFluxUnit) 74 74 .def("_setInstrument", &ScantableWrapper::setInstrument) 75 .def("_setfeedtype", &ScantableWrapper::setFeedType) 75 76 .def("_getspectrum", &ScantableWrapper::getSpectrum, 76 77 (arg("whichrow")=0, arg("poltype")=std::string("")) )
Note:
See TracChangeset
for help on using the changeset viewer.