GenericVoltageDigitizer.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2024 by William Gauvin and Andrew Jameson
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Formats/sigproc/dsp/GenericVoltageDigitizer.h
10 
11 #ifndef __dsp_GenericVoltageDigitizer_h
12 #define __dsp_GenericVoltageDigitizer_h
13 
14 #include "dsp/Digitizer.h"
15 
16 namespace dsp
17 {
19  class GenericVoltageDigitizer : public Digitizer
20  {
21  public:
22 
25 
27  void set_nbit(int) override;
28 
36  void pack() override;
37 
45  void set_scale(float scale) { scale_fac = scale; }
46 
53  static float get_default_digi_mean(int bit_width);
54 
61  static float get_default_digi_scale(int bit_width);
62 
63  protected:
65  float scale_fac = 1.0;
66 
67  private:
69  float digi_mean{0.0};
70 
72  float digi_scale{0.0};
73 
75  int digi_max{0};
76 
78  int digi_min{0};
79  };
80 } // namespace dsp
81 
82 #endif // __dsp_GenericVoltageDigitizer_h
void set_scale(float scale)
sets a multiplicative scale factor to apply in addition to the digi_scale.
Definition: GenericVoltageDigitizer.h:55
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
void pack() override
pack the data.
Definition: GenericVoltageDigitizer.C:59
Convert floating point samples to N-bit samples.
Definition: Digitizer.h:27
void set_nbit(int) override
Get the number of bits per sample (FITS BITPIX convention)
Definition: GenericVoltageDigitizer.C:17
static float get_default_digi_mean(int bit_width)
Get the default digitization mean for the requantization bit width.
Definition: GenericVoltageDigitizer.C:33
static bool verbose
Global verbosity flag.
Definition: Operation.h:48
static float get_default_digi_scale(int bit_width)
Get the default digitization scale factor for the requantization bit width.
Definition: GenericVoltageDigitizer.C:46
GenericVoltageDigitizer()
Default constructor.
Definition: GenericVoltageDigitizer.C:13
float scale_fac
Additional scale factor to apply to data during digitization.
Definition: GenericVoltageDigitizer.h:75
@ 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