ChanPolSelect.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2024 by Jesmigel Cantos
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 // dspsr/Signal/General/dsp/ChanPolSelect.h
9 
10 #ifndef __dsp_ChanPolSelect_h
11 #define __dsp_ChanPolSelect_h
12 
13 #include "dsp/Transformation.h"
14 #include "dsp/TimeSeries.h"
15 
16 #include <vector>
17 
18 namespace dsp
19 {
24  class ChanPolSelect : public Transformation<TimeSeries,TimeSeries>
25  {
26 
27  public:
28 
30  ChanPolSelect ();
31 
33  ~ChanPolSelect () = default;
34 
35  void prepare ();
36 
45  void transformation ();
46 
48  void set_start_channel_index(unsigned channel_index);
49 
51  unsigned get_start_channel_index() const;
52 
54  void set_number_of_channels_to_keep(unsigned nchan);
55 
57  unsigned get_number_of_channels_to_keep() const;
58 
60  void set_start_polarization_index(unsigned polarization_index);
61 
63  unsigned get_start_polarization_index() const;
64 
66  void set_number_of_polarizations_to_keep(unsigned npol);
67 
69  unsigned get_number_of_polarizations_to_keep() const;
70 
71  private:
72 
74  unsigned start_channel_index = 0;
75 
77  unsigned number_of_channels_to_keep = 0;
78 
80  unsigned start_polarization_index = 0;
81 
83  unsigned number_of_polarizations_to_keep = 0;
84  };
85 
86 } // namespace dsp
87 
88 #endif // __dsp_ChanPolSelect_h
~ChanPolSelect()=default
Destructor.
unsigned get_number_of_polarizations_to_keep() const
get the number_of_polarizations_to_keep
Definition: ChanPolSelect.C:85
void set_number_of_channels_to_keep(unsigned nchan)
set the number_of_channels_to_keep
Definition: ChanPolSelect.C:34
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
unsigned get_start_polarization_index() const
get the start_polarization_index
Definition: ChanPolSelect.C:80
void set_start_channel_index(unsigned channel_index)
set the start_channel_index
Definition: ChanPolSelect.C:22
ChanPolSelect()
Default constructor.
Definition: ChanPolSelect.C:16
void transformation()
Copy a block of data from the input container using the following parameters: start_channel_index num...
Definition: ChanPolSelect.C:145
unsigned get_start_channel_index() const
get the start_channel_index
Definition: ChanPolSelect.C:70
void set_number_of_polarizations_to_keep(unsigned npol)
set the number_of_polarizations_to_keep
Definition: ChanPolSelect.C:58
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
unsigned get_number_of_channels_to_keep() const
get the number_of_channels_to_keep
Definition: ChanPolSelect.C:75
void prepare()
Prepare for data operations.
Definition: ChanPolSelect.C:90
void set_start_polarization_index(unsigned polarization_index)
set the start_polarization_index
Definition: ChanPolSelect.C:46
Computes array offset into TFP-ordered TimeSeries.
Definition: TFPOffset.h:22
@ 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