Changeset 2762 for trunk/src


Ignore:
Timestamp:
02/06/13 19:45:36 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4770

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdcal2

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Added new method CalibrationManger::addApplyTable and its python interface.
The method understands what kind of apply table is given, and call
appropriate addXXX method.


Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/CalibrationManager.cpp

    r2757 r2762  
    5858  // always plain table
    5959  target_ = new Scantable(s, Table::Plain);
     60}
     61
     62void CalibrationManager::addApplyTable(const string &c)
     63{
     64  STCalEnum::CalType caltype = STApplyTable::getCalType(c);
     65  if (caltype == STCalEnum::CalTsys) {
     66    addTsysTable(c);
     67  }
     68  else if (caltype != STCalEnum::NoType) {
     69    // should be sky table
     70    addSkyTable(c);
     71  }
     72  else {
     73    os_.origin(LogOrigin("CalibrationManager","addCalTable",WHERE));
     74    os_ << LogIO::WARN << "Table " << c << " is not ApplyTable." << LogIO::POST ;
     75  }
    6076}
    6177
  • trunk/src/CalibrationManager.h

    r2757 r2762  
    4343  void setScantable(ScantableWrapper &s);
    4444  void setScantableByName(const std::string &s);
     45  void addApplyTable(const std::string &c);
    4546  void addSkyTable(const std::string &c);
    4647  void addTsysTable(const std::string &c);
  • trunk/src/python_CalibrationManager.cpp

    r2757 r2762  
    2121    .def("set_data", &CalibrationManager::setScantable)
    2222    .def("set_data", &CalibrationManager::setScantableByName)
     23    .def("add_applytable", &CalibrationManager::addApplyTable)
    2324    .def("add_skytable", &CalibrationManager::addSkyTable)
    2425    .def("add_tsystable", &CalibrationManager::addTsysTable)
Note: See TracChangeset for help on using the changeset viewer.