DP3
VdsMaker.h
Go to the documentation of this file.
1 // VdsMaker.h: Class to create the description of an MS
2 //
3 // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 
9 
10 #ifndef LOFAR_MS_VDSMAKER_H
11 #define LOFAR_MS_VDSMAKER_H
12 
13 #include "ClusterDesc.h"
14 
15 #include <casacore/ms/MeasurementSets/MeasurementSet.h>
16 #include <casacore/casa/Arrays/Vector.h>
17 
18 namespace dp3 {
19 namespace common {
20 
24 
32 //
36 
37 class VdsMaker {
38  public:
47  static void create(const std::string& msName, const std::string& outName,
48  const std::string& clusterDescName,
49  const std::string& hostName = std::string(),
50  bool fillTimes = true);
51 
53  static void combine(const std::string& gdsName,
54  const std::vector<std::string>& vdsNames);
55 
56  private:
59  static void getFreqInfo(casacore::MS& ms, std::vector<int>& nrchan,
60  std::vector<casacore::Vector<double>>& startFreq,
61  std::vector<casacore::Vector<double>>& endFreq);
62 
64  static void getFields(casacore::MS& ms, std::vector<double>& ra,
65  std::vector<double>& dec,
66  std::vector<std::string>& refType);
67 
69  static void getAntNames(casacore::MS& ms, std::vector<std::string>& antNames);
70 
72  static void getCorrInfo(casacore::MS& ms,
73  std::vector<std::string>& corrTypes);
74 
78  static void getDataFileInfo(casacore::MS& ms, string& name, bool& regular,
79  std::vector<int>& tileShape,
80  std::vector<int>& cubeShape);
81 
84  static string findFileSys(const std::string& fileName,
85  const common::ClusterDesc& cdesc,
86  const std::string& hostName);
87 };
88 
90 
91 } // namespace common
92 } // namespace dp3
93 
94 #endif
Description of a cluster and the nodes in it.
Description of a cluster and the nodes in it.
Definition: ClusterDesc.h:41
Class to create the description of an MS.
Definition: VdsMaker.h:37
static void create(const std::string &msName, const std::string &outName, const std::string &clusterDescName, const std::string &hostName=std::string(), bool fillTimes=true)
static void combine(const std::string &gdsName, const std::vector< std::string > &vdsNames)
Combine the given VDS file into a global VDS file.
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53