LuMPObservation.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 __LuMPObservation_h
11 #define __LuMPObservation_h
12 
13 #include "dsp/ASCIIObservation.h"
14 
15 namespace dsp {
16 
17  enum BinaryFormat
18  {
19  // Unknown format
20  UnknownBinForm,
21  // Integer, signed two's compliment
22  IntegerBinForm,
23  // IEEE floating point
24  IEEE_FloatBinForm
25  };
26 
27  enum DataEndianness
28  {
29  // Unknown endianness
30  UnknownDataEndian,
31  // Little endian
32  DataLittleEndian,
33  // Big endian
34  DataBigEndian
35  };
36 
37  enum PolOrdering
38  {
39  // When we don't know what is going on
40  UnknownOrdering,
41  // dspsr natural order for single dish
42  // PP, QQ, Re[PQ], Im[PQ]
43  DSPSROrdering,
44  // Correlator Jones matrix natural ordering
45  // PP PQ QP QQ
46  JonesMatrixOrdering
47  };
48 
50  class LuMPObservation : public ASCIIObservation {
51 
52  public:
53 
55  LuMPObservation (const char* header);
56 
58  virtual void set_binary_format (BinaryFormat _binary_format)
59  { binary_format = _binary_format; }
61  BinaryFormat get_binary_format() const { return binary_format; }
62 
64  virtual void set_data_endianness (DataEndianness _data_endianness)
65  { data_endianness = _data_endianness; }
67  DataEndianness get_data_endianness() const { return data_endianness; }
68 
70  virtual void set_pol_ordering (PolOrdering _pol_ordering)
71  { pol_ordering = _pol_ordering; }
73  PolOrdering get_pol_ordering() const { return pol_ordering; }
74 
76  virtual void set_read_from_LuMP_file (bool _read_from_LuMP_file)
77  { read_from_LuMP_file = _read_from_LuMP_file; }
79  bool get_read_from_LuMP_file() const { return read_from_LuMP_file; }
80 
82  virtual void set_LuMP_file_size (uint64_t _LuMP_file_size)
83  { LuMP_file_size = _LuMP_file_size; }
85  uint64_t get_LuMP_file_size() const { return LuMP_file_size; }
86 
87  private:
88 
89 
91  BinaryFormat binary_format;
92 
94  DataEndianness data_endianness;
95 
97  PolOrdering pol_ordering;
98 
100  bool read_from_LuMP_file;
101 
103  uint64_t LuMP_file_size;
104  };
105 
106 }
107 
108 #endif
LuMPObservation(const char *header)
Construct from a LuMP file header.
Definition: LuMPObservation.C:21
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
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
virtual void set_binary_format(BinaryFormat _binary_format)
Set the binary format.
Definition: LuMPObservation.h:63
virtual void set_LuMP_file_size(uint64_t _LuMP_file_size)
Set the LuMP file size.
Definition: LuMPObservation.h:87
DataEndianness get_data_endianness() const
Return the data endianness.
Definition: LuMPObservation.h:72
uint64_t get_LuMP_file_size() const
Return the data read mode.
Definition: LuMPObservation.h:90
virtual void set_read_from_LuMP_file(bool _read_from_LuMP_file)
Set the data read mode.
Definition: LuMPObservation.h:81
bool get_read_from_LuMP_file() const
Return the data read mode.
Definition: LuMPObservation.h:84
virtual void set_data_endianness(DataEndianness _data_endianness)
Set the data endianness.
Definition: LuMPObservation.h:69
virtual void set_pol_ordering(PolOrdering _pol_ordering)
Set the polarization ordering.
Definition: LuMPObservation.h:75

Generated using doxygen 1.8.17