BitUnpacker.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Classes/dsp/BitUnpacker.h
10 
11 #ifndef __BitUnpacker_h
12 #define __BitUnpacker_h
13 
14 #include "dsp/HistUnpacker.h"
15 
16 namespace dsp {
17 
18  class BitTable;
19 
21  class BitUnpacker: public HistUnpacker
22  {
23 
24  public:
25 
27  BitUnpacker (const char* name = "BitUnpacker");
28 
30  virtual ~BitUnpacker ();
31 
33  double get_optimal_variance ();
34 
36  void set_table (BitTable* table);
37 
39  const BitTable* get_table () const;
40 
42  virtual void unpack (uint64_t ndat,
43  const unsigned char* from, const unsigned nskip,
44  float* into, const unsigned fskip,
45  unsigned long* hist) = 0;
46 
47  protected:
48 
51 
53  virtual void unpack ();
54 
55  };
56 
57 }
58 
59 #endif
60 
BitUnpacker(const char *name="BitUnpacker")
Null constructor.
Definition: BitUnpacker.C:16
Bit unpacker that keeps a histogram and optimal statistics.
Definition: HistUnpacker.h:25
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
std::string name
Operation name.
Definition: Operation.h:153
Look-up table for converting N-bit digitized to floating point numbers.
Definition: BitTable.h:22
const BitTable * get_table() const
Get the digitisation convention.
Definition: BitUnpacker.C:43
void set_table(BitTable *table)
Set the digitisation convention.
Definition: BitUnpacker.C:35
Reference::To< BitTable > table
The bit table generator
Definition: BitUnpacker.h:55
virtual void unpack()
Unpack all channels, polarizations, real/imag, etc.
Definition: BitUnpacker.C:48
double get_optimal_variance()
Get the optimal value of the output time series variance.
Definition: BitUnpacker.C:26
virtual ~BitUnpacker()
Virtual destructor.
Definition: BitUnpacker.C:22
virtual void set_nstate(unsigned nstate)
Set the number of states in the histogram.
Definition: HistUnpacker.C:88

Generated using doxygen 1.8.17