DP3
Telescope.h
Go to the documentation of this file.
1 // Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 #ifndef DP3_BASE_TELESCOPE_H_
5 #define DP3_BASE_TELESCOPE_H_
6 
7 #include <EveryBeam/load.h>
8 
9 namespace dp3 {
10 namespace base {
11 
15 inline std::unique_ptr<everybeam::telescope::Telescope> GetTelescope(
16  const std::string& ms_name,
17  const everybeam::ElementResponseModel element_response_model,
18  bool use_channel_frequency, const std::string& coefficients_file) {
19  everybeam::Options options;
20  options.element_response_model = element_response_model;
21  options.use_channel_frequency = use_channel_frequency;
22  options.coeff_path = coefficients_file;
23  std::unique_ptr<everybeam::telescope::Telescope> telescope =
24  everybeam::Load(ms_name, options);
25  return telescope;
26 }
27 
28 bool IsHomogeneous(const everybeam::telescope::Telescope& telescope);
29 
38 std::vector<size_t> SelectStationIndices(
39  const everybeam::telescope::Telescope& telescope,
40  const std::vector<std::string>& station_names);
41 
42 } // namespace base
43 } // namespace dp3
44 
45 #endif
bool IsHomogeneous(const everybeam::telescope::Telescope &telescope)
std::unique_ptr< everybeam::telescope::Telescope > GetTelescope(const std::string &ms_name, const everybeam::ElementResponseModel element_response_model, bool use_channel_frequency, const std::string &coefficients_file)
Definition: Telescope.h:15
std::vector< size_t > SelectStationIndices(const everybeam::telescope::Telescope &telescope, const std::vector< std::string > &station_names)
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53