PolnReshape.h
1 //-*-C++-*-
2 
3 /***************************************************************************
4  *
5  * Copyright (C) 2015 by Matthew Kerr
6  * Licensed under the Academic Free License version 2.1
7  *
8  ***************************************************************************/
9 
10 #ifndef __baseband_dsp_PolnReshape_h
11 #define __baseband_dsp_PolnReshape_h
12 
13 #include "dsp/Transformation.h"
14 #include "dsp/TimeSeries.h"
15 
16 // Detection is handled very efficiently on the GPU for 2pol, analytic data.
17 // But other formats may be more useful down the signal path. This
18 // Transformation allows post-detection conversion from 2pol,2dim data to
19 // a variety of formats:
20 
21 // In the 2pol, 2dim case the coherency parameters are packed such that
22 // AA and BB are the 2 dimensions of a sample in the pol=0 stream, and
23 // AB and BA* are the 2 dimensions of a sample in the pol=1 stream.
24 
25 // npol=4, ndim = 1: Coherence / Stokes
26 // npol=2, ndim = 1: PPQQ
27 // npol=1, ndim = 1: Intensity
28 
29 // The transformation performed is determined uniquely by the output state.
30 
31 namespace dsp
32 {
34  class PolnReshape : public Transformation<TimeSeries,TimeSeries>
35  {
36 
37  public:
38 
40  PolnReshape ();
41 
43  void transformation ();
44 
46  void set_state ( Signal::State _state) { state = _state; }
47 
48  protected:
49 
52 
54  void p2d2_p4d1();
55 
57  void p2d2_p2d1();
58 
60  void p2d2_p1d1();
61 
63  void p1d1_p1d1();
64 
65  };
66 }
67 
68 #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
void set_state(Signal::State _state)
Reshape the poln index to keep.
Definition: PolnReshape.h:56
void p2d2_p2d1()
Handle 2x2 --> 2x1 (PPQQ)
Definition: PolnReshape.C:60
void p1d1_p1d1()
Handle 1x1 --> 1x1 (Intensity)
Definition: PolnReshape.C:131
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
Signal::State state
The polarization to keep.
Definition: PolnReshape.h:61
void transformation()
Apply the npol to single-pol transformation.
Definition: PolnReshape.C:167
void p2d2_p1d1()
Handle 2x2 --> 1x1 (Intensity)
Definition: PolnReshape.C:97
void p2d2_p4d1()
Handle 2x2 --> 4x1 (Coherence or Stokes)
Definition: PolnReshape.C:20
@ OrderFPT
Frequency, Polarization, Time (default before 3 October 2008)
Definition: TimeSeries.h:47
PolnReshape()
Default constructor.
Definition: PolnReshape.C:13

Generated using doxygen 1.8.17