Changeset 222


Ignore:
Timestamp:
01/19/05 17:07:49 (19 years ago)
Author:
kil064
Message:

add functions 'convertFluxInSitu' and 'convertFlux'

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMathWrapper.cc

    r209 r222  
    164164  return sdm.statistic(in.getCP(), mask, which);
    165165}
     166
     167
     168void SDMathWrapper::convertFluxInSitu(SDMemTableWrapper& in,
     169                                      float area, float eta, bool doAll)
     170{
     171  SDMemTable* pIn = in.getPtr();
     172  SDMath sdm;
     173  SDMemTable* pOut = sdm.convertFlux (*pIn, Float(area), Float(eta), Bool(doAll));
     174  *pIn = *pOut;
     175  delete pOut;
     176}
     177
     178
     179SDMemTableWrapper SDMathWrapper::convertFlux(const SDMemTableWrapper& in,
     180                                             float area, float eta, bool doAll)
     181{
     182  const CountedPtr<SDMemTable>& pIn = in.getCP();
     183  SDMath sdm;
     184  return CountedPtr<SDMemTable>(sdm.convertFlux(*pIn, Float(area), Float(eta), Bool(doAll)));
     185}
     186
  • trunk/src/SDMathWrapper.h

    r209 r222  
    6666  SDMemTableWrapper bin(const SDMemTableWrapper& in, int width);
    6767
     68// Convert flux
     69  void convertFluxInSitu(SDMemTableWrapper& in, float area, float eta, bool doAll);
     70  SDMemTableWrapper convertFlux(const SDMemTableWrapper& in, float area, float eta, bool doAll);
     71
    6872// Average in time
    6973  SDMemTableWrapper average(boost::python::tuple tpl,
Note: See TracChangeset for help on using the changeset viewer.