diff --git a/CMakeLists.txt b/CMakeLists.txt index 89114c6f399945f0c97f75ab2d61d73ad1477ea2..dab55fea8052ec17040fb8b297e3384f1668d172 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 c840a0a28f298144d94b313054e0f4423f94902a..8a61e5b43f8b1b6d5a4ab7db0ce26607099eccb8 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 3174a49b5e4bcf71126c1facadf85cc79e37e95f..0499c733d788aeb8b4608bc6656e7add0a55414b 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 db38a6e4316795e5ee69caab18497d27a67e9e7b..894a2fa8424fcc0a507ee0b140682338b713e601 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 0000000000000000000000000000000000000000..e8d31deac8d0122ef8d77f8b5c64808200d18dfd --- /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 0000000000000000000000000000000000000000..17ecc353d08fcca7fa56f60f8f061a01db20571c --- /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 b0629c3f275b75345e898a7c31fd8f91c87f8367..b2e22cb45e18d3dd30b7f4d96eb0cf507c47beb8 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 35294e827fc8827277add734d079053a5c995718..6f87dca4cf43cbe6025de3ce19d6a5b38051017b 100644 --- a/cpp/load.h +++ b/cpp/load.h @@ -21,6 +21,7 @@ enum TelescopeType { kATCATelescope, kGMRTTelescope, kLofarTelescope, + kMeerKATTelescope, kOSKARTelescope, kMWATelescope, kSkaMidTelescope,