Changeset 539
- Timestamp:
- 03/08/05 15:27:49 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r527 r539 440 440 } 441 441 442 std::string SDMemTable::getPolarizationLabel (Bool linear, Bool stokes, Bool linPol, Int polIdx) const 442 std::string SDMemTable::getPolarizationLabel(Bool linear, Bool stokes, 443 Bool linPol, Int polIdx) const 443 444 { 444 445 uInt idx = polSel_; 445 446 if (polIdx >=0) idx = polIdx; 446 // 447 return SDPolUtil::polarizationLabel (idx, linear, stokes, linPol); 448 } 449 450 451 452 std::vector<float> SDMemTable::stokesToPolSpectrum (Int whichRow, Bool toLinear, uInt polIdx) const 447 return SDPolUtil::polarizationLabel(idx, linear, stokes, linPol); 448 } 449 450 451 452 std::vector<float> SDMemTable::stokesToPolSpectrum(Int whichRow, 453 Bool toLinear, 454 Int polIdx) const 453 455 // 454 456 // polIdx … … 481 483 throw(AipsError("Conversion to linears not yet supported")); 482 484 } else { 483 Bool doRR = (polIdx==0); 484 if(polIdx>1) { 485 throw(AipsError("Only conversion to RR & LL is currently supported")); 486 } 487 488 // Get I and V slices 489 490 Array<Float> I = SDPolUtil::getStokesSlice(arr,start,end,"I"); 491 Array<Float> V = SDPolUtil::getStokesSlice(arr,start,end,"V"); 492 493 // Compute output 494 495 out = SDPolUtil::circularPolarizationFromStokes(I, V, doRR); 496 } 497 498 // Copy to output 499 485 uInt selection = polSel_; 486 if (polIdx > -1) selection = polIdx; 487 Bool doRR = (selection==0); 488 if (selection>1) { 489 throw(AipsError("Only conversion to RR & LL is currently supported")); 490 } 491 492 // Get I and V slices 493 Array<Float> I = SDPolUtil::getStokesSlice(arr,start,end,"I"); 494 Array<Float> V = SDPolUtil::getStokesSlice(arr,start,end,"V"); 495 496 // Compute output 497 out = SDPolUtil::circularPolarizationFromStokes(I, V, doRR); 498 } 499 500 // Copy to output 500 501 IPosition vecShape(1,shape(asap::ChanAxis)); 501 502 Vector<Float> outV = out.reform(vecShape); -
trunk/src/SDMemTable.h
r527 r539 117 117 virtual std::vector<float> stokesToPolSpectrum(casa::Int whichRow, 118 118 casa::Bool toLinear, 119 casa:: uInt polIdx) const;119 casa::Int polIdx) const; 120 120 121 121 // Get all Stokes at the specified Beam/IF cursor location (ignoring -
trunk/src/SDMemTableWrapper.h
r527 r539 91 91 } 92 92 93 std::vector<float> stokesToPolSpectrum(int whichRow , bool linear,94 int polIdx ) const {93 std::vector<float> stokesToPolSpectrum(int whichRow=0, bool linear=false, 94 int polIdx=-1) const { 95 95 return table_->stokesToPolSpectrum(whichRow, linear, polIdx); 96 96 } -
trunk/src/python_SDMemTable.cc
r505 r539 77 77 (boost::python::arg("whichRow")=0), 78 78 (boost::python::arg("linear")=false), 79 (boost::python::arg("thepol")= 0) )79 (boost::python::arg("thepol")=-1) ) 80 80 .def("_getpolarizationlabel", &SDMemTableWrapper::getPolarizationLabel, 81 81 (boost::python::arg("linear")=false),
Note:
See TracChangeset
for help on using the changeset viewer.