ACFilterbank.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Signal/General/dsp/ACFilterbank.h
10 
11 #ifndef __ACFilterbank_h
12 #define __ACFilterbank_h
13 
14 #include "dsp/Transformation.h"
15 #include "dsp/TimeSeries.h"
16 
17 namespace dsp {
18 
19  class Apodization;
20  class Response;
21 
23  /* This class can be used to form the power spectral density (PSD)
24  or auto-correlation fuction (ACF) as a function of time. There
25  are two modes of operation:
26 
27  1) the PSD are stored in frequency-major order
28  2) the ACF are mutliplexed into time-major order
29 
30  In order to compute the ACF (and not the cyclic ACF), the
31  TimeSeries data must be zero padded before each Fourier
32  transform. For each good lag in the ACF, a zero is padded and,
33  for each zero padded, the neighbouring FFTs will overlap.
34  Therefore, in mode 1, the output will be larger than the input.
35  However, in mode 2, an inverse FFT is required.
36  */
37 
38  class ACFilterbank: public Transformation <TimeSeries, TimeSeries> {
39 
40  public:
41 
44 
46  void set_nchan (unsigned _nchan) { nchan = _nchan; }
47 
49  unsigned get_nchan () const { return nchan; }
50 
52  void set_nlag (unsigned _nlag) { nlag = _nlag; }
53 
55  unsigned get_nlag () const { return nlag; }
56 
58  void set_form_acf (bool _flag) { form_acf = _flag; }
59 
61  bool get_form_acf () const { return form_acf; }
62 
64  void set_apodization (Apodization* function);
65 
67  bool has_passband () const;
68 
70  const Response* get_passband() const;
71 
73  void set_passband (Response* band);
74 
75  protected:
76 
78  virtual void transformation ();
79 
81  unsigned nchan;
82 
84  unsigned nlag;
85 
87  bool form_acf;
88 
91 
94 
95  };
96 
97 }
98 
99 #endif
void scrunch_weights(unsigned nscrunch)
Scrunch the weights.
Definition: WeightedTimeSeries.C:698
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
Defines the interface by which Transformations are performed on data.
Definition: Transformation.h:54
bool get_form_acf() const
Get flag to calculate auto-correlation function.
Definition: ACFilterbank.h:66
void set_passband(Response *band)
Set the integrated passband.
Definition: ACFilterbank.C:30
void frc1d(size_t nfft, float *into, const float *from)
virtual void transformation()
Perform the convolution transformation on the input TimeSeries.
Definition: ACFilterbank.C:37
Describes a frequency (or impulse) response.
Definition: Response.h:34
Container of weighted time-major order floating point data.
Definition: WeightedTimeSeries.h:26
unsigned get_nlag() const
Get the time resolution factor.
Definition: ACFilterbank.h:60
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
unsigned nlag
Number of valid lags in the ACF.
Definition: ACFilterbank.h:89
ACFilterbank()
Null constructor.
Definition: ACFilterbank.C:22
unsigned get_nchan() const
Get the number of channels into which the input will be divided.
Definition: ACFilterbank.h:54
unsigned nchan
Number of channels into which the input will be divided.
Definition: ACFilterbank.h:86
void convolve_weights(unsigned nfft, unsigned nkeep)
Flag all weights in corrupted transforms.
Definition: WeightedTimeSeries.C:577
bool has_passband() const
Return true if the passband attribute has been set.
Reference::To< Response > passband
Integrated passband.
Definition: ACFilterbank.h:98
void set_nchan(unsigned _nchan)
Set the number of channels into which the input will be divided.
Definition: ACFilterbank.h:51
void set_apodization(Apodization *function)
Set the apodization function.
void bcc1d(size_t nfft, float *into, const float *from)
void set_nlag(unsigned _nlag)
Set the time resolution factor.
Definition: ACFilterbank.h:57
const Response * get_passband() const
Return a pointer to the integrated passband.
void fcc1d(size_t nfft, float *into, const float *from)
normalization get_norm()
bool form_acf
Flag to calculate auto-correlation function.
Definition: ACFilterbank.h:92
Reference::To< Apodization > apodization
Apodization function (time domain window)
Definition: ACFilterbank.h:95
void set_form_acf(bool _flag)
Set flag to calculate auto-correlation function.
Definition: ACFilterbank.h:63

Generated using doxygen 1.8.17