From 22cd113b8fb86923545937ae4d6869cf2890112d Mon Sep 17 00:00:00 2001 From: Andre Offringa <offringa@astron.nl> Date: Thu, 13 Jul 2023 09:54:49 +0000 Subject: [PATCH] Implement a circular beam for MeerKAT (L-band) --- CMakeLists.txt | 2 +- README.md | 3 +- cpp/CMakeLists.txt | 1 + cpp/circularsymmetric/CMakeLists.txt | 4 +- cpp/circularsymmetric/meerkatcoefficients.cc | 10 +++++ cpp/circularsymmetric/meerkatcoefficients.h | 45 ++++++++++++++++++++ cpp/load.cc | 12 +++++- cpp/load.h | 1 + 8 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 cpp/circularsymmetric/meerkatcoefficients.cc create mode 100644 cpp/circularsymmetric/meerkatcoefficients.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 89114c6f..dab55fea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.8) #------------------------------------------------------------------------------ # Set version name and project number -set(EVERYBEAM_VERSION 0.5.1) +set(EVERYBEAM_VERSION 0.5.2) if(EVERYBEAM_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") set(EVERYBEAM_VERSION_MAJOR "${CMAKE_MATCH_1}") set(EVERYBEAM_VERSION_MINOR "${CMAKE_MATCH_2}") diff --git a/README.md b/README.md index c840a0a2..8a61e5b4 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@ radio telescopes, i.e.: * SKA/OSKAR * ATCA * GMRT -* VLA +* MeerKAT * MWA +* VLA This package also provides an abstract interface to a selection of beam responses for apperture arrays (LOFAR/OSKAR), and beamformed versions thereof. Currently implemented are: diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3174a49b..0499c733 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -65,6 +65,7 @@ add_library( pointresponse/skamidpoint.cc circularsymmetric/atcacoefficients.cc circularsymmetric/gmrtcoefficients.cc + circularsymmetric/meerkatcoefficients.cc circularsymmetric/vlacoefficients.cc circularsymmetric/voltagepattern.cc # Phased array telescopes (SKA, LOFAR) diff --git a/cpp/circularsymmetric/CMakeLists.txt b/cpp/circularsymmetric/CMakeLists.txt index db38a6e4..894a2fa8 100644 --- a/cpp/circularsymmetric/CMakeLists.txt +++ b/cpp/circularsymmetric/CMakeLists.txt @@ -1,6 +1,6 @@ # Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy) # SPDX-License-Identifier: GPL-3.0-or-later -install(FILES atcacoefficients.h gmrtcoefficients.h vlacoefficients.h - voltagepattern.h +install(FILES atcacoefficients.h gmrtcoefficients.h meerkatcoefficients.h + vlacoefficients.h voltagepattern.h DESTINATION "include/${CMAKE_PROJECT_NAME}/circularsymmetric") diff --git a/cpp/circularsymmetric/meerkatcoefficients.cc b/cpp/circularsymmetric/meerkatcoefficients.cc new file mode 100644 index 00000000..e8d31dea --- /dev/null +++ b/cpp/circularsymmetric/meerkatcoefficients.cc @@ -0,0 +1,10 @@ +// Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "meerkatcoefficients.h" + +namespace everybeam { +namespace circularsymmetric { +constexpr std::array<double, 6> MeerKATCoefficients::coefficients_; +} +} // namespace everybeam diff --git a/cpp/circularsymmetric/meerkatcoefficients.h b/cpp/circularsymmetric/meerkatcoefficients.h new file mode 100644 index 00000000..17ecc353 --- /dev/null +++ b/cpp/circularsymmetric/meerkatcoefficients.h @@ -0,0 +1,45 @@ +// Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef EVERYBEAM_CIRCULARSYMMETRIC_MEERKAT_COEFFICIENTS_H_ +#define EVERYBEAM_CIRCULARSYMMETRIC_MEERKAT_COEFFICIENTS_H_ + +#include <array> +#include <map> +#include <string> + +#include "coefficients.h" + +namespace everybeam { +namespace circularsymmetric { +class MeerKATCoefficients final : public Coefficients { + public: + MeerKATCoefficients() {} + + aocommon::UVector<double> GetFrequencies(double frequency) const override { + return aocommon::UVector<double>{frequency}; + } + aocommon::UVector<double> GetCoefficients(double frequency) const override { + return aocommon::UVector<double>(coefficients_.begin(), + coefficients_.end()); + } + double MaxRadiusInArcMin() const override { + // This is approximately the place of the first null with these + // coefficients. + return 71.0; + } + double ReferenceFrequency() const override { return 1.278e9; } + bool AreInverted() const override { return false; } + + private: + /** + * These coefficients are from "The 1.28 GHz MeerKAT DEEP2 Image" (Mauch et + * al. 2020). See https://iopscience.iop.org/article/10.3847/1538-4357/ab5d2d + * These are valid for L-band. + */ + static constexpr std::array<double, 6> coefficients_{ + 1.0, -0.3514e-03, 0.5600e-07, -0.0474e-10, 0.00078e-13, 0.00019e-16}; +}; +} // namespace circularsymmetric +} // namespace everybeam +#endif // EVERYBEAM_CIRCULARSYMMETRIC_MEERKAT_COEFFICIENTS_H_ diff --git a/cpp/load.cc b/cpp/load.cc index b0629c3f..b2e22cb4 100644 --- a/cpp/load.cc +++ b/cpp/load.cc @@ -11,6 +11,7 @@ #include "circularsymmetric/atcacoefficients.h" #include "circularsymmetric/gmrtcoefficients.h" +#include "circularsymmetric/meerkatcoefficients.h" #include "circularsymmetric/vlacoefficients.h" #include <casacore/ms/MeasurementSets/MeasurementSet.h> @@ -38,6 +39,8 @@ TelescopeType GetTelescopeType(const casacore::MeasurementSet& ms) { return kGMRTTelescope; } else if (telescope_name == "LOFAR") { return kLofarTelescope; + } else if (telescope_name == "MEERKAT") { + return kMeerKATTelescope; } else if (telescope_name == "MID") { return kSkaMidTelescope; } else if (telescope_name == "MWA") { @@ -69,8 +72,8 @@ std::unique_ptr<telescope::Telescope> Load(const casacore::MeasurementSet& ms, telescope = std::make_unique<telescope::Dish>(ms, std::move(coefs), options); } break; - case kVLATelescope: { - auto coefs = std::make_unique<circularsymmetric::VLACoefficients>(""); + case kMeerKATTelescope: { + auto coefs = std::make_unique<circularsymmetric::MeerKATCoefficients>(); telescope = std::make_unique<telescope::Dish>(ms, std::move(coefs), options); } break; @@ -83,6 +86,11 @@ std::unique_ptr<telescope::Telescope> Load(const casacore::MeasurementSet& ms, case kSkaMidTelescope: telescope = std::make_unique<telescope::SkaMid>(ms, options); break; + case kVLATelescope: { + auto coefs = std::make_unique<circularsymmetric::VLACoefficients>(""); + telescope = + std::make_unique<telescope::Dish>(ms, std::move(coefs), options); + } break; default: casacore::ScalarColumn<casacore::String> telescope_name_col( ms.observation(), "TELESCOPE_NAME"); diff --git a/cpp/load.h b/cpp/load.h index 35294e82..6f87dca4 100644 --- a/cpp/load.h +++ b/cpp/load.h @@ -21,6 +21,7 @@ enum TelescopeType { kATCATelescope, kGMRTTelescope, kLofarTelescope, + kMeerKATTelescope, kOSKARTelescope, kMWATelescope, kSkaMidTelescope, -- GitLab