Ignore:
Timestamp:
03/15/13 18:23:04 (11 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: Yes (CAS-4141/TRAC-290)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sbseparator module

Description: Pushed python codes down to cpp.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STSideBandSep.h

    r2726 r2794  
    2222#include <coordinates/Coordinates/DirectionCoordinate.h>
    2323#include <coordinates/Coordinates/SpectralCoordinate.h>
     24#include <scimath/Mathematics/FFTServer.h>
    2425// asap
    2526#include "ScantableWrapper.h"
     
    4041  explicit STSideBandSep(const vector<ScantableWrapper> &tables);
    4142  virtual ~STSideBandSep();
     43
     44  ///////////// temp functions //////////////////////
     45  //void cpprfft(std::vector<float> invec);
     46  //////////////////////////////////////////////////
     47
     48  /**
     49   * Separate side bands
     50   **/
     51  void separate(string outname);
    4252
    4353  /**
     
    8393   * Set additional information to fill frequencies of image sideband
    8494   **/
    85   void setLO1(const double lo1, const string frame="TOPO",
     95  void setLO1(const string lo1, const string frame="TOPO",
    8696              const double reftime=-1, string refdir="");
    8797  void setLO1Root(const string name);
    88 
    89   /**
    90    * Actual calculation of frequencies of image sideband
    91    **/
    92   void solveImageFreqency();
    9398
    9499private:
     
    99104  /** Return if the path exists (optionally, check file type) **/
    100105  Bool checkFile(const string name, string type="");
     106
     107  /** **/
     108  unsigned int setupShift();
     109  bool getFreqInfo(const CountedPtr<Scantable> &stab, const unsigned int &ifno,
     110                   double &freq0, double &incr, unsigned int &nchan);
     111
     112  /** Grid scantable **/
     113  ScantableWrapper gridTable();
     114  void mapExtent(vector< CountedPtr<Scantable> > &tablist,
     115                 Double &xmin, Double &xmax,
     116                 Double &ymin, Double &ymax);
     117
     118  /**
     119   * Actual calculation of frequencies of image sideband
     120   **/
     121  void solveImageFrequency();
    101122
    102123  /**
     
    112133                         const double refval, const double refpix,
    113134                         const double increment, const int nChan);
     135  bool getSpectraToSolve(const int polId, const int beamId,
     136                         const double dirX, const double dirY,
     137                         Matrix<float> &specmat, vector<uInt> &tabIdvec);
     138
     139  vector<float> solve(const Matrix<float> &specmat,
     140                      const vector<uInt> &tabIdvec,
     141                      const bool signal = true);
     142
     143  void shiftSpectrum(const Vector<float> &invec, double shift,
     144                     Vector<float> &outvec);
     145
     146  void deconvolve(Matrix<float> &specmat, const vector<double> shiftvec,
     147                  const double threshold, Matrix<float> &outmat);
     148
     149  void aggregateMat(Matrix<float> &inmat, vector<float> &outvec);
     150
     151  void subtractFromOther(const Matrix<float> &shiftmat,
     152                         const vector<float> &invec,
     153                         const vector<double> &shift,
     154                         vector<float> &outvec);
     155
     156
    114157
    115158  /** Member variables **/
     
    119162  unsigned int ntable_;
    120163  // frequency and direction setup to select data.
    121   unsigned int sigIfno_;
     164  int sigIfno_;
    122165  Quantum<Double> ftol_;
    123166  MFrequency::Types solFrame_;
     
    130173  double rejlimit_;
    131174  // LO1
    132   double lo1Freq_;
     175  double lo1Freq_; // in Hz
    133176  MFrequency::Types loFrame_;
    134177  double loTime_;
     
    136179  string asdmName_, asisName_;
    137180
     181  //CountedPtr<Scantable> imgTab_p, sigTab_p;
    138182  CountedPtr<Scantable> imgTab_p, sigTab_p;
     183  Table::TableType tp_;
     184  FFTServer<Float, Complex> fftsf, fftsi;
    139185  // TEMPORAL member
    140186  CountedPtr<Scantable> st0_;
Note: See TracChangeset for help on using the changeset viewer.