Index: trunk/src/SDAttr.h
===================================================================
--- trunk/src/SDAttr.h	(revision 507)
+++ trunk/src/SDAttr.h	(revision 717)
@@ -32,83 +32,93 @@
 #define SDATTR_H
 
-#include "SDDefs.h"
 #include <casa/aips.h>
 #include <measures/Measures/MEpoch.h>
+#include <casa/Utilities/CountedPtr.h>
+
+#include "SDLog.h"
+#include "SDDefs.h"
 
 template<class T> class casa::Vector;
-//class casa::MEpoch;
-
 
 
 namespace asap {
 
-class SDAttr {
+class SDAttr : public SDLog {
 
  public:
 
-// Constructor
-   SDAttr();
+  // Constructor
+  SDAttr();
+  
+  // Destructor
+  ~SDAttr();
+  
+  // Copy Constructor (copy semantics)
+  SDAttr(const SDAttr& other);
+  
+  // Assignment  (copy semantics)
+  SDAttr &operator=(const SDAttr& other);
+  
+  // Telescope diameter(m). Throws exception if unknown.
+  casa::Float diameter(Instrument inst) const;
+  
+  // Beam efficiency.  Frequency in Hz.  Returns 1 if unknown.
+  casa::Vector<casa::Float> 
+  beamEfficiency(Instrument instr, const casa::MEpoch& dateObs, 
+		 const casa::Vector<casa::Float>& freqs) const;
+  
+  // Aperture efficiency. Frequency in Hz.  Returns 1 if unknown.
+  casa::Vector<casa::Float> 
+  apertureEfficiency(Instrument instr, 
+		     const casa::MEpoch& dateObs, 
+		     const casa::Vector<casa::Float>& freqs) const;
+  
+  // Find factor to convert Jy -> K for this telescope, date of
+  // observation and frequency (Hz)
+  casa::Vector<casa::Float> JyPerK(Instrument instr, 
+				   const casa::MEpoch& dateObs, 
+				   const casa::Vector<casa::Float>& freqs) 
+    const;
 
-// Destructor
-   ~SDAttr();
+  // Gain Elevation polynomial correction coefficients (elevation in
+  // degrees) Returns length 0 if not known.
+   casa::Vector<casa::Float> gainElevationPoly(Instrument instr) const;
 
-// Copy Constructor (copy semantics)
-   SDAttr (const SDAttr& other);
-
-// Assignment  (copy semantics)
-   SDAttr &operator=(const SDAttr& other);
-
-// Telescope diameter (m). Throws exception if unknown.
-   casa::Float diameter (Instrument inst) const;
-
-// Beam efficiency.  Frequency in Hz.  Returns 1 if unknown.
-   casa::Vector<casa::Float> beamEfficiency (Instrument instr, const casa::MEpoch& dateObs, 
-                                             const casa::Vector<casa::Float>& freqs) const;
- 
-// Aperture efficiency. Frequency in Hz.  Returns 1 if unknown.
-   casa::Vector<casa::Float> apertureEfficiency (Instrument instr, const casa::MEpoch& dateObs, 
-                                                 const casa::Vector<casa::Float>& freqs) const;
-
-// Find factor to convert Jy -> K for this telescope, date of observation and frequency (Hz)
-   casa::Vector<casa::Float> JyPerK (Instrument instr, const casa::MEpoch& dateObs, 
-                                     const casa::Vector<casa::Float>& freqs) const;
-
-// Gain Elevation polynomial correction coefficients (elevation in degrees)
-// Returns length 0 if not known.
-   casa::Vector<casa::Float> gainElevationPoly (Instrument instr) const;
-
-// Find feed polarization type of feeds. In future this needs to come from the data themselves
-   FeedPolType feedPolType (Instrument) const;
-
-// Helper function to check instrument (antenna) name and give enum
+  // Find feed polarization type of feeds. In future this needs to come
+  // from the data themselves
+  FeedPolType feedPolType(Instrument) const;
+  
+  // Helper function to check instrument (antenna) name and give enum
   static Instrument convertInstrument(const casa::String& instrument, 
                                       casa::Bool throwIt);
+  
+  // Helper function.  Finds factor to convert K -> Jy. Provide
+  // aperture efficiency and dish geometric diameter (m)
+  static casa::Float findJyPerK(casa::Float etaAp, casa::Float D);
+  
+private:
+  
+  // Static data  
+  casa::Vector<casa::Float> MopEtaBeamX_;     // Beam efficiency
+  casa::Vector<casa::Float> MopEtaBeam2003Y_;
+  casa::Vector<casa::Float> MopEtaBeam2004Y_;
 
-// Helper function.  Finds factor to convert K -> Jy. Provide aperture efficiency and dish geometric diameter (m)
-   static casa::Float findJyPerK (casa::Float etaAp, casa::Float D);
+  casa::Vector<casa::Float> MopEtaApX_;       // Aperture efficiency
+  casa::Vector<casa::Float> MopEtaAp2004Y_;
+
+  casa::Vector<casa::Float> TidEtaApX_;       // Aperture efficiency
+  casa::Vector<casa::Float> TidEtaApY_;
+
+  casa::Vector<casa::Float> TidGainElPoly_;   // Gain-el correction poly coeffs
+  
+  // Init private data
+  void initData();
+
+  // Linear interpolation
+  casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut, 
+				   const casa::Vector<casa::Float>& xIn,
+				   const casa::Vector<casa::Float>& yIn) const;
 
 
- private:
-
-// Static data
-
-   casa::Vector<casa::Float> MopEtaBeamX_;          // Beam efficiency
-   casa::Vector<casa::Float> MopEtaBeam2003Y_;
-   casa::Vector<casa::Float> MopEtaBeam2004Y_;
-//
-   casa::Vector<casa::Float> MopEtaApX_;            // Aperture efficiency
-   casa::Vector<casa::Float> MopEtaAp2004Y_;
-//
-   casa::Vector<casa::Float> TidEtaApX_;            // Aperture efficiency
-   casa::Vector<casa::Float> TidEtaApY_;
-//
-   casa::Vector<casa::Float> TidGainElPoly_;        // Gain-el correction poly coeffs
-
-// Init private data
-   void initData();
-
-// Linear interpolation
-   casa::Vector<casa::Float> interp (const casa::Vector<casa::Float>& xOut, const casa::Vector<casa::Float>& xIn, 
-                                     const casa::Vector<casa::Float>& yIn) const;
 };
 
