FScrunch.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2010 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __FScrunch_h
10 #define __FScrunch_h
11 
12 #include "dsp/Transformation.h"
13 #include "dsp/TimeSeries.h"
14 
15 namespace dsp {
16 
18  class FScrunch : public Transformation <TimeSeries, TimeSeries>
19  {
20 
21  public:
22 
23  FScrunch (Behaviour place=anyplace);
24 
25  void set_factor ( unsigned samples );
26  unsigned get_factor () const;
27 
28  void set_frequency_resolution ( double Megahertz );
29  double get_frequency_resolution () const;
30 
31  class Engine;
32 
33  void set_engine (Engine*);
34 
35  protected:
36 
38  void transformation ();
39  void tfp_fscrunch ();
40  void fpt_fscrunch ();
41 
42  mutable unsigned factor;
43  mutable double frequency_resolution;
44 
45  // if true, use the frequency_resolution parameter
46  // if false, use the factor parameter
47  mutable bool use_fres;
48 
49  unsigned sfactor;
50  uint64_t output_nchan;
51 
52  Reference::To<Engine> engine;
53  };
54 
55  class FScrunch::Engine : public OwnStream
56  {
57  public:
58 
59  virtual void fpt_fscrunch (const dsp::TimeSeries * in,
60  dsp::TimeSeries * out,
61  unsigned sfactor) = 0;
62 
63  };
64 
65 }
66 
67 #endif // !defined(__FScrunch_h)
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
Behaviour
All Transformations must define their behaviour.
Definition: Transformation.h:47
void transformation()
Perform decimation.
Definition: FScrunch.C:68
Decimates a TimeSeries in the frequency domain.
Definition: FScrunch.h:23
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
@ OrderFPT
Frequency, Polarization, Time (default before 3 October 2008)
Definition: TimeSeries.h:47
@ OrderTFP
Time, Frequency, Polarization (better for many things)
Definition: TimeSeries.h:50

Generated using doxygen 1.8.17