Changeset 472
- Timestamp:
- 02/18/05 11:16:27 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r465 r472 366 366 std::vector<float> SDMemTable::getStokesSpectrum(Int whichRow, Bool doPol, 367 367 Float paOffset) const 368 // Gets 369 // doPol=False : I,Q,U,V 370 // doPol=True : I,P,PA,V ; P = sqrt(Q**2+U**2), PA = 0.5*atan2(Q,U) 371 // 368 // 369 // Gets one STokes parameter depending on cursor polSel location 370 // doPol=False : I,Q,U,V 371 // doPol=True : I,P,PA,V ; P = sqrt(Q**2+U**2), PA = 0.5*atan2(Q,U) 372 // 372 373 { 373 374 AlwaysAssert(asap::nAxes==4,AipsError); … … 450 451 451 452 return stlout; 453 } 454 455 Array<Float> SDMemTable::getStokesSpectrum(Int whichRow, Int iBeam, Int iIF) const 456 { 457 458 // Get data 459 460 Array<Float> arr; 461 stokesCol_.get(whichRow, arr); 462 463 // Set current cursor location and overwrite polarization axis 464 465 const IPosition& shape = arr.shape(); 466 IPosition start(shape.nelements(),0); 467 IPosition end(shape-1); 468 if (iBeam!=-1) { 469 start(asap::BeamAxis) = iBeam; 470 end(asap::BeamAxis) = iBeam; 471 } 472 if (iIF!=-1) { 473 start(asap::IFAxis) = iIF; 474 end(asap::IFAxis) = iIF; 475 } 476 477 // Get slice 478 479 return arr(start,end); 452 480 } 453 481 … … 1172 1200 histCol_.put(rno, sdc.getHistory()); 1173 1201 fitCol_.put(rno, sdc.getFitMap()); 1174 1175 1202 return true; 1176 1203 } -
trunk/src/SDMemTable.h
r465 r472 103 103 // getCircularSpectrum is 'getCircular' 104 104 105 106 // Get Stokes at cursor location. One of either I,Q,U,V or I,P,PA,V107 // (doPol=True)If the latter, you can add a PA offset (degrees)105 // Get specific Stokes at cursor location. One of either I,Q,U,V or I,P,PA,V (doPol=True) 106 // (determined by the polSel cursor location 0->3) 107 // If the latter, you can add a PA offset (degrees) 108 108 virtual std::vector<float> getStokesSpectrum(casa::Int whichRow=0, 109 109 casa::Bool doPol=casa::False, … … 114 114 casa::Bool rr=casa::True) const; 115 115 116 // Get all Stokes at the specified Beam/IF cursor location (ignoring 117 // the internal cursor). -1 means all on that axis. Really, this function 118 // should not be here, and the SDContainer should hold the stokes spectrum 119 // as well. However, because the Stokes column is virtual, and its shape 120 // is not the same as nPol(), I have put it here for direct access as needed 121 virtual casa::Array<casa::Float> getStokesSpectrum(casa::Int whichRow=0, 122 casa::Int iBeam=-1, 123 casa::Int iIF=-1) const; 124 125 // Get Tsys at cursor location 116 126 virtual casa::Float getTsys(casa::Int whichRow=0) const; 127 117 128 // get all as aips++ Vectors 118 129 virtual void getSpectrum(casa::Vector<casa::Float>& spectrum, … … 120 131 //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const; 121 132 133 // Get rest frequencies 122 134 std::vector<double> getRestFreqs() const; 123 135
Note:
See TracChangeset
for help on using the changeset viewer.