PhaseLockedFilterbank.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Signal/Pulsar/dsp/PhaseLockedFilterbank.h
10 
11 #ifndef __baseband_dsp_PhaseLockedFilterbank_h
12 #define __baseband_dsp_PhaseLockedFilterbank_h
13 
14 #include "dsp/Transformation.h"
15 #include "dsp/TimeSeries.h"
16 #include "dsp/PhaseSeries.h"
17 #include "dsp/TimeDivide.h"
18 
19 namespace Pulsar {
20  class Predictor;
21 }
22 
23 namespace dsp {
24 
26 
29  : public Transformation <TimeSeries, PhaseSeries> {
30 
31  public:
32 
35 
37  void set_nchan (unsigned nchan);
38 
40  unsigned get_nchan () const { return nchan; }
41 
43  void set_nbin (unsigned nbin);
44 
46  unsigned get_nbin () const { return nbin; }
47 
49  void set_npol (unsigned npol);
50 
52  unsigned get_npol () const { return npol; }
53 
55  bool has_folding_predictor() const { return bin_divider.get_predictor(); }
56 
59  { return bin_divider.get_predictor(); }
60 
62  double get_folding_period () const { return bin_divider.get_period(); }
63 
66 
68  PhaseSeries* get_result() const { return output; }
69 
71  void normalize_output ();
72 
74  void reset ();
75 
77  void finish ();
78 
79  protected:
80 
82  virtual void transformation ();
83 
85  unsigned nchan;
86 
88  unsigned nbin;
89 
91  unsigned npol;
92 
94  bool built;
95 
97  void prepare ();
98 
100  virtual void set_limits (const Observation* input);
101 
103  uint64_t idat_start;
104 
106  uint64_t ndat_fold;
107 
108  };
109 
110 }
111 
112 #endif
Performs FFT at specific pulse phase windows.
Definition: PhaseLockedFilterbank.h:28
unsigned npol
Number of polarization products to compute.
Definition: PhaseLockedFilterbank.h:91
void set_npol(unsigned npol)
Set the number of polarization to compute.
Definition: PhaseLockedFilterbank.C:42
void set_nbin(unsigned nbin)
Set the number of pulse phase windows in which to compute spectra.
Definition: PhaseLockedFilterbank.C:36
virtual void reset()
Reset accumulated results to intial values.
Definition: Operation.C:161
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
void reset()
Reset the output.
Definition: PhaseLockedFilterbank.C:351
void finish()
Finalize anything.
Definition: PhaseLockedFilterbank.C:368
TimeDivide bin_divider
The phase divider.
Definition: PhaseLockedFilterbank.h:65
void frc1d(size_t nfft, float *into, const float *from)
Data as a function of pulse phase.
Definition: PhaseSeries.h:28
double get_folding_period() const
Get the folding period.
Definition: PhaseLockedFilterbank.h:62
unsigned nbin
Number of pulse phase windows in which to compute spectra.
Definition: PhaseLockedFilterbank.h:88
unsigned get_npol() const
Get the number of polarizations.
Definition: PhaseLockedFilterbank.h:52
virtual void set_buffering_policy(BufferingPolicy *policy)
Set the policy for buffering input and/or output data.
Definition: Transformation.h:85
const Pulsar::Predictor * get_folding_predictor() const
Get the predictor.
Definition: PhaseLockedFilterbank.h:58
Buffers the Transformation input.
Definition: InputBuffering.h:26
Stores information about digital, band-limited, time-varying signals.
Definition: Observation.h:33
unsigned get_nbin() const
Get the number of pulse phase windows in which to compute spectra.
Definition: PhaseLockedFilterbank.h:46
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
uint64_t idat_start
Internal: time to start processing data.
Definition: PhaseLockedFilterbank.h:103
unsigned nchan
Number of channels into which the input will be divided.
Definition: PhaseLockedFilterbank.h:85
virtual void transformation()
Perform the convolution transformation on the input TimeSeries.
Definition: PhaseLockedFilterbank.C:85
PhaseLockedFilterbank()
Default constructor.
Definition: PhaseLockedFilterbank.C:17
bool built
Flag set when built.
Definition: PhaseLockedFilterbank.h:94
virtual void set_limits(const Observation *input)
Set the idat_start and ndat_fold attributes.
Definition: PhaseLockedFilterbank.C:51
bool has_folding_predictor() const
Has a folding predictor been set?
Definition: PhaseLockedFilterbank.h:55
double get_period() const
Set the folding period used to determine pulse phase.
Definition: TimeDivide.h:76
void prepare()
Prepare internal variables.
Definition: PhaseLockedFilterbank.C:59
unsigned get_nchan() const
Get the number of channels into which the input will be divided.
Definition: PhaseLockedFilterbank.h:40
Calculates the boundaries of a division of time.
Definition: TimeDivide.h:28
uint64_t ndat_fold
Internal: number of samples to process.
Definition: PhaseLockedFilterbank.h:106
const Pulsar::Predictor * get_predictor() const
Get the Pulsar::Predictor used to determine pulse phase.
Definition: TimeDivide.h:70
void fcc1d(size_t nfft, float *into, const float *from)
void set_nchan(unsigned nchan)
Set the number of channels into which the input will be divided.
Definition: PhaseLockedFilterbank.C:31
void normalize_output()
Normalize the spectra by the hits array.
Definition: PhaseLockedFilterbank.C:320
Reference::To< const TimeSeries > input
Container from which input data will be read.
Definition: HasInput.h:49
normalization get_norm()
PhaseSeries * get_result() const
Get pointer to the output.
Definition: PhaseLockedFilterbank.h:68
Reference::To< PhaseSeries > output
Container into which output data will be written.
Definition: HasOutput.h:49

Generated using doxygen 1.8.17