source: trunk/src/Interpolator1D.h @ 2720

Last change on this file since 2720 was 2720, checked in by Takeshi Nakazato, 11 years ago

New Development: Yes

JIRA Issue: Yes CAS-4770 and its sub-tickets

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...

First version of applycal for single dish calibration.
Added new classes for the operation (STApplyCal, Calibrator, PSAlmaCalibrator,
Locator, BisectionLocator?, Interpolator1D, NearestInterpolator1D).
Also, modified existing classes to fit with implementation of applycal.


File size: 1.1 KB
Line 
1//
2// C++ Interface: Interpolator1D
3//
4// Description:
5//
6//
7// Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef ASAP_INTERPOLATOR_1D_H
13#define ASAP_INTERPOLATOR_1D_H
14
15#include <memory>
16#include <vector>
17
18#include <casa/aips.h>
19#include <casa/Containers/Block.h>
20#include <casa/Arrays/Vector.h>
21#include <casa/Arrays/Matrix.h>
22#include <casa/BasicSL/String.h>
23#include <casa/Utilities/CountedPtr.h>
24
25#include "Locator.h"
26
27namespace asap {
28
29/**
30 * Base class for interpolation operation
31 * @author TakeshiNakazato
32 */
33class Interpolator1D {
34public:
35  Interpolator1D();
36
37  virtual ~Interpolator1D();
38
39  void setData(double *x, float *y, unsigned int n);
40  void setX(double *x, unsigned int n);
41  void setY(float *y, unsigned int n);
42  void reset();
43  void setOrder(unsigned int order) {order_ = order;}
44
45  virtual float interpolate(double x) = 0;
46
47protected:
48  int locate(double x);
49  bool isready();
50
51  unsigned int order_;
52  unsigned int n_;
53  double *x_;
54  float *y_;
55  Locator *locator_;
56};
57
58}
59#endif
Note: See TracBrowser for help on using the repository browser.