Ignore:
Timestamp:
01/10/13 20:37:28 (11 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-4141)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: moved various set methods in python to c++

Test Programs:

Put in Release Notes: No

Module(s): sbseparator

Description:

Moved set methods in sbseparator module to c++ (STSideBandSep class).
Defined boost python interface methods, set_freq, set_dirtol, set_shift,
set_limit, solve_both, subtract_other to access them from python codes.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STSideBandSep.h

    r2712 r2726  
    3636   * constructors and a destructor
    3737   **/
    38   STSideBandSep();
    39   //explicit STSideBandSep(const vector<string> infile);
    40   //explicit STSideBandSep(const vector<ScantableWrapper> &tables);
     38  STSideBandSep() { throw( AipsError("No data set to process") ); };
     39  explicit STSideBandSep(const vector<string> &names);
     40  explicit STSideBandSep(const vector<ScantableWrapper> &tables);
    4141  virtual ~STSideBandSep();
    4242
    4343  /**
    44    * Set parameters for sideband separation
     44   * Set IFNO and frequency tolerance to select data to process
    4545   **/
    46   void setFrequency(const unsigned int ifno, const double freqtol, string frame="");
     46  void setFrequency(const unsigned int ifno, const string freqtol,
     47                    const string frame="");
     48
     49  /**
     50   * Set direction tolerance to group spectra.
     51   * The spectra within this range will be averaged before procesing.
     52   **/
     53  void setDirTolerance(const vector<string> dirtol);
     54
     55  /**
     56   * Set the number of channels shifted in image side band
     57   * of each of scantable.
     58   **/
     59  void setShift(const vector<double> &shift);
     60
     61  /**
     62   * Set rejection limit of solution.
     63   **/
     64  void setThreshold(const double limit);
     65
     66  /**
     67   * Resolve both image and signal sideband when true is set.
     68   **/
     69  void solveBoth(const bool flag) { doboth_ = flag; };
     70
     71  /**
     72   * Obtain spectra by subtracting the solution of the other sideband.
     73   **/
     74  void solvefromOther(const bool flag) { otherside_ = flag; };
    4775
    4876  /**
     
    5179  void setImageTable(const ScantableWrapper &s);
    5280  void setScanTb0(const ScantableWrapper &s);
     81
    5382  /**
    5483   * Set additional information to fill frequencies of image sideband
    5584   **/
    56   void setLO1(const double lo1, string frame="TOPO", double reftime=-1, string refdir="");
     85  void setLO1(const double lo1, const string frame="TOPO",
     86              const double reftime=-1, string refdir="");
    5787  void setLO1Root(const string name);
     88
    5889  /**
    5990   * Actual calculation of frequencies of image sideband
     
    6293
    6394private:
     95  /** Initialize member variables **/
     96  void init();
     97  void initshift();
     98
     99  /** Return if the path exists (optionally, check file type) **/
    64100  Bool checkFile(const string name, string type="");
     101
     102  /**
     103   * Get LO1 frequency to solve the frequencies of image side band
     104   **/
    65105  bool getLo1FromAsdm(const string asdmname,
    66106                      const double refval, const double refpix,
     
    73113                         const double increment, const int nChan);
    74114
     115  /** Member variables **/
     116  // input tables
     117  vector<string> infileList_;
     118  vector< CountedPtr<Scantable> > intabList_;
     119  unsigned int ntable_;
     120  // frequency and direction setup to select data.
    75121  unsigned int sigIfno_;
    76   double ftol_;
     122  Quantum<Double> ftol_;
     123  MFrequency::Types solFrame_;
     124  vector<double> sigShift_, imgShift_;
     125  unsigned int nshift_, nchan_;
     126  vector< CountedPtr<Scantable> > tableList_;
     127  Double xtol_, ytol_;
     128  // solution parameters
     129  bool otherside_, doboth_;
     130  double rejlimit_;
     131  // LO1
    77132  double lo1Freq_;
    78133  MFrequency::Types loFrame_;
Note: See TracChangeset for help on using the changeset viewer.