Ignore:
Timestamp:
01/11/13 18:48:37 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4770, CAS-4774

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Updated STApplyCal to be able to specify interpolation method.
The method can be specified in time and frequency axes independently.
Possible options are nearest, linear (default), (natural) cubic spline,
and polynomial with arbitrary order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Interpolator1D.cpp

    r2720 r2727  
    1717#include "Interpolator1D.h"
    1818#include "BisectionLocator.h"
     19#include "HuntLocator.h"
    1920
    2021using namespace casa;
     
    2324
    2425Interpolator1D::Interpolator1D()
    25   : order_(0),
     26  : order_(1),
    2627    n_(0),
    2728    x_(0),
    28     y_(0)
     29    y_(0),
     30    locator_(0)
    2931{
    30   locator_ = new BisectionLocator();
    3132}
    3233
     
    4243  y_ = y;
    4344  n_ = n;
     45  createLocator();
    4446  locator_->set(x, n);
    4547}
     
    5052  x_ = x;
    5153  n_ = n;
     54  createLocator();
    5255  locator_->set(x, n);
    5356}
     
    6568  x_ = 0;
    6669  y_ = 0;
     70  if (locator_) {
     71    delete locator_;
     72    locator_ = 0;
     73  }
    6774}
    6875
     
    7784}
    7885
     86void Interpolator1D::createLocator()
     87{
     88  if (!locator_) {
     89    if (n_ > 1000)
     90      locator_ = new HuntLocator();
     91    else
     92      locator_ = new BisectionLocator();
     93  }
    7994}
     95
     96}
Note: See TracChangeset for help on using the changeset viewer.