Bandpass.h
1 /***************************************************************************
2  *
3  * Copyright (C) 2002 by Stephen Ord
4  * Licensed under the Academic Free License version 2.1
5  *
6  ***************************************************************************/
7 #ifndef __dsp_Bandpass_h
8 #define __dsp_Bandpass_h
9 
10 #include "dsp/Transformation.h"
11 #include "dsp/TimeSeries.h"
12 #include "dsp/Response.h"
13 
14 namespace dsp {
15 
16  class Apodization;
17 
19  class Bandpass : public Transformation<TimeSeries, Response> {
20 
21  public:
22 
25 
27  ~Bandpass ();
28 
30  void set_nchan (unsigned nchan) { resolution = nchan; }
32  unsigned get_nchan () const { return resolution; }
33 
35  void set_state (Signal::State state) { output_state = state; }
37  Signal::State get_state () const { return output_state; }
38 
40  void set_selected_input_channel (unsigned ichan) { select_input_channel = ichan; }
41 
43  void set_integrate_all_channels (bool flag) { integrate_all_channels = flag; }
44 
46  virtual void set_response (Response* response);
47 
49  bool has_response () const;
50 
52  virtual const Response* get_response() const;
53 
55  virtual void set_apodization (Apodization* function);
56 
58  double get_integration_length() { return integration_length; }
59 
61  void reset_output();
62 
63  protected:
64 
66  void transformation ();
67 
69  void detect_the_input ();
70 
72  void detected_input ();
73 
75  unsigned resolution;
76 
79 
82 
84  double integration_length;
85 
88 
91 
94  };
95 
96 }
97 
98 #endif
99 
100 
Signal::State get_state() const
Get the state of the output.
Definition: Bandpass.h:42
void detected_input()
Integrate when input data are already detected.
Definition: Bandpass.C:201
int select_input_channel
Produce the bandpass of only the selected input channel.
Definition: Bandpass.h:83
void set_integrate_all_channels(bool flag)
Integrate the passbands of all channels.
Definition: Bandpass.h:48
Bandpass()
Default constructor.
Definition: Bandpass.C:16
Reference::To< Apodization > apodization
Apodization function (time domain window)
Definition: Bandpass.h:95
bool has_response() const
Return true if the response attribute has been set.
Definition: Bandpass.C:42
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
virtual void set_response(Response *response)
Set the frequency response function.
Definition: Bandpass.C:37
Defines the interface by which Transformations are performed on data.
Definition: Transformation.h:54
void frc1d(size_t nfft, float *into, const float *from)
void detect_the_input()
Detect input without further channelization.
Definition: Bandpass.C:228
unsigned get_nchan() const
Get the number of frequency channels in the bandpass.
Definition: Bandpass.h:37
virtual const Response * get_response() const
Return a pointer to the frequency response function.
Definition: Bandpass.C:47
double integration_length
Integration length in seconds.
Definition: Bandpass.h:89
virtual void set_apodization(Apodization *function)
Set the apodization function.
Definition: Bandpass.C:31
Describes a frequency (or impulse) response.
Definition: Response.h:34
void set_nchan(unsigned nchan)
Set the number of frequency channels in the bandpass.
Definition: Bandpass.h:35
Signal::State output_state
Output state.
Definition: Bandpass.h:92
bool integrate_all_channels
Integrate the bandpasses of all input channels.
Definition: Bandpass.h:86
void transformation()
Perform the transformation on the input time series.
Definition: Bandpass.C:52
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
unsigned resolution
Number of channels in bandpass per input channel.
Definition: Bandpass.h:80
~Bandpass()
Destructor.
Definition: Bandpass.C:26
double get_integration_length()
Get the integration length (in seconds)
Definition: Bandpass.h:63
void set_state(Signal::State state)
Set the state of the output.
Definition: Bandpass.h:40
Various apodizing (window) functions.
Definition: Apodization.h:28
void set_selected_input_channel(unsigned ichan)
Set the input channel to analyze.
Definition: Bandpass.h:45
Reference::To< Response > response
Frequency response (fractional delay and fringe, for example)
Definition: Bandpass.h:98
void fcc1d(size_t nfft, float *into, const float *from)
void reset_output()
Set the integration length and bandpass to zero.
Definition: Bandpass.C:294

Generated using doxygen 1.8.17