Changeset 745 for trunk/src/SDMemTable.h


Ignore:
Timestamp:
11/28/05 15:25:18 (19 years ago)
Author:
mar637
Message:

removed setmask functionality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.h

    r717 r745  
    4949
    5050namespace asap {
    51  
     51
    5252class SDContainer;
    5353class SDHeader;
     
    7171  SDMemTable(const casa::Table& tab, const std::string& expr);
    7272
    73   // Assignment operator (copy semantics) 
     73  // Assignment operator (copy semantics)
    7474  SDMemTable &operator=(const SDMemTable& other);
    75  
     75
    7676  virtual ~SDMemTable();
    7777
     
    8686  SDHeader getSDHeader() const;
    8787
    88   // Get SD Frequency table. 
     88  // Get SD Frequency table.
    8989  SDFrequencyTable getSDFreqTable() const;
    9090
     
    101101  // I,P,PA,V (doPol=True) (determined by the polSel cursor location
    102102  // 0->3) If the latter, you can add a PA offset (degrees)
    103   virtual std::vector<float> getStokesSpectrum(casa::Int whichRow=0, 
     103  virtual std::vector<float> getStokesSpectrum(casa::Int whichRow=0,
    104104                                               casa::Bool doPol=casa::False) const;
    105105
     
    108108  // label for raw correlations (linear or circular). If True returns
    109109  // label for Stokes.  If doPol=False, I,Q,U,V else I,P,PA,V
    110   std::string getPolarizationLabel(casa::Bool linear, casa::Bool stokes, 
    111                                    casa::Bool linPol, 
    112                                    casa::Int polIdx=-1) const;
     110  std::string getPolarizationLabel(casa::Bool linear, casa::Bool stokes,
     111                                   casa::Bool linPol,
     112                                   casa::Int polIdx=-1) const;
    113113
    114114  // Convert Stokes to linear or circular polarizations (specified by
     
    116116  // supported.
    117117  virtual std::vector<float> stokesToPolSpectrum(casa::Int whichRow,
    118                                                 casa::Bool toLinear,
    119                                                 casa::Int polIdx) const;
     118                                                casa::Bool toLinear,
     119                                                casa::Int polIdx) const;
    120120
    121121  // Get all Stokes at the specified Beam/IF cursor location (ignoring
     
    125125  // is not the same as nPol(), I have put it here for direct access as needed
    126126  virtual casa::Array<casa::Float> getStokesSpectrum(casa::Int whichRow=0,
    127                                                      casa::Int iBeam=-1, 
     127                                                     casa::Int iBeam=-1,
    128128                                                     casa::Int iIF=-1) const;
    129129
     
    132132
    133133  // get all as aips++ Vectors
    134   virtual void getSpectrum(casa::Vector<casa::Float>& spectrum,
    135                            casa::Int whichRow=0) const;
    136   //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const;
     134  virtual void getSpectrum(casa::Vector<casa::Float>& spectrum,
     135                           casa::Int whichRow=0) const;
    137136
    138137  // Get rest frequencies
    139138  std::vector<double> getRestFreqs() const;
    140  
    141   // get info for current row 
     139
     140  // get info for current row
    142141  // if whichRow == -1 the Header time is given
    143   std::string getTime(casa::Int whichRow=0, 
    144                       casa::Bool showDate=casa::False) const ;
    145   casa::MEpoch getEpoch(casa::Int whichRow=0) const; 
     142  std::string getTime(casa::Int whichRow=0,
     143                      casa::Bool showDate=casa::False) const ;
     144  casa::MEpoch getEpoch(casa::Int whichRow=0) const;
    146145  casa::MDirection getDirection(casa::Int whichRow=0,
    147                                 casa::Bool refBeam=casa::False) const;
     146                                casa::Bool refBeam=casa::False) const;
    148147
    149148  std::string getSourceName(casa::Int whichRow=0) const;
     
    154153
    155154  // Set RestFreqID.  source="" and IF=-1 means select all
    156   virtual casa::Bool setRestFreqs(const casa::Vector<casa::Double>& restFreqs, 
    157                                   const casa::String& unit,
    158                                   const std::vector<std::string>& lines,
    159                                   const casa::String& source,
    160                                   casa::Int whichIF=-1);
     155  virtual casa::Bool setRestFreqs(const casa::Vector<casa::Double>& restFreqs,
     156                                  const casa::String& unit,
     157                                  const std::vector<std::string>& lines,
     158                                  const casa::String& source,
     159                                  casa::Int whichIF=-1);
    161160
    162161  // List lines
     
    166165  std::string getFluxUnit() const;
    167166  void setFluxUnit (const std::string& unit);
    168  
     167
    169168  // Set Instrument
    170169  void setInstrument (const std::string& instrument);
     
    178177  virtual void resetCursor();
    179178
    180   //sets the user mask applied to all spectra
    181   virtual bool setMask(std::vector<int> whichChans);
    182179  // Hard flags the current spectrum, not reversible
    183180  virtual void flag(int whichRow);
     
    226223  // return a row as a Masked array, internally converting uChar flags
    227224  // to bool mask
    228   casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow, 
     225  casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow,
    229226                                                  casa::Bool toStokes=casa::False) const;
    230227
     
    237234  // rest frequency.  If row number given (>=0), also set
    238235  // frame conversion layer (needs direction & time which require row)
    239   casa::SpectralCoordinate getSpectralCoordinate(casa::uInt freqID, 
     236  casa::SpectralCoordinate getSpectralCoordinate(casa::uInt freqID,
    240237                                                 casa::uInt restFreqID,
    241238                                                 casa::uInt row) const;
     
    243240  // Set just the reference value, pixel and increment into the table
    244241  // No other state is extracted.
    245   casa::Bool setCoordinate(const casa::SpectralCoordinate& speccord, 
    246                            casa::uInt whichIdx);
     242  casa::Bool setCoordinate(const casa::SpectralCoordinate& speccord,
     243                           casa::uInt whichIdx);
    247244
    248245  casa::Int nCoordinates() const;
     
    263260
    264261  void addFit(casa::uInt whichRow,
    265               const casa::Vector<casa::Double>& p,
    266               const casa::Vector<casa::Bool>& m,
    267               const casa::Vector<casa::String>& f,
    268               const casa::Vector<casa::Int>& c);
    269 
    270  
     262              const casa::Vector<casa::Double>& p,
     263              const casa::Vector<casa::Bool>& m,
     264              const casa::Vector<casa::String>& f,
     265              const casa::Vector<casa::Int>& c);
     266
     267
    271268private:
    272269  // utility func for nice printout
     
    279276
    280277  // Generate start and end for shape and current cursor selection
    281   void getCursorSlice(casa::IPosition& start, casa::IPosition& end, 
    282                       const casa::IPosition& shape) const;
     278  void getCursorSlice(casa::IPosition& start, casa::IPosition& end,
     279                      const casa::IPosition& shape) const;
    283280
    284281  // the current cursor into the array
    285282  casa::Int IFSel_,beamSel_,polSel_;
    286   std::vector<bool> chanMask_;
    287283  // the underlying memory table
    288284  casa::Table table_;
Note: See TracChangeset for help on using the changeset viewer.