Changeset 426


Ignore:
Timestamp:
02/14/05 13:26:04 (19 years ago)
Author:
kil064
Message:

add paOffset to function SDmemTable::getSTokesSpectrum

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.cc

    r418 r426  
    346346}
    347347
    348 std::vector<float> SDMemTable::getStokesSpectrum(Int whichRow, Bool doPol) const
     348std::vector<float> SDMemTable::getStokesSpectrum(Int whichRow, Bool doPol, Float paOffset) const
    349349//
    350350// Gets
     
    376376        out = SDPolUtil::polarizedIntensity(Q,U);
    377377     } else if (polSel_==2) {                                 // P.A.
    378         out = SDPolUtil::positionAngle(Q,U);
     378        out = SDPolUtil::positionAngle(Q,U) + paOffset;
    379379     }
    380380//
  • trunk/src/SDMemTable.h

    r418 r426  
    9494  virtual std::vector<float> getSpectrum(casa::Int whichRow=0) const;
    9595  virtual std::vector<bool> getMask(casa::Int whichRow=0) const;
     96  // Get STokes at cursor location. One of either I,Q,U,V or I,P,PA,V (doPol=True)
     97  // If the latter, you can add a PA offset (degrees)
    9698  virtual std::vector<float> getStokesSpectrum(casa::Int whichRow=0,
    97                                                casa::Bool doPol=casa::False) const;
     99                                               casa::Bool doPol=casa::False,
     100                                               casa::Float paOffset=0.0) const;
    98101
    99102  virtual casa::Float getTsys(casa::Int whichRow=0) const;
  • trunk/src/SDMemTableWrapper.h

    r421 r426  
    8181  }
    8282
    83   std::vector<float> getStokesSpectrum(int whichRow=0, bool doPol=false) const {
    84     return table_->getStokesSpectrum(whichRow, doPol);
     83  std::vector<float> getStokesSpectrum(int whichRow=0, bool doPol=false, float paOff=0.0) const {
     84    return table_->getStokesSpectrum(whichRow, doPol, paOff);
    8585  }
    8686
  • trunk/src/SDPol.cc

    r419 r426  
    230230                                       const Array<Float>& U)
    231231{
    232    return Float(180.0/C::pi/2.0)*atan2(Q,U);
     232   return Float(180.0/C::pi/2.0)*atan2(Q,U);       // Degrees
    233233}
    234234
  • trunk/src/python_SDMemTable.cc

    r423 r426  
    7474    .def("_getstokesspectrum", &SDMemTableWrapper::getStokesSpectrum,
    7575         (boost::python::arg("whichRow")=0),
    76          (boost::python::arg("pol")=false) )
     76         (boost::python::arg("pol")=false),
     77         (boost::python::arg("pa")=0.0) )
    7778    .def("_setspectrum",&SDMemTableWrapper::setSpectrum,
    7879         (boost::python::arg("whichRow")=0) )
Note: See TracChangeset for help on using the changeset viewer.