PolnSelect.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2012 by Paul Demorest
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __baseband_dsp_PolnSelect_h
10 #define __baseband_dsp_PolnSelect_h
11 
12 #include "dsp/Transformation.h"
13 #include "dsp/TimeSeries.h"
14 
15 #include <vector>
16 
17 namespace dsp
18 {
20  class PolnSelect : public Transformation<TimeSeries,TimeSeries>
21  {
22 
23  public:
24 
26  PolnSelect ();
27 
29  void transformation ();
30 
32  void set_ipol (int _ipol) { ipol_keep = _ipol; }
33 
34  // Get the currently selected poln index
35  int get_ipol () const { return ipol_keep; }
36 
37  class Engine;
38 
39  void set_engine (Engine*);
40 
41  protected:
42 
44  int ipol_keep;
45  };
46 
47  class PolnSelect::Engine : public OwnStream
48  {
49  public:
50 
51  virtual void setup () = 0;
52 
53  virtual void fpt_polnselect (int ipol,
54  const dsp::TimeSeries * in,
55  dsp::TimeSeries * out) = 0;
56 
57  virtual void tfp_polnselect (int ipol,
58  const dsp::TimeSeries* in,
59  dsp::TimeSeries* out) = 0;
60 
61  };
62 
63 }
64 
65 #endif
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
int ipol_keep
The polarization to keep.
Definition: PolnSelect.h:54
void set_ipol(int _ipol)
Select the poln index to keep.
Definition: PolnSelect.h:42
void transformation()
Apply the npol to single-pol transformation.
Definition: PolnSelect.C:21
PolnSelect()
Default constructor.
Definition: PolnSelect.C:12
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