Changeset 717 for trunk/src/SDAttr.h


Ignore:
Timestamp:
11/17/05 14:37:54 (19 years ago)
Author:
mar637
Message:

implemented use of SDLog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDAttr.h

    r507 r717  
    3232#define SDATTR_H
    3333
    34 #include "SDDefs.h"
    3534#include <casa/aips.h>
    3635#include <measures/Measures/MEpoch.h>
     36#include <casa/Utilities/CountedPtr.h>
     37
     38#include "SDLog.h"
     39#include "SDDefs.h"
    3740
    3841template<class T> class casa::Vector;
    39 //class casa::MEpoch;
    40 
    4142
    4243
    4344namespace asap {
    4445
    45 class SDAttr {
     46class SDAttr : public SDLog {
    4647
    4748 public:
    4849
    49 // Constructor
    50    SDAttr();
     50  // Constructor
     51  SDAttr();
     52 
     53  // Destructor
     54  ~SDAttr();
     55 
     56  // Copy Constructor (copy semantics)
     57  SDAttr(const SDAttr& other);
     58 
     59  // Assignment  (copy semantics)
     60  SDAttr &operator=(const SDAttr& other);
     61 
     62  // Telescope diameter(m). Throws exception if unknown.
     63  casa::Float diameter(Instrument inst) const;
     64 
     65  // Beam efficiency.  Frequency in Hz.  Returns 1 if unknown.
     66  casa::Vector<casa::Float>
     67  beamEfficiency(Instrument instr, const casa::MEpoch& dateObs,
     68                 const casa::Vector<casa::Float>& freqs) const;
     69 
     70  // Aperture efficiency. Frequency in Hz.  Returns 1 if unknown.
     71  casa::Vector<casa::Float>
     72  apertureEfficiency(Instrument instr,
     73                     const casa::MEpoch& dateObs,
     74                     const casa::Vector<casa::Float>& freqs) const;
     75 
     76  // Find factor to convert Jy -> K for this telescope, date of
     77  // observation and frequency (Hz)
     78  casa::Vector<casa::Float> JyPerK(Instrument instr,
     79                                   const casa::MEpoch& dateObs,
     80                                   const casa::Vector<casa::Float>& freqs)
     81    const;
    5182
    52 // Destructor
    53    ~SDAttr();
     83  // Gain Elevation polynomial correction coefficients (elevation in
     84  // degrees) Returns length 0 if not known.
     85   casa::Vector<casa::Float> gainElevationPoly(Instrument instr) const;
    5486
    55 // Copy Constructor (copy semantics)
    56    SDAttr (const SDAttr& other);
    57 
    58 // Assignment  (copy semantics)
    59    SDAttr &operator=(const SDAttr& other);
    60 
    61 // Telescope diameter (m). Throws exception if unknown.
    62    casa::Float diameter (Instrument inst) const;
    63 
    64 // Beam efficiency.  Frequency in Hz.  Returns 1 if unknown.
    65    casa::Vector<casa::Float> beamEfficiency (Instrument instr, const casa::MEpoch& dateObs,
    66                                              const casa::Vector<casa::Float>& freqs) const;
    67  
    68 // Aperture efficiency. Frequency in Hz.  Returns 1 if unknown.
    69    casa::Vector<casa::Float> apertureEfficiency (Instrument instr, const casa::MEpoch& dateObs,
    70                                                  const casa::Vector<casa::Float>& freqs) const;
    71 
    72 // Find factor to convert Jy -> K for this telescope, date of observation and frequency (Hz)
    73    casa::Vector<casa::Float> JyPerK (Instrument instr, const casa::MEpoch& dateObs,
    74                                      const casa::Vector<casa::Float>& freqs) const;
    75 
    76 // Gain Elevation polynomial correction coefficients (elevation in degrees)
    77 // Returns length 0 if not known.
    78    casa::Vector<casa::Float> gainElevationPoly (Instrument instr) const;
    79 
    80 // Find feed polarization type of feeds. In future this needs to come from the data themselves
    81    FeedPolType feedPolType (Instrument) const;
    82 
    83 // Helper function to check instrument (antenna) name and give enum
     87  // Find feed polarization type of feeds. In future this needs to come
     88  // from the data themselves
     89  FeedPolType feedPolType(Instrument) const;
     90 
     91  // Helper function to check instrument (antenna) name and give enum
    8492  static Instrument convertInstrument(const casa::String& instrument,
    8593                                      casa::Bool throwIt);
     94 
     95  // Helper function.  Finds factor to convert K -> Jy. Provide
     96  // aperture efficiency and dish geometric diameter (m)
     97  static casa::Float findJyPerK(casa::Float etaAp, casa::Float D);
     98 
     99private:
     100 
     101  // Static data 
     102  casa::Vector<casa::Float> MopEtaBeamX_;     // Beam efficiency
     103  casa::Vector<casa::Float> MopEtaBeam2003Y_;
     104  casa::Vector<casa::Float> MopEtaBeam2004Y_;
    86105
    87 // Helper function.  Finds factor to convert K -> Jy. Provide aperture efficiency and dish geometric diameter (m)
    88    static casa::Float findJyPerK (casa::Float etaAp, casa::Float D);
     106  casa::Vector<casa::Float> MopEtaApX_;       // Aperture efficiency
     107  casa::Vector<casa::Float> MopEtaAp2004Y_;
     108
     109  casa::Vector<casa::Float> TidEtaApX_;       // Aperture efficiency
     110  casa::Vector<casa::Float> TidEtaApY_;
     111
     112  casa::Vector<casa::Float> TidGainElPoly_;   // Gain-el correction poly coeffs
     113 
     114  // Init private data
     115  void initData();
     116
     117  // Linear interpolation
     118  casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut,
     119                                   const casa::Vector<casa::Float>& xIn,
     120                                   const casa::Vector<casa::Float>& yIn) const;
    89121
    90122
    91  private:
    92 
    93 // Static data
    94 
    95    casa::Vector<casa::Float> MopEtaBeamX_;          // Beam efficiency
    96    casa::Vector<casa::Float> MopEtaBeam2003Y_;
    97    casa::Vector<casa::Float> MopEtaBeam2004Y_;
    98 //
    99    casa::Vector<casa::Float> MopEtaApX_;            // Aperture efficiency
    100    casa::Vector<casa::Float> MopEtaAp2004Y_;
    101 //
    102    casa::Vector<casa::Float> TidEtaApX_;            // Aperture efficiency
    103    casa::Vector<casa::Float> TidEtaApY_;
    104 //
    105    casa::Vector<casa::Float> TidGainElPoly_;        // Gain-el correction poly coeffs
    106 
    107 // Init private data
    108    void initData();
    109 
    110 // Linear interpolation
    111    casa::Vector<casa::Float> interp (const casa::Vector<casa::Float>& xOut, const casa::Vector<casa::Float>& xIn,
    112                                      const casa::Vector<casa::Float>& yIn) const;
    113123};
    114124
Note: See TracChangeset for help on using the changeset viewer.