Mask.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2023 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __dsp_Signal_General_Mask_h
10 #define __dsp_Signal_General_Mask_h
11 
12 #include "dsp/Transformation.h"
13 #include "dsp/TimeSeries.h"
14 
15 namespace dsp {
16 
17  class TimeSeries;
18 
20  class Mask: public Transformation<TimeSeries,TimeSeries> {
21 
22  public:
23 
25  Mask (const char* name);
26 
28  ~Mask ();
29 
31  bool get_order_supported (TimeSeries::Order order) const;
32 
34  static Mask* factory (const std::string& descriptor);
35 
36  protected:
37 
39  void transformation ();
40 
42  virtual void mask_data() = 0;
43 
45 
46  virtual void mask (uint64_t start_idat, uint64_t end_idat);
47 
49  void mask_TFP(uint64_t start_idat, uint64_t end_idat);
50 
52  void mask_FPT(uint64_t start_idat, uint64_t end_idat);
53  };
54 
55 }
56 
57 #endif // !defined(__dsp_Signal_General_Mask_h)
Mask(const char *name)
Default constructor.
Definition: Mask.C:14
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
Masks samples in the input TimeSeries by setting them to zero.
Definition: Mask.h:25
Order
Order of the dimensions.
Definition: TimeSeries.h:39
std::string name
Operation name.
Definition: Operation.h:153
Type * release()
Mask samples in the input TimeSeries that are spanned by time intervals.
Definition: MaskTimes.h:24
void mask_FPT(uint64_t start_idat, uint64_t end_idat)
Mask data in Frequency-Polarization-Time order.
Definition: Mask.C:86
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
void mask_TFP(uint64_t start_idat, uint64_t end_idat)
Mask data in Time-Frequency-Polarization order.
Definition: Mask.C:65
virtual void mask_data()=0
Derived types define how masking is performed.
static bool verbose
Global verbosity flag.
Definition: Operation.h:48
virtual void mask(uint64_t start_idat, uint64_t end_idat)
Helper function masks all samples on the specified interval.
Definition: Mask.C:45
static Mask * factory(const std::string &descriptor)
Factory creates a new Mask-derived transformation object.
Definition: Mask.C:115
~Mask()
Destructor.
Definition: Mask.C:21
void transformation()
Perform the transformation on the input time series.
Definition: Mask.C:27
bool get_order_supported(TimeSeries::Order order) const
Return true if the specified input data order can be supported.
Definition: Mask.C:38
@ 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