My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
Flux.h
Go to the documentation of this file.
1 // $Id: Flux.h,v 1.1.1.1 2009/07/06 23:57:25 eml Exp $
2 
3 #ifndef GCP_UTIL_FLUX_H
4 #define GCP_UTIL_FLUX_H
5 
15 #include <iostream>
16 
17 #include "gcp/util/common/ConformableQuantity.h"
18 #include "gcp/util/common/Frequency.h"
19 #include "gcp/util/common/Temperature.h"
20 #include "gcp/util/common/SolidAngle.h"
21 
22 namespace gcp {
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& gcp::util::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 gcp
80 
81 
82 
83 #endif // End #ifndef GCP_UTIL_FLUX_H
Definition: SolidAngle.h:22
Definition: Temperature.h:17
Definition: Flux.h:29
Definition: ConformableQuantity.h:16
Definition: Flux.h:30
virtual ~Flux()
Definition: Flux.cc:31
Definition: Flux.h:25
Flux()
Definition: Flux.cc:18
Definition: Flux.h:28
Definition: Frequency.h:21