Ignore:
Timestamp:
10/04/16 18:20:50 (8 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes/No?

Interface Changes: Yes/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...


Check-in asap modifications from Jim regarding casacore namespace conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STSideBandSep.h

    r2976 r3106  
    2828#include "Scantable.h"
    2929
    30 using namespace std;
    31 using namespace casa;
    32 
    3330namespace asap {
    3431
     
    3835   * constructors and a destructor
    3936   **/
    40   STSideBandSep() { throw( AipsError("No data set to process") ); };
    41   explicit STSideBandSep(const vector<string> &names);
    42   explicit STSideBandSep(const vector<ScantableWrapper> &tables);
     37  STSideBandSep() { throw( casacore::AipsError("No data set to process") ); };
     38  explicit STSideBandSep(const std::vector<std::string> &names);
     39  explicit STSideBandSep(const std::vector<ScantableWrapper> &tables);
    4340  virtual ~STSideBandSep();
    4441
     
    4744   * Separate side bands
    4845   **/
    49   void separate(string outname);
     46  void separate(std::string outname);
    5047
    5148  /**
    5249   * Set IFNO and frequency tolerance to select data to process
    5350   **/
    54   void setFrequency(const int ifno, const string freqtol,
    55                     const string frame="");
     51  void setFrequency(const int ifno, const std::string freqtol,
     52                    const std::string frame="");
    5653
    5754  /**
     
    5956   * The spectra within this range will be averaged before procesing.
    6057   **/
    61   void setDirTolerance(const vector<string> dirtol);
     58  void setDirTolerance(const std::vector<std::string> dirtol);
    6259
    6360  /**
     
    6562   * of each of scantable.
    6663   **/
    67   void setShift(const vector<double> &shift);
     64  void setShift(const std::vector<double> &shift);
    6865
    6966  /**
     
    9188   * Set additional information to fill frequencies of image sideband
    9289   **/
    93   void setLO1(const string lo1, const string frame="TOPO",
    94               const double reftime=-1, string refdir="");
    95   void setLO1Root(const string name);
     90  void setLO1(const std::string lo1, const std::string frame="TOPO",
     91              const double reftime=-1, std::string refdir="");
     92  void setLO1Root(const std::string name);
    9693
    9794private:
     
    10198
    10299  /** Return if the path exists (optionally, check file type) **/
    103   Bool checkFile(const string name, string type="");
     100  casacore::Bool checkFile(const std::string name, std::string type="");
    104101
    105102  /** **/
    106103  unsigned int setupShift();
    107   bool getFreqInfo(const CountedPtr<Scantable> &stab, const unsigned int &ifno,
     104  bool getFreqInfo(const casacore::CountedPtr<Scantable> &stab, const unsigned int &ifno,
    108105                   double &freq0, double &incr, unsigned int &nchan);
    109106
    110107  /** Grid scantable **/
    111108  ScantableWrapper gridTable();
    112   void mapExtent(vector< CountedPtr<Scantable> > &tablist,
    113                  Double &xmin, Double &xmax,
    114                  Double &ymin, Double &ymax);
     109  void mapExtent(std::vector< casacore::CountedPtr<Scantable> > &tablist,
     110                 casacore::Double &xmin, casacore::Double &xmax,
     111                 casacore::Double &ymin, casacore::Double &ymax);
    115112
    116113  /**
     
    134131   * TIME by INTERVAL in each row.
    135132   **/
    136   void shiftTimeInGriddedST(const CountedPtr<Scantable> &stab);
     133  void shiftTimeInGriddedST(const casacore::CountedPtr<Scantable> &stab);
    137134  /**
    138135   * Actual calculation of frequencies of image sideband
     
    143140   * Get LO1 frequency to solve the frequencies of image side band
    144141   **/
    145   bool getLo1FromAsdm(const string asdmname,
     142  bool getLo1FromAsdm(const std::string asdmname,
    146143                      const double refval, const double refpix,
    147144                      const double increment, const int nChan);
    148   bool getLo1FromAsisTab(const string msname,
     145  bool getLo1FromAsisTab(const std::string msname,
    149146                         const double refval, const double refpix,
    150147                         const double increment, const int nChan);
    151   bool getLo1FromScanTab(casa::CountedPtr< Scantable > &scantab,
     148  bool getLo1FromScanTab(casacore::CountedPtr< Scantable > &scantab,
    152149                         const double refval, const double refpix,
    153150                         const double increment, const int nChan);
    154151  //  bool getSpectraToSolve(const int polId, const int beamId,
    155152  //                     const double dirX, const double dirY,
    156   //                     Matrix<float> &specmat, vector<uInt> &tabIdvec);
     153  //                     Matrix<float> &specmat, std::vector<casacore::uInt> &tabIdvec);
    157154  bool getSpectraToSolve(const int polId, const int beamId,
    158155                         const double dirX, const double dirY,
    159                          Matrix<float> &specMat, Matrix<bool> &flagMat,
    160                          vector<uInt> &tabIdvec);
    161 
    162   vector<float> solve(const Matrix<float> &specMat,
    163                       const vector<uInt> &tabIdvec,
     156                         casacore::Matrix<float> &specMat, casacore::Matrix<bool> &flagMat,
     157                         std::vector<casacore::uInt> &tabIdvec);
     158
     159  std::vector<float> solve(const casacore::Matrix<float> &specMat,
     160                      const std::vector<casacore::uInt> &tabIdvec,
    164161                      const bool signal = true);
    165162
    166   Vector<bool> collapseFlag(const Matrix<bool> &flagMat,
    167                             const vector<uInt> &tabIdvec,
     163  casacore::Vector<bool> collapseFlag(const casacore::Matrix<bool> &flagMat,
     164                            const std::vector<casacore::uInt> &tabIdvec,
    168165                            const bool signal = true);
    169166
    170   void shiftSpectrum(const Vector<float> &invec, double shift,
    171                      Vector<float> &outvec);
    172 
    173   void shiftFlag(const Vector<bool> &invec, double shift,
    174                      Vector<bool> &outvec);
    175 
    176   void deconvolve(Matrix<float> &specmat, const vector<double> shiftvec,
    177                   const double threshold, Matrix<float> &outmat);
    178 
    179   void aggregateMat(Matrix<float> &inmat, vector<float> &outvec);
    180 
    181   void subtractFromOther(const Matrix<float> &shiftmat,
    182                          const vector<float> &invec,
    183                          const vector<double> &shift,
    184                          vector<float> &outvec);
     167  void shiftSpectrum(const casacore::Vector<float> &invec, double shift,
     168                     casacore::Vector<float> &outvec);
     169
     170  void shiftFlag(const casacore::Vector<bool> &invec, double shift,
     171                     casacore::Vector<bool> &outvec);
     172
     173  void deconvolve(casacore::Matrix<float> &specmat, const std::vector<double> shiftvec,
     174                  const double threshold, casacore::Matrix<float> &outmat);
     175
     176  void aggregateMat(casacore::Matrix<float> &inmat, std::vector<float> &outvec);
     177
     178  void subtractFromOther(const casacore::Matrix<float> &shiftmat,
     179                         const std::vector<float> &invec,
     180                         const std::vector<double> &shift,
     181                         std::vector<float> &outvec);
    185182
    186183
     
    188185  /** Member variables **/
    189186  // input tables
    190   vector<string> infileList_;
    191   vector< CountedPtr<Scantable> > intabList_;
     187  std::vector<std::string> infileList_;
     188  std::vector< casacore::CountedPtr<Scantable> > intabList_;
    192189  unsigned int ntable_;
    193190  // frequency and direction setup to select data.
    194191  int sigIfno_;
    195   Quantum<Double> ftol_;
    196   MFrequency::Types solFrame_;
    197   vector<double> sigShift_, imgShift_;
     192  casacore::Quantum<casacore::Double> ftol_;
     193  casacore::MFrequency::Types solFrame_;
     194  std::vector<double> sigShift_, imgShift_;
    198195  unsigned int nshift_, nchan_;
    199   vector< CountedPtr<Scantable> > tableList_;
    200   Double xtol_, ytol_;
     196  std::vector< casacore::CountedPtr<Scantable> > tableList_;
     197  casacore::Double xtol_, ytol_;
    201198  // solution parameters
    202199  bool otherside_, doboth_;
     
    204201  // LO1
    205202  double lo1Freq_; // in Hz
    206   MFrequency::Types loFrame_;
     203  casacore::MFrequency::Types loFrame_;
    207204  double loTime_;
    208   string loDir_;
    209   string asdmName_, asisName_;
     205  std::string loDir_;
     206  std::string asdmName_, asisName_;
    210207
    211208  //CountedPtr<Scantable> imgTab_p, sigTab_p;
    212   CountedPtr<Scantable> imgTab_p, sigTab_p;
    213   Table::TableType tp_;
    214   FFTServer<Float, Complex> fftsf, fftsi;
     209  casacore::CountedPtr<Scantable> imgTab_p, sigTab_p;
     210  casacore::Table::TableType tp_;
     211  casacore::FFTServer<casacore::Float, casacore::Complex> fftsf, fftsi;
    215212
    216213}; // class
Note: See TracChangeset for help on using the changeset viewer.