Ignore:
Timestamp:
07/29/10 19:13:46 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: No (test merging alma branch)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s):

Description:


Location:
branches/mergetest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mergetest

  • branches/mergetest/src/Scantable.h

    r1730 r1779  
    2929
    3030#include <coordinates/Coordinates/SpectralCoordinate.h>
     31
     32#include <casa/Arrays/Vector.h>
     33#include <casa/Quanta/Quantum.h>
     34
     35#include <casa/Exceptions/Error.h>
    3136
    3237#include "Logger.h"
     
    226231
    227232  /**
     233   * Flag the data in a row-based manner. (CAS-1433 Wataru Kawasaki)
     234   * param[in] rows    list of row numbers to be flagged
     235   */
     236  void flagRow( const std::vector<casa::uInt>& rows = std::vector<casa::uInt>(), bool unflag=false);
     237
     238  /**
     239   * Get flagRow info at the specified row. If true, the whole data
     240   * at the row should be flagged.
     241   */
     242  bool getFlagRow(int whichrow) const
     243    { return (flagrowCol_(whichrow) > 0); }
     244
     245  /**
     246   * Flag the data outside a specified range (in a channel-based manner).
     247   * (CAS-1807 Wataru Kawasaki)
     248   */
     249  void clip(const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag);
     250
     251  /**
     252   * Return a list of booleans with the size of nchan for a specified row, to get info
     253   * about which channel is clipped.
     254   */
     255  std::vector<bool> getClipMask(int whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag);
     256  void srchChannelsToClip(casa::uInt whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag,
     257                          casa::Vector<casa::uChar> flgs);
     258
     259  /**
    228260   * Return a list of row numbers with respect to the original table.
    229261   * @return a list of unsigned ints
     
    276308  std::vector<uint> getScanNos() const { return getNumbers(scanCol_); }
    277309  int getScan(int whichrow) const { return scanCol_(whichrow); }
     310
     311  //TT addition
     312  std::vector<uint> getMolNos() {return getNumbers(mmolidCol_); }
    278313
    279314  /**
     
    300335    { return azCol_(whichrow); }
    301336  float getParAngle(int whichrow) const
    302   { return focus().getParAngle(mfocusidCol_(whichrow)); }
     337    { return focus().getParAngle(mfocusidCol_(whichrow)); }
     338  int getTcalId(int whichrow) const
     339    { return mtcalidCol_(whichrow); }
    303340
    304341  std::string getSourceName(int whichrow) const
     
    353390  std::vector<double> getRestFrequencies() const
    354391    { return moleculeTable_.getRestFrequencies(); }
    355 
     392  std::vector<double> getRestFrequency(int id) const
     393    { return moleculeTable_.getRestFrequency(id); }
     394
     395  /**
    356396  void setRestFrequencies(double rf, const std::string& name = "",
    357397                          const std::string& = "Hz");
    358   void setRestFrequencies(const std::string& name);
     398  **/
     399  // Modified by Takeshi Nakazato 05/09/2008
     400  /***
     401  void setRestFrequencies(vector<double> rf, const vector<std::string>& name = "",
     402                          const std::string& = "Hz");
     403  ***/
     404  void setRestFrequencies(vector<double> rf,
     405                          const vector<std::string>& name = vector<std::string>(1,""),
     406                          const std::string& = "Hz");
     407
     408  //void setRestFrequencies(const std::string& name);
     409  void setRestFrequencies(const vector<std::string>& name);
    359410
    360411  void shift(int npix);
     
    415466    { focus().setParallactify(flag); }
    416467
     468  /**
     469   * Reshape spectrum
     470   * @param[in] nmin, nmax minimum and maximum channel
     471   * @param[in] irow       row number
     472   *
     473   * 30/07/2008 Takeshi Nakazato 
     474   **/
     475  void reshapeSpectrum( int nmin, int nmax ) throw( casa::AipsError );
     476  void reshapeSpectrum( int nmin, int nmax, int irow ) ;
     477
     478  /**
     479   * Change channel number under fixed bandwidth
     480   * @param[in] nchan, dnu new channel number and spectral resolution
     481   * @param[in] irow       row number
     482   *
     483   * 27/08/2008 Takeshi Nakazato
     484   **/
     485  void regridChannel( int nchan, double dnu ) ;
     486  void regridChannel( int nchan, double dnu, int irow ) ;
     487
     488 
    417489private:
    418490
     
    489561  casa::ScalarColumn<casa::Float> elCol_;
    490562  casa::ScalarColumn<casa::String> srcnCol_, fldnCol_;
    491   casa::ScalarColumn<casa::uInt> scanCol_, beamCol_, ifCol_, polCol_, cycleCol_;
     563  casa::ScalarColumn<casa::uInt> scanCol_, beamCol_, ifCol_, polCol_, cycleCol_, flagrowCol_;
    492564  casa::ScalarColumn<casa::Int> rbeamCol_, srctCol_;
    493565  casa::ArrayColumn<casa::Float> specCol_, tsysCol_;
     
    510582  void initFactories();
    511583
     584  /**
     585   * Add an auxiliary column to the main table and attach it to a
     586   * cached column. Use for adding new columns that the original asap2
     587   * tables do not have.
     588   * @param[in] col      reference to the cached column to be attached
     589   * @param[in] colName  column name in asap table
     590   * @param[in] defValue default value to fill in the column
     591   *
     592   * 25/10/2009 Wataru Kawasaki
     593   */
     594  template<class T, class T2> void attachAuxColumnDef(casa::ScalarColumn<T>&,
     595                                                       const casa::String&,
     596                                                       const T2&);
     597  template<class T, class T2> void attachAuxColumnDef(casa::ArrayColumn<T>&,
     598                                                      const casa::String&,
     599                                                      const casa::Array<T2>&);
    512600};
    513601
Note: See TracChangeset for help on using the changeset viewer.