Detection.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2002 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Signal/General/dsp/Detection.h
10 
11 
12 #ifndef __Detection_h
13 #define __Detection_h
14 
15 class Detection;
16 
17 #include "dsp/Transformation.h"
18 #include "dsp/TimeSeries.h"
19 
20 namespace dsp {
21 
23 
38  class Detection : public Transformation <TimeSeries, TimeSeries> {
39 
40  public:
41 
43  Detection ();
44 
46  void prepare ();
47 
49  void set_output_state (Signal::State _state);
51  Signal::State get_output_state () const { return state; }
52 
54  void set_output_ndim (int _ndim) { ndim = _ndim; }
56  bool get_output_ndim () const { return ndim; }
57 
60 
62  class Engine;
63  void set_engine (Engine*);
64 
65  protected:
66 
68  virtual void transformation ();
69 
72 
74  int ndim;
75 
78 
80  void get_result_pointers (unsigned ichan, bool inplace, float* r[4]);
81 
83  void square_law ();
84 
86  void polarimetry ();
87 
89  void resize_output ();
90 
92  void checks();
93 
95  void onepol_detect();
96  };
97 
98  class Detection::Engine : public Reference::Able
99  {
100  public:
101  virtual void polarimetry (unsigned ndim,
102  const TimeSeries* in, TimeSeries* out) = 0;
103 
104  virtual void square_law (const dsp::TimeSeries* input,
105  dsp::TimeSeries* output) = 0;
106  };
107 }
108 
109 #endif // !defined(__Detection_h)
virtual void transformation()
Detect the input data.
Definition: Detection.C:74
void set_output_state(Signal::State _state)
Set the state of the output data.
Definition: Detection.C:42
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
Detects phase-coherent TimeSeries data.
Definition: Detection.h:38
void square_law()
Perform simple square-law detection.
Definition: Detection.C:225
Order
Order of the dimensions.
Definition: TimeSeries.h:39
void get_result_pointers(unsigned ichan, bool inplace, float *r[4])
Called by polarimetry to return pointers to the result channels.
Definition: Detection.C:579
void polarimetry()
Polarization detection (Stokes parameters or Coherency products)
Definition: Detection.C:471
void prepare()
Prepare the output TimeSeries attributes.
Definition: Detection.C:68
Signal::State state
Signal::State of the output data.
Definition: Detection.h:71
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
void resize_output()
Set the state of the output TimeSeries.
Definition: Detection.C:153
Reference::To< Engine > engine
Interface to alternate processing engine (e.g. GPU)
Definition: Detection.h:77
void onepol_detect()
Quick and dirty method for detecting to PP or QQ.
Signal::State get_output_state() const
Get the state of the output data.
Definition: Detection.h:51
Detection()
Constructor.
Definition: Detection.C:29
bool get_order_supported(TimeSeries::Order) const
Return true if the specified input data order can be supported.
Definition: Detection.C:215
void checks()
Throws an Error if something is wrong.
Definition: Detection.C:632
bool get_output_ndim() const
Get the dimension of the output data.
Definition: Detection.h:56
int ndim
Dimension of the output data.
Definition: Detection.h:74
Reference::To< const TimeSeries > input
Container from which input data will be read.
Definition: HasInput.h:49
@ OrderFPT
Frequency, Polarization, Time (default before 3 October 2008)
Definition: TimeSeries.h:47
void set_output_ndim(int _ndim)
Set the dimension of the output data.
Definition: Detection.h:54
Reference::To< TimeSeries > output
Container into which output data will be written.
Definition: HasOutput.h:49

Generated using doxygen 1.8.17