Changeset 88 for trunk


Ignore:
Timestamp:
11/12/04 12:11:13 (20 years ago)
Author:
mar637
Message:

changes summary to return std::string
comment out unused getMask function
rename a few functions to make it consistent nXXX()
added nCoordinates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.h

    r83 r88  
    8484  // get all as aips++ Vectors
    8585  virtual void getSpectrum(Vector<Float>& spectrum, Int whichRow=0);
    86   virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const;
     86
     87  //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const;
    8788
    8889  // get info for current row
     
    9192  double getInterval(Int whichRow=0) const;
    9293
     94  virtual void setSpectrum(std::vector<float> spectrum, int whichRow=0);
     95  virtual void setRestFreqs(std::vector<double> freqs, const std::string& theunit);
     96
    9397  // set the current value
    9498  virtual bool setIF(Int whichIF=0);
    9599  virtual bool setBeam(Int whichBeam=0);
    96   virtual bool setPol(Int whichPol=0);   
    97   //sets the user mask
     100  virtual bool setPol(Int whichPol=0);
     101
     102  //sets the user mask applied to all spectra
    98103  virtual bool setMask(std::vector<int> whichChans);
    99  
     104  // Hard flags the current spectrum, not reversible
     105  virtual void flag(int whichRow);
     106
    100107  // return the currently selected values
    101108  virtual Int getIF() { return IFSel_; }
    102109  virtual Int getBeam() { return beamSel_; }
    103   virtual Int getPol() { return polSel_; }   
    104  
     110  virtual Int getPol() { return polSel_; }
     111
    105112  // number of scans in table
    106   virtual Int nScans() const;
     113  virtual Int nScan() const;
    107114
    108115  // print a summary to stdout
    109   virtual void summary() const;
    110  
     116  virtual std::string summary() const;
     117
    111118  // write to disk as aips++ table
    112119  void makePersistent(const std::string& filename);
    113120
    114   // get a new SDMemTable containg all rows with the same give SCANID
     121  // get a new SDMemTable containing all rows with the same give SCANID
    115122  SDMemTable getScan(Int scanID);
    116123  SDMemTable getSource(const std::string& source);
     
    127134
    128135  // return the number of rows (integrations) in the table
    129   Int nRows() const { return table_.nrow(); }
     136  Int nRow() const { return table_.nrow(); }
    130137
    131138  // return a row as a Masked array, internally converting uChar flags
    132139  // to bool mask
    133140  MaskedArray<Float> rowAsMaskedArray(uInt whichRow,
    134                                       Bool useSelection = False);
     141                                      Bool useSelection = False);
    135142
    136143  SpectralCoordinate getCoordinate(uInt whichIdx) const;
    137144  Bool setCoordinate(const SpectralCoordinate& speccord, uInt whichIdx);
    138145
    139   std::vector<double> getAbscissa(int whichRow,
    140                                   const std::string& whichUnit="GHz",
    141                                   const std::string& whichFrame="TOPO",
    142                                   double restfreq=0.0);
     146  Int nCoordinates() const;
     147
     148  std::vector<double> getAbscissa(int whichRow,
     149                                  const std::string& whichUnit="GHz",
     150                                  const std::string& whichFrame="TOPO",
     151                                  double restfreq=0.0);
    143152private:
    144153  // set up table structure
     
    146155  // the current cursor into the array
    147156  Int IFSel_,beamSel_,polSel_;
    148   std::vector<bool> chanMask_; 
     157  std::vector<bool> chanMask_;
    149158  // the underlying memory table
    150159  Table table_;
Note: See TracChangeset for help on using the changeset viewer.