Changeset 455 for trunk/src/SDMemTable.h


Ignore:
Timestamp:
02/16/05 12:29:26 (19 years ago)
Author:
mar637
Message:
  • added FITS subtable for fitting and relevant functions to set fits and put/get SDFitContainer
  • cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.h

    r447 r455  
    3636#include <vector>
    3737// AIPS++
    38  #include <casa/aips.h>
     38#include <casa/aips.h>
    3939#include <casa/Arrays/MaskedArray.h>
    4040#include <casa/BasicSL/String.h>
     
    4949
    5050namespace asap {
    51 
     51 
    5252class SDContainer;
    5353class SDHeader;
    5454class SDFrequencyTable;
    55 
     55class SDFitTable;
    5656
    5757
     
    9595  virtual std::vector<bool> getMask(casa::Int whichRow=0) const;
    9696
    97 
    9897  // When we can handle input correlations being either circular or
    99   // linear, we should probably have functions; getLinear, getCircular, getStokes
    100   // since one can inter-convert between all three regardless of the input
    101   // provided there are 4 polarizations. For now, we are assuming, if
    102   // there are 4 polarizations, that we have linears.  getSpectrum
    103   // is then 'getLinear', getStokesSpectrum is 'getStokes' and getCircularSpectrum
    104   // is 'getCircular' 
    105 
    106 
    107   // Get Stokes at cursor location. One of either I,Q,U,V or I,P,PA,V (doPol=True)
    108   // If the latter, you can add a PA offset (degrees)
     98  // linear, we should probably have functions; getLinear,
     99  // getCircular, getStokes since one can inter-convert between all
     100  // three regardless of the input provided there are 4
     101  // polarizations. For now, we are assuming, if there are 4
     102  // polarizations, that we have linears.  getSpectrum is then
     103  // 'getLinear', getStokesSpectrum is 'getStokes' and
     104  // getCircularSpectrum is 'getCircular'
     105
     106
     107  // Get Stokes at cursor location. One of either I,Q,U,V or I,P,PA,V
     108  // (doPol=True) If the latter, you can add a PA offset (degrees)
    109109  virtual std::vector<float> getStokesSpectrum(casa::Int whichRow=0,
    110110                                               casa::Bool doPol=casa::False,
     
    130130  casa::MDirection getDirection(casa::Int whichRow=0,
    131131                                casa::Bool refBeam=casa::False) const;
    132 //
     132
    133133  std::string getSourceName(casa::Int whichRow=0) const;
    134134  double getInterval(casa::Int whichRow=0) const;
     
    137137  virtual void setCoordInfo(std::vector<string> theinfo);
    138138
    139 // Set RestFreqID.  source="" and IF=-1 means select all
    140   virtual casa::Bool setRestFreqs (const casa::Vector<casa::Double>& restFreqs,
    141                                    const casa::String& unit,
    142                                    const std::vector<std::string>& lines,
    143                                    const casa::String& source,
    144                                    casa::Int whichIF=-1);
    145 
    146 // List lines
    147    void spectralLines() const;
    148 
    149 // Get/Set flux unit
     139  // Set RestFreqID.  source="" and IF=-1 means select all
     140  virtual casa::Bool setRestFreqs(const casa::Vector<casa::Double>& restFreqs,
     141                                  const casa::String& unit,
     142                                  const std::vector<std::string>& lines,
     143                                  const casa::String& source,
     144                                  casa::Int whichIF=-1);
     145
     146  // List lines
     147  void spectralLines() const;
     148
     149  // Get/Set flux unit
    150150  std::string getFluxUnit() const;
    151151  void setFluxUnit (const std::string& unit);
    152 
    153 // Set Instrument
     152 
     153  // Set Instrument
    154154  void setInstrument (const std::string& instrument);
    155155
     
    243243  static Instrument convertInstrument(const casa::String& instrument,
    244244                                      casa::Bool throwIt);
    245 
     245 
     246  bool putSDFitTable(const SDFitTable& sdft);
     247  SDFitTable getSDFitTable() const;
     248
     249  void addFit(casa::uInt whichRow,
     250              const casa::Vector<casa::Double>& p,
     251              const casa::Vector<casa::Bool>& m,
     252              const casa::Vector<casa::String>& f,
     253              const casa::Vector<casa::Int>& c);
     254 
    246255private:
    247256  // utility func for nice printout
    248257  casa::String formatSec(casa::Double x) const;
    249258  casa::String formatDirection(const casa::MDirection& md) const;
    250   std::vector<float> getFloatSpectrum (const casa::Array<casa::Float>& arr) const;
     259  std::vector<float> getFloatSpectrum(const casa::Array<casa::Float>& arr) const;
    251260  void setup();
    252261  void attach();
     
    254263
    255264  // Generate start and end for shape and current cursor selection
    256   void setCursorSlice(casa::IPosition& start, casa::IPosition& end, const casa::IPosition& shape) const;
    257 
    258   // Convert Vector to vector
    259   std::vector<float> convertVector (const casa::Vector<casa::Float>& in) const;
    260 
     265  void setCursorSlice(casa::IPosition& start, casa::IPosition& end,
     266                      const casa::IPosition& shape) const;
    261267
    262268  // the current cursor into the array
     
    266272  casa::Table table_;
    267273
    268 // Cached Columns to avoid reconstructing them for each row get/put
     274  // Cached Columns to avoid reconstructing them for each row get/put
    269275  casa::ScalarColumn<casa::Double> timeCol_, integrCol_;
    270276  casa::ScalarColumn<casa::Float> azCol_, elCol_, paraCol_;
     
    276282  casa::ArrayColumn<casa::uInt> freqidCol_, restfreqidCol_;
    277283  casa::ArrayColumn<casa::String> histCol_;
     284  casa::ArrayColumn<casa::Int> fitCol_;
    278285  casa::ROArrayColumn<casa::Float> stokesCol_;
    279286};
Note: See TracChangeset for help on using the changeset viewer.