Changeset 2740


Ignore:
Timestamp:
01/18/13 20:42:21 (11 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-4794

Ready for Test: No

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sd

Description:


Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STBaselineTable.cpp

    r2738 r2740  
    5252{
    5353  table_.addColumn(ScalarColumnDesc<uInt>("NCHAN"));
    54   table_.addColumn(ScalarColumnDesc<uInt>("FUNCTION"));
    55   table_.addColumn(ScalarColumnDesc<uInt>("ORDER"));
     54  table_.addColumn(ScalarColumnDesc<uInt>("FUNC_TYPE"));
     55  table_.addColumn(ArrayColumnDesc<uInt>("FUNC_PARAM"));
     56  table_.addColumn(ArrayColumnDesc<Float>("FUNC_FPARAM"));
    5657  table_.addColumn(ScalarColumnDesc<uInt>("CLIP_ITERATION"));
    5758  table_.addColumn(ScalarColumnDesc<Float>("CLIP_THRESHOLD"));
    58   table_.addColumn(ArrayColumnDesc<Float>("SECTION"));
    59   table_.addColumn(ArrayColumnDesc<Float>("PARAMETER"));
    60   table_.addColumn(ArrayColumnDesc<Float>("MASKLIST"));
     59  table_.addColumn(ArrayColumnDesc<uInt>("MASKLIST"));
     60  table_.addColumn(ArrayColumnDesc<Float>("RESULT"));
    6161  table_.addColumn(ScalarColumnDesc<Float>("RMS"));
    6262
     
    6969{
    7070  nchanCol_.attach(table_, "NCHAN");
    71   funcCol_.attach(table_, "FUNCTION");
    72   orderCol_.attach(table_, "ORDER");
    73   clipiterCol_.attach(table_, "CLIP_ITERATION");
    74   clipthresCol_.attach(table_, "CLIP_THRESHOLD");
    75   sectCol_.attach(table_, "SECTION");
    76   paramCol_.attach(table_, "PARAMETER");
     71  ftypeCol_.attach(table_, "FUNC_TYPE");
     72  fparCol_.attach(table_, "FUNC_PARAM");
     73  ffparCol_.attach(table_, "FUNC_FPARAM");
     74  citerCol_.attach(table_, "CLIP_ITERATION");
     75  cthresCol_.attach(table_, "CLIP_THRESHOLD");
    7776  maskCol_.attach(table_, "MASKLIST");
     77  resCol_.attach(table_, "RESULT");
    7878  rmsCol_.attach(table_, "RMS");
    7979}
     
    8888
    8989void STBaselineTable::setdata(uInt irow, uInt scanno, uInt cycleno,
    90                              uInt beamno, uInt ifno, uInt polno, uInt freqid, 
    91                                    Double time, uInt nchan, STBaselineFunc::FuncName func, uInt order,
    92                              uInt clipiter, Float clipthres,
    93                              Vector<Float> sect, Vector<Float> param,
    94                              Vector<Float> mask, Float rms)
     90                              uInt beamno, uInt ifno, uInt polno,
     91                              uInt freqid, Double time,
     92                              uInt nchan,
     93                              STBaselineFunc::FuncName ftype,
     94                              Vector<uInt> fpar,
     95                              Vector<Float> ffpar,
     96                              uInt citer,
     97                              Float cthres,
     98                              Vector<uInt> mask,
     99                              Vector<Float> res,
     100                              Float rms)
    95101{
    96102  if (irow >= (uInt)nrow()) {
     
    105111  setbasedata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time);
    106112  nchanCol_.put(irow, nchan);
    107   funcCol_.put(irow, uInt(func));
    108   orderCol_.put(irow, order);
    109   clipiterCol_.put(irow, clipiter);
    110   clipthresCol_.put(irow, clipthres);
    111   sectCol_.put(irow, sect);
    112   paramCol_.put(irow, param);
     113  ftypeCol_.put(irow, uInt(ftype));
     114  fparCol_.put(irow, fpar);
     115  ffparCol_.put(irow, ffpar);
     116  citerCol_.put(irow, citer);
     117  cthresCol_.put(irow, cthres);
    113118  maskCol_.put(irow, mask);
     119  resCol_.put(irow, res);
    114120  rmsCol_.put(irow, rms);
    115121}
    116122
    117123void STBaselineTable::appenddata(uInt scanno, uInt cycleno,
    118                                       uInt beamno, uInt ifno, uInt polno, uInt freqid,
    119                                       Double time, uInt nchan, STBaselineFunc::FuncName func, uInt order,
    120                                       uInt clipiter, Float clipthres,
    121                                       Vector<Float> sect, Vector<Float> param,
    122                                       Vector<Float> mask, Float rms)
     124                                 uInt beamno, uInt ifno, uInt polno,
     125                                 uInt freqid, Double time,
     126                                 uInt nchan,
     127                                 STBaselineFunc::FuncName ftype,
     128                                 Vector<uInt> fpar,
     129                                 Vector<Float> ffpar,
     130                                 uInt citer,
     131                                 Float cthres,
     132                                 Vector<uInt> mask,
     133                                 Vector<Float> res,
     134                                 Float rms)
    123135{
    124136  uInt irow = nrow();
    125137  table_.addRow(1, True);
    126138  setdata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time,
    127           nchan, func, order, clipiter, clipthres, sect, param, mask, rms);
     139          nchan, ftype, fpar, ffpar, citer, cthres, mask, res, rms);
    128140}
    129141
    130142Vector<STBaselineFunc::FuncName> STBaselineTable::getFunctionAsString()
    131143{
    132   Vector<uInt> rawBlfuncColumn = funcCol_.getColumn();
     144  Vector<uInt> rawBlfuncColumn = ftypeCol_.getColumn();
    133145  uInt n = rawBlfuncColumn.nelements();
    134146  Vector<STBaselineFunc::FuncName> blfuncColumn(n);
  • trunk/src/STBaselineTable.h

    r2738 r2740  
    4747               casa::uInt freqid, casa::Double time,
    4848               casa::uInt nchan,
    49                STBaselineFunc::FuncName func, casa::uInt order,
    50                casa::uInt clipiter, casa::Float clipthres,
    51                casa::Vector<casa::Float> sect,
    52                casa::Vector<casa::Float> param,
    53                casa::Vector<casa::Float> mask,
     49               STBaselineFunc::FuncName ftype,
     50               casa::Vector<casa::uInt> fpar,
     51               casa::Vector<casa::Float> ffpar,
     52               casa::uInt citer,
     53               casa::Float cthres,
     54               casa::Vector<casa::uInt> mask,
     55               casa::Vector<casa::Float> res,
    5456               casa::Float rms);
    5557  void appenddata(casa::uInt scanno, casa::uInt cycleno,
     
    5759                  casa::uInt freqid, casa::Double time,
    5860                  casa::uInt nchan,
    59                   STBaselineFunc::FuncName func, casa::uInt order,
    60                   casa::uInt clipiter, casa::Float clipthres,
    61                   casa::Vector<casa::Float> sect,
    62                   casa::Vector<casa::Float> param,
    63                   casa::Vector<casa::Float> mask,
    64                   casa::Float rms);
    65 
     61                  STBaselineFunc::FuncName ftype,
     62                  casa::Vector<casa::uInt> fpar,
     63                  casa::Vector<casa::Float> ffpar,
     64                  casa::uInt citer,
     65                  casa::Float cthres,
     66                  casa::Vector<casa::uInt> mask,
     67                  casa::Vector<casa::Float> res,
     68                  casa::Float rms);
    6669  casa::uInt nchan(casa::uInt ifno);
    67   casa::Vector<casa::uInt> getFunction() {return funcCol_.getColumn();}
     70  casa::Vector<casa::uInt> getFunction() {return ftypeCol_.getColumn();}
    6871  casa::Vector<STBaselineFunc::FuncName> getFunctionAsString();
    69   casa::Vector<casa::uInt> getOrder() {return orderCol_.getColumn();}
    70   casa::Vector<casa::uInt> getClipIteration() {return clipiterCol_.getColumn();}
    71   casa::Vector<casa::Float> getClipThreshold() {return clipthresCol_.getColumn();}
    72   casa::Matrix<casa::Float> getSection() {return sectCol_.getColumn();}
    73   casa::Matrix<casa::Float> getParameter() {return paramCol_.getColumn();}
    74   casa::Matrix<casa::Float> getMaskList() {return maskCol_.getColumn();}
     72  casa::Matrix<casa::uInt> getFuncParam() {return fparCol_.getColumn();}
     73  casa::Matrix<casa::Float> getFuncFParam() {return ffparCol_.getColumn();}
     74  casa::Vector<casa::uInt> getClipIteration() {return citerCol_.getColumn();}
     75  casa::Vector<casa::Float> getClipThreshold() {return cthresCol_.getColumn();}
     76  casa::Matrix<casa::uInt> getMaskList() {return maskCol_.getColumn();}
     77  casa::Matrix<casa::Float> getResult() {return resCol_.getColumn();}
    7578  casa::Vector<casa::Float> getRms() {return rmsCol_.getColumn();}
    7679
     
    7881  static const casa::String name_ ;
    7982  casa::ScalarColumn<casa::uInt> nchanCol_;
    80   casa::ScalarColumn<casa::uInt> funcCol_;
    81   casa::ScalarColumn<casa::uInt> orderCol_;
    82   casa::ScalarColumn<casa::uInt> clipiterCol_;
    83   casa::ScalarColumn<casa::Float> clipthresCol_;
    84   casa::ArrayColumn<casa::Float> sectCol_;
    85   casa::ArrayColumn<casa::Float> paramCol_;
    86   casa::ArrayColumn<casa::Float> maskCol_;
     83  casa::ScalarColumn<casa::uInt> ftypeCol_;
     84  casa::ArrayColumn<casa::uInt> fparCol_;
     85  casa::ArrayColumn<casa::Float> ffparCol_;
     86  casa::ScalarColumn<casa::uInt> citerCol_;
     87  casa::ScalarColumn<casa::Float> cthresCol_;
     88  casa::ArrayColumn<casa::uInt> maskCol_;
     89  casa::ArrayColumn<casa::Float> resCol_;
    8790  casa::ScalarColumn<casa::Float> rmsCol_;
    8891};
  • trunk/src/Scantable.cpp

    r2737 r2740  
    26372637    int nRow = nrow();
    26382638    std::vector<bool> chanMask;
    2639 
    2640     std::vector<float> sect(0);
    26412639    std::vector<bool> finalChanMask;
    26422640    float rms;
    26432641
    26442642    //---
    2645     bool outBaselineParamTable = true;
     2643    bool outBaselineParamTable = false;
    26462644    STBaselineTable* bt = new STBaselineTable(*this);
    26472645    //---
     
    26592657                       uInt(0),
    26602658                       Double(0.0), // <-- Double(getTime(whichrow, false)),
    2661                        uInt(nchan(whichrow)), STBaselineFunc::Chebyshev,
    2662                        uInt(order), uInt(nIterClip), Float(thresClip), Vector<Float>(sect), Vector<Float>(params),
    2663                        Vector<Float>(params), // <-- Vector<Float>(finalChanMask),
     2659                       uInt(nchan(whichrow)),
     2660                       STBaselineFunc::Chebyshev,
     2661                       Vector<uInt>(1), // ==> MUST BE Vector<uInt> containing 'order'.
     2662                       Vector<Float>(), // ==> for ffpar. ** dummy **
     2663                       uInt(nIterClip),
     2664                       Float(thresClip),
     2665                       Vector<uInt>(5), // <-- Vector<uInt>(finalChanMask),
     2666                       Vector<Float>(params),
    26642667                       Float(rms));
    26652668      } else {
Note: See TracChangeset for help on using the changeset viewer.