Mark5TwoBitCorrection.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Formats/mark5/dsp/Mark5TwoBitCorrection.h
10 
11 #ifndef __Mark5TwoBitCorrection_h
12 #define __Mark5TwoBitCorrection_h
13 
14 #include "dsp/SubByteTwoBitCorrection.h"
15 
16 namespace dsp {
17 
18  class Mark5File;
19 
21  class Mark5TwoBitCorrection: public SubByteTwoBitCorrection {
22 
23  public:
24 
27 
29  virtual bool matches (const Observation* observation);
30 
32  static bool can_do (const Observation* observation);
33 
34  unsigned get_ndig_per_byte () const;
35 
36  unsigned get_input_incr () const;
37 
38  unsigned get_input_offset (unsigned idig) const;
39 
40  unsigned get_output_ipol (unsigned idig) const;
41 
42  unsigned get_output_ichan (unsigned idig) const;
43 
44  protected:
45 
47  void dig_unpack (const unsigned char* input_data,
48  float* output_data,
49  uint64_t ndat,
50  unsigned long* hist,
51  unsigned* weights = 0,
52  unsigned nweights = 0);
53 
54  const Mark5File* file;
55 
56  TwoBit< 2, GatherMask<2> > gather;
57 
58  };
59 
60 }
61 
62 #endif
void excision_unpack(U &unpack, Iterator &input, float *output_data, uint64_t ndat, unsigned long *hist, unsigned *weights, unsigned nweights)
Template method can be used to implement pure virtual dig_unpack.
An iterator through contiguous data.
Definition: StepIterator.h:16
unsigned get_ndig_per_byte() const
Definition: Mark5TwoBitCorrection.C:40
unsigned get_output_ichan(unsigned idig) const
Definition: Mark5TwoBitCorrection.C:70
Mark5TwoBitCorrection()
Constructor initializes base class atributes.
Definition: Mark5TwoBitCorrection.C:30
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
virtual void set_ndig(unsigned ndig)
Set the number of digitizers (histograms)
Definition: HistUnpacker.C:64
unsigned get_input_incr() const
Definition: Mark5TwoBitCorrection.C:82
unsigned get_nbit() const
Return the number of bits per value.
Definition: Observation.h:95
static bool can_do(const Observation *observation)
Return true if Mark5TwoBitCorrection can convert the Observation.
Definition: Mark5TwoBitCorrection.C:21
unsigned get_npol() const
Return the number of polarizations.
Definition: Observation.h:90
Stores information about digital, band-limited, time-varying signals.
Definition: Observation.h:33
Unpack one or two 2-bit samples per byte from an array of bytes.
Definition: TwoBit1or2.h:102
unsigned get_input_offset(unsigned idig) const
Definition: Mark5TwoBitCorrection.C:76
Reference::To< TwoBitTable > table
Two-bit conversion table generator.
Definition: TwoBitCorrection.h:96
Look-up table for converting 2-bit digitized to floating point numbers.
Definition: TwoBitTable.h:25
void dig_unpack(const unsigned char *input_data, float *output_data, uint64_t ndat, unsigned long *hist, unsigned *weights=0, unsigned nweights=0)
Over-ride the SubByteTwoBitCorrection unpacking algorithm.
Definition: Mark5TwoBitCorrection.C:122
virtual bool matches(const Observation *observation)
Return true if Mark5TwoBitCorrection can convert the Observation.
Definition: Mark5TwoBitCorrection.C:16
Loads BitSeries data from a MkV file.
Definition: Mark5File.h:22
std::string get_machine() const
Return the instrument used to record signal.
Definition: Observation.h:194
Converts BitSeries data from two-bit digitized to floating-point values.
Definition: SubByteTwoBitCorrection.h:29
unsigned get_output_ipol(unsigned idig) const
Definition: Mark5TwoBitCorrection.C:55
unsigned get_nchan() const
Return the number of channels into which the band is divided.
Definition: Observation.h:85

Generated using doxygen 1.8.17