File: observationinfo.h

package info (click to toggle)
wsclean 3.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,968 kB
  • sloc: cpp: 85,742; python: 3,526; sh: 245; makefile: 21
file content (37 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef OBSERVATION_INFO_H
#define OBSERVATION_INFO_H

#include <aocommon/io/serialstreamfwd.h>

#include <string>

#include <casacore/ms/MeasurementSets/MeasurementSet.h>

namespace wsclean {

struct ObservationInfo {
  double phaseCentreRA = 0.0;
  double phaseCentreDec = 0.0;
  std::string telescopeName;
  std::string observer;
  std::string fieldName;

  /// Comparison operator, for use in tests.
  bool operator==(const ObservationInfo& other) const {
    return phaseCentreRA == other.phaseCentreRA &&
           phaseCentreDec == other.phaseCentreDec &&
           telescopeName == other.telescopeName && observer == other.observer &&
           fieldName == other.fieldName;
  }

  void Serialize(aocommon::SerialOStream& stream) const;
  void Unserialize(aocommon::SerialIStream& stream);
};

/// Generates observation info from the measurement set tables.
struct ObservationInfo ReadObservationInfo(casacore::MeasurementSet& ms,
                                           size_t fieldId);

}  // namespace wsclean

#endif