1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | //--------------------------------------------------------------------------
|
---|
3 | // File and Version Information:
|
---|
4 | // $Id: specresp.h,v 1.5 2003-02-11 15:31:07 cmv Exp $
|
---|
5 | //
|
---|
6 | // Description:
|
---|
7 | //
|
---|
8 | // History (add to end):
|
---|
9 | // Sophie Oct, 1999 - creation
|
---|
10 | //
|
---|
11 | //------------------------------------------------------------------------
|
---|
12 | #ifndef SPECRESP_H_SEEN
|
---|
13 | #define SPECRESP_H_SEEN
|
---|
14 |
|
---|
15 | #include "machdefs.h"
|
---|
16 | #include "anydataobj.h"
|
---|
17 | #include <iostream>
|
---|
18 | //------------------------------------
|
---|
19 | // Collaborating Class Declarations --
|
---|
20 | //------------------------------------
|
---|
21 |
|
---|
22 | // ---------------------
|
---|
23 | // -- Class Interface --
|
---|
24 | // ---------------------
|
---|
25 |
|
---|
26 | // ***IMPORTANT*** All frequencies are expressed in GHz (10^9 Hz)
|
---|
27 | namespace SOPHYA {
|
---|
28 |
|
---|
29 | class SpectralResponse : public AnyDataObj
|
---|
30 | {
|
---|
31 |
|
---|
32 | public:
|
---|
33 | //Constructor
|
---|
34 | SpectralResponse(double numin=0., double numax=1.);
|
---|
35 |
|
---|
36 | // destructor
|
---|
37 | virtual ~SpectralResponse();
|
---|
38 |
|
---|
39 | //
|
---|
40 | // Member Functions
|
---|
41 | //
|
---|
42 |
|
---|
43 | // The transmission() function is virtual:
|
---|
44 | virtual double transmission(double nu) const =0 ;
|
---|
45 |
|
---|
46 | inline double operator() (double nu) const { return(transmission(nu)); }
|
---|
47 |
|
---|
48 | virtual void Print(ostream& os) const;
|
---|
49 |
|
---|
50 | virtual double minFreq() const;
|
---|
51 | virtual double maxFreq() const;
|
---|
52 | virtual double meanFreq() const;
|
---|
53 | virtual double peakFreq() const;
|
---|
54 | virtual double peakTransmission() const;
|
---|
55 |
|
---|
56 | // For changing the min/max frequency
|
---|
57 | virtual void setMinMaxFreq(double numin, double numax);
|
---|
58 |
|
---|
59 | virtual double IntegratedSpect(double numin, double numax) const ;
|
---|
60 | virtual double logIntegratedSpect(double numin, double numax) const ;
|
---|
61 | virtual double IntegratedSpect() const ;
|
---|
62 | virtual double logIntegratedSpect() const ;
|
---|
63 |
|
---|
64 | protected:
|
---|
65 | double _numin;
|
---|
66 | double _numax;
|
---|
67 | };
|
---|
68 |
|
---|
69 |
|
---|
70 | // definition of the << operator
|
---|
71 | inline ostream& operator << (ostream& s, SpectralResponse const & sr)
|
---|
72 | { sr.Print(s); return(s); }
|
---|
73 |
|
---|
74 |
|
---|
75 |
|
---|
76 | }
|
---|
77 |
|
---|
78 | #endif
|
---|
79 |
|
---|
80 |
|
---|
81 |
|
---|
82 |
|
---|