CARMA C++
Flux.h
Go to the documentation of this file.
1 // $Id: Flux.h,v 1.2 2012/02/22 18:44:43 iws Exp $
2 
3 #ifndef SZA_UTIL_FLUX_H
4 #define SZA_UTIL_FLUX_H
5 
15 #include <iostream>
16 
17 #include "carma/szautil/ConformableQuantity.h"
18 #include "carma/szautil/Frequency.h"
19 #include "carma/szautil/Temperature.h"
21 
22 namespace sza {
23  namespace util {
24 
25  class Flux : public ConformableQuantity {
26  public:
27 
28  class Jansky {};
29  class MilliJansky {};
30  class MegaJansky {};
31 
35  Flux();
36  Flux(const Jansky& units, double Jy);
37  Flux(const MilliJansky& units, double mJy);
38  Flux(const MegaJansky& units, double MJy);
39  Flux(Frequency& freq, Temperature& temp, SolidAngle& omega);
40 
44  virtual ~Flux();
45 
46  void setJy(double Jy);
47  void setMilliJy(double mJy);
48  void setMegaJy(double MJy);
49 
50  // Return the flux, in Jy
51 
52  inline double Jy() {
53  return Jy_;
54  }
55 
56  // Return the flux, in mJy
57 
58  inline double mJy() {
59  return Jy_ * mJyPerJy_;
60  }
61 
62  static const double mJyPerJy_;
63  static const double JyPerMJy_;
64 
65  void initialize();
66 
67  friend std::ostream& operator<<(std::ostream& os, Flux& flux);
68 
69  bool operator>=(Flux& flux);
70  bool operator<=(Flux& flux);
71 
72  private:
73 
74  double Jy_;
75 
76  }; // End class Flux
77 
78  } // End namespace util
79 } // End namespace sza
80 
81 
82 
83 #endif // End #ifndef SZA_UTIL_FLUX_H
Tagged: Wed Sep 14 17:52:22 PDT 2005.