Ignore:
Timestamp:
02/25/13 15:49:06 (11 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: Yes

Module(s): sd

Description: optimisation/refactoring the baselining functions for scantable.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STBaselineTable.cpp

    r2767 r2773  
    137137}
    138138
     139void STBaselineTable::appenddata(int scanno, int cycleno,
     140                                 int beamno, int ifno, int polno,
     141                                 int freqid, Double time,
     142                                 bool apply,
     143                                 STBaselineFunc::FuncName ftype,
     144                                 int fpar,
     145                                 vector<float> ffpar,
     146                                 Vector<uInt> mask,
     147                                 vector<float> res,
     148                                 float rms,
     149                                 int nchan,
     150                                 float cthres,
     151                                 int citer,
     152                                 float lfthres,
     153                                 int lfavg,
     154                                 vector<int> lfedge)
     155{
     156  vector<int> fparam(1);
     157  fparam[0] = fpar;
     158
     159  appenddata(scanno, cycleno, beamno, ifno, polno, freqid, time,
     160             apply, ftype, fparam, ffpar, mask, res, rms, nchan,
     161             cthres, citer, lfthres, lfavg, lfedge);
     162}
     163
     164void STBaselineTable::appenddata(int scanno, int cycleno,
     165                                 int beamno, int ifno, int polno,
     166                                 int freqid, Double time,
     167                                 bool apply,
     168                                 STBaselineFunc::FuncName ftype,
     169                                 vector<int> fpar,
     170                                 vector<float> ffpar,
     171                                 Vector<uInt> mask,
     172                                 vector<float> res,
     173                                 float rms,
     174                                 int nchan,
     175                                 float cthres,
     176                                 int citer,
     177                                 float lfthres,
     178                                 int lfavg,
     179                                 vector<int> lfedge)
     180{
     181  Vector<Int> fparam(fpar.size());
     182  for (uInt i = 0; i < fpar.size(); ++i) {
     183    fparam[i] = fpar[i];
     184  }
     185  Vector<uInt> edge(lfedge.size());
     186  for (uInt i = 0; i < lfedge.size(); ++i) {
     187    edge[i] = lfedge[i];
     188  }
     189  appenddata(uInt(scanno), uInt(cycleno), uInt(beamno),
     190             uInt(ifno), uInt(polno), uInt(freqid), time,
     191             Bool(apply), ftype, fparam, Vector<Float>(ffpar),
     192             mask, Vector<Float>(res), Float(rms), uInt(nchan),
     193             Float(cthres), uInt(citer),
     194             Float(lfthres), uInt(lfavg), edge);
     195}
     196
    139197void STBaselineTable::appenddata(uInt scanno, uInt cycleno,
    140198                                 uInt beamno, uInt ifno, uInt polno,
Note: See TracChangeset for help on using the changeset viewer.