ScalarFilter.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2019 by Andrew Jameson and Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __ScalarFilter_h
10 #define __ScalarFilter_h
11 
12 #include "dsp/Response.h"
13 
14 namespace dsp {
15 
17  class ScalarFilter: public Response {
18 
19  public:
20 
23 
25  ~ScalarFilter ();
26 
28  void resize(unsigned _npol, unsigned _nchan,
29  unsigned _ndat, unsigned _ndim);
30 
32  void set_scale_factor (float scale_factor);
33 
35  void set_nchan (unsigned _nchan);
36 
38  void set_ndat (unsigned _ndat);
39 
41  float get_scale_factor ();
42  float get_scale_factor () const;
43 
44  void build ();
45 
47  void match (const Observation* input, unsigned nchan=0);
48 
50  void match (const Response* response);
51 
52  protected:
53 
55  float scale_factor;
56 
57  private:
58 
60  bool built;
61 
62  };
63 
64 }
65 
66 #endif
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
float get_scale_factor()
Return the scale factor being applied.
Definition: ScalarFilter.C:69
void match(const Observation *input, unsigned nchan=0)
Create an Scalar filter for the specified observation.
Definition: ScalarFilter.C:100
void set_nchan(unsigned _nchan)
Set the number of input channels.
Definition: ScalarFilter.C:52
void set_ndat(unsigned _ndat)
Set the length of the frequency response for each input channel.
Definition: ScalarFilter.C:44
Describes a frequency (or impulse) response.
Definition: Response.h:34
void resize(unsigned _npol, unsigned _nchan, unsigned _ndat, unsigned _ndim)
Set the dimensions of the data, updating built attribute.
Definition: ScalarFilter.C:30
unsigned nchan
Number of frequency divisions (channels)
Definition: Shape.h:115
Stores information about digital, band-limited, time-varying signals.
Definition: Observation.h:33
void set_scale_factor(float scale_factor)
Set the scalar factor to be applied in the response.
Definition: ScalarFilter.C:60
unsigned get_ndat() const
Get the number of datum in each of the nchan*npol divisions.
Definition: Shape.h:58
float scale_factor
The scale factor to apply to the data.
Definition: ScalarFilter.h:65
unsigned get_nchan() const
Get the number of frequency channels.
Definition: Shape.h:55
ScalarFilter()
Default constructor.
Definition: ScalarFilter.C:13
~ScalarFilter()
Destructor.
Definition: ScalarFilter.C:25
unsigned get_nchan() const
Return the number of channels into which the band is divided.
Definition: Observation.h:85

Generated using doxygen 1.8.17