LuMPUnpacker.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2011, 2013 by James M Anderson (MPIfR)
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 
10 #ifndef __LuMPUnpacker_h
11 #define __LuMPUnpacker_h
12 
13 #include "dsp/Unpacker.h"
14 
15 namespace dsp
16 {
17 
19  // Use the basic Unpacker mother class, as
20  // HistUnpacker has too many complications with conversion from float, etc.
21  class LuMPUnpacker : public Unpacker
22  {
23 
24  public:
25 
27  LuMPUnpacker (const char* name = "LuMPUnpacker");
28 
29  protected:
30 
32  virtual void unpack ();
33 
35  virtual bool get_order_supported (TimeSeries::Order) const;
36 
38  virtual void set_output_order (TimeSeries::Order);
39 
41  virtual bool matches (const Observation* observation);
42 
43  unsigned get_output_ichan (unsigned idig) const;
44  unsigned get_output_ipol (unsigned idig) const;
45 
46 
47  };
48 
49 }
50 
51 #endif // !defined(__LuMPUnpacker_h)
virtual void set_output_order(TimeSeries::Order)
Set the order of the dimensions in the output TimeSeries.
Definition: LuMPUnpacker.C:44
virtual uint64_t get_nsamples(uint64_t nbytes) const
Return the number of samples in nbytes bytes.
Definition: Observation.C:548
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
unsigned get_ndim() const
Return the dimension of each datum.
Definition: Observation.h:80
Signal::State get_state() const
Return the state of the signal.
Definition: Observation.h:70
unsigned get_nbit() const
Return the number of bits per value.
Definition: Observation.h:95
Order
Order of the dimensions.
Definition: TimeSeries.h:39
PolOrdering get_pol_ordering() const
Return the polarization ordering.
Definition: LuMPObservation.h:78
BinaryFormat get_binary_format() const
Return the binary format.
Definition: LuMPObservation.h:66
double get_dispersion_measure() const
Returns the pulsar dispersion measure.
Definition: Observation.h:205
double get_rate() const
Return the sampling rate (time samples per second in Hz)
Definition: Observation.h:157
uint64_t get_ndat() const
Return the number of time samples in container.
Definition: Observation.h:107
std::string name
Operation name.
Definition: Operation.h:153
DataEndianness get_data_endianness() const
Return the data endianness.
Definition: LuMPObservation.h:72
Parses Observation attributes from a LuMP header.
Definition: LuMPObservation.h:55
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
std::string get_telescope() const
Return the telescope name.
Definition: Observation.h:112
virtual uint64_t get_nbytes(uint64_t nsamples) const
Return the size in bytes of nsamples time samples.
Definition: Observation.C:543
virtual bool matches(const Observation *observation)
Return true if we can convert the Observation.
Definition: LuMPUnpacker.C:49
float get_nbyte() const
Return the size in bytes of one time sample.
Definition: Observation.C:534
std::string get_source() const
Return the source name.
Definition: Observation.h:122
Abstract base class of Transformations that convert n-bit to float.
Definition: Unpacker.h:42
virtual bool get_order_supported(TimeSeries::Order) const
Return true; support any output order.
Definition: LuMPUnpacker.C:38
LuMPUnpacker(const char *name="LuMPUnpacker")
Constructor.
Definition: LuMPUnpacker.C:32
std::string get_machine() const
Return the instrument used to record signal.
Definition: Observation.h:194
@ OrderFPT
Frequency, Polarization, Time (default before 3 October 2008)
Definition: TimeSeries.h:47
virtual void unpack()
The unpacking routine.
Definition: LuMPUnpacker.C:155
@ OrderTFP
Time, Frequency, Polarization (better for many things)
Definition: TimeSeries.h:50

Generated using doxygen 1.8.17