source: Sophya/trunk/SophyaLib/SkyT/squarefilt.cc@ 1594

Last change on this file since 1594 was 927, checked in by ansari, 25 years ago

SOphie : Adding the ingroup SkyT in each .cc file for DoxyGen Doc

File size: 1.7 KB
RevLine 
[601]1//--------------------------------------------------------------------------
2// File and Version Information:
[927]3// $Id: squarefilt.cc,v 1.6 2000-04-14 07:28:14 ansari Exp $
[601]4//
5// Description:
6//
7// History (add to end):
8// Sophie Oct, 1999 - creation
9//
10//------------------------------------------------------------------------
11
12//---------------
13// C++ Headers --
14//---------------
15#include "machdefs.h"
16#include <iostream.h>
17
18#include "squarefilt.h"
19
[909]20/*!
21 * \class SOPHYA::SquareFilter
[927]22 \ingroup SkyT
[909]23 * Square detector response
24 */
25
[601]26//----------------
27// Constructor --
28//----------------
[668]29SquareFilter::SquareFilter()
30 : SpectralResponse()
31{
32}
33
[601]34SquareFilter::SquareFilter(double numin, double numax)
35 : SpectralResponse(numin, numax)
36{
37 _nuPeak = (numin+numax)/2.;
38 _peakTransmission = transmission(_nuPeak);
39}
40
41
42//--------------
43// Destructor --
44//--------------
45SquareFilter::~SquareFilter()
46{
47}
48
49// ---------------------------
50// -- Function Definitions --
51// ---------------------------
52
53
[909]54/*! The transmission returns 1. for frequencies in the [numin,numax] range
55 and 0. outside */
[601]56double
57SquareFilter::transmission(double nu) const
58{
59 if(nu < -1.e99) nu = -1.e99;
60 if(nu > 1.e99) nu = 1.e99;
61
62 if(nu>=_numin && nu<=_numax) return 1.;
63 return 0.;
64}
65
66double
67SquareFilter::peakFreq() const
68{
69return _nuPeak;
70}
71
72double
73SquareFilter::peakTransmission() const
74{
[668]75 return _peakTransmission;
[601]76}
[668]77
[669]78/*
[668]79void
80SquareFilter::WriteSelf(POutPersist& s)
81{
82 s.PutR8(this->minFreq());
83 s.PutR8(this->maxFreq());
84}
85
86void
87SquareFilter::ReadSelf(PInPersist& s)
88{
89 double minFreq, maxFreq;
90 s.GetR8(_numin);
91 s.GetR8(_numax);
92 cout << "minFreq - maxFreq " << _numin << "-" << _numax << endl;
93}
[669]94*/
Note: See TracBrowser for help on using the repository browser.