everybeam::griddedresponse

namespace griddedresponse
class AartfaacGrid : public PhasedArrayGrid
#include <aartfaacgrid.h>

Class for computing the AARTFAAC beam responses on a user specified grid. Class exploits the fact that the station response is identical for all stations within an AARTFAAC observation.

Public Functions

inline AartfaacGrid(const telescope::Telescope *telescope_ptr, const aocommon::CoordinateSystem &coordinate_system)

Construct a new AartfaacGrid object.

Parameters:
  • telescope_ptr – Pointer to telescope::LOFAR object

  • coordinate_system – CoordinateSystem struct

virtual void ResponseAllStations(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t field_id) override

Compute the array factor for all stations in a Telescope. Result is stored in the output buffer, which should accommodate a Jones matrix (4 complex valued floats) per pixel for each station.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize()

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

class AiryGrid : public GriddedResponse
#include <airygrid.h>

Class for computing the gridded response of (possibly heterogenous) telescopes with an Airy disk response, e.g. ALMA.

Public Functions

inline AiryGrid(const telescope::Telescope *telescope_ptr, const aocommon::CoordinateSystem coordinate_system, std::vector<common::AiryParameters> airy_parameters, std::vector<std::pair<double, double>> directions, bool is_homogeneous)
virtual void Response(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t station_idx, size_t field_id) override

Compute the beam for a single station, given a prescribed beam mode. Result is stored in the output buffer, which should allow storing Jones matrices (4 complex floats per pixel).

Parameters:
  • beam_mode – Selects beam mode (BeamMode::kElement, BeamMode::kArrayFactor or BeamMode::kFull)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize(1)

  • station_idx – Station index, must be smaller than number of stations in the Telescope

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

virtual void ResponseAllStations(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t field_id) override

Compute the array factor for all stations in a Telescope. Result is stored in the output buffer, which should accommodate a Jones matrix (4 complex valued floats) per pixel for each station.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize()

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

inline virtual void IntegratedCorrection(BeamMode beam_mode, float *buffer, const std::vector<double> &time_array, double frequency, size_t field_id, size_t undersampling_factor, const std::vector<double> &baseline_weights, bool square_mueller) override

Calculate a grid of baseline-integrated linear or squared beam Mueller matrix correction over multiple time steps. This function makes use of MakeIntegratedSnapshot(). Subclasses may override MakeIntegratedSnapshot() to implement a more efficient version. This function stores all Mueller matrices for the full size image in memory. If this is undesirable, the functions UndersampledIntegratedCorrection() and UpsampleCorrection() may be used.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Buffer for storing the result, should have size width * height * 16

  • time_array – Vector with probing times, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

  • field_id – Field id

  • undersampling_factor – Undersampling factor

  • baseline_weights – Baseline weights, size should equal (Telescope::GetNrStations() * (Telescope::GetNrStations() + 1)/2) * time_array.size()

inline virtual bool PerformUndersampling() const override

Allow undersampled calculation of the beam grid? If true, the beam will be calculated on a smaller grid and FFT resampled to a larger grid. This is important for arrays that produce large images and for which the beam calculations are expensive, such as MWA, LOFAR and SKA. On the other hand, beams that are fast to calculate and might have sharp cut-offs, should not be undersampled.

class DishGrid : public GriddedResponse
#include <dishgrid.h>

Class for computing the gridded response of homogeneous dish telescopes, e.g. VLA, ATCA, GMRT, MeerKAT, SKA-MID.

Subclassed by SkaMidGrid

Public Functions

inline DishGrid(const telescope::Telescope *telescope_ptr, const aocommon::CoordinateSystem coordinate_system)
virtual void Response(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t station_idx, size_t field_id) override

Compute the beam for a single station, given a prescribed beam mode. Result is stored in the output buffer, which should allow storing Jones matrices (4 complex floats per pixel).

Parameters:
  • beam_mode – Selects beam mode (BeamMode::kElement, BeamMode::kArrayFactor or BeamMode::kFull)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize(1)

  • station_idx – Station index, must be smaller than number of stations in the Telescope

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

inline virtual void ResponseAllStations(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t field_id) final override

Compute the array factor for all stations in a Telescope. Result is stored in the output buffer, which should accommodate a Jones matrix (4 complex valued floats) per pixel for each station.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize()

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

virtual void IntegratedCorrection(BeamMode beam_mode, float *buffer, double time, double frequency, size_t field_id, size_t undersampling_factor, const std::vector<double> &baseline_weights, bool square_mueller) final override

Calculate a grid of baseline-integrated (undersampled) linear or squared beam correction Mueller matrix for a single time step. This function makes use of MakeIntegratedSnapshot(). Subclasses may override MakeIntegratedSnapshot() to implement a more efficient version.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Buffer for storing the result, should have size width * height * 16

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

  • field_id – Field id

  • undersampling_factor – Undersampling factor

  • baseline_weights – Baseline weights, size should equal Telescope::GetNrStations() * (Telescope::GetNrStations() + 1)/2

inline virtual void IntegratedCorrection(BeamMode beam_mode, float *buffer, const std::vector<double> &time_array, double frequency, size_t field_id, size_t undersampling_factor, const std::vector<double> &baseline_weights, bool square_mueller) final override

Calculate a grid of baseline-integrated linear or squared beam Mueller matrix correction over multiple time steps. This function makes use of MakeIntegratedSnapshot(). Subclasses may override MakeIntegratedSnapshot() to implement a more efficient version. This function stores all Mueller matrices for the full size image in memory. If this is undesirable, the functions UndersampledIntegratedCorrection() and UpsampleCorrection() may be used.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Buffer for storing the result, should have size width * height * 16

  • time_array – Vector with probing times, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

  • field_id – Field id

  • undersampling_factor – Undersampling factor

  • baseline_weights – Baseline weights, size should equal (Telescope::GetNrStations() * (Telescope::GetNrStations() + 1)/2) * time_array.size()

inline virtual bool PerformUndersampling() const final override

Allow undersampled calculation of the beam grid? If true, the beam will be calculated on a smaller grid and FFT resampled to a larger grid. This is important for arrays that produce large images and for which the beam calculations are expensive, such as MWA, LOFAR and SKA. On the other hand, beams that are fast to calculate and might have sharp cut-offs, should not be undersampled.

class GriddedResponse
#include <griddedresponse.h>

Virtual base class to compute the gridded response.

Subclassed by AiryGrid, DishGrid, MWAGrid, PhasedArrayGrid

Public Functions

virtual ~GriddedResponse() = default
virtual void Response(BeamMode beam_mode, std::complex<float> *destination, double time, double freq, size_t station_idx, size_t field_id) = 0

Compute the beam for a single station, given a prescribed beam mode. Result is stored in the output buffer, which should allow storing Jones matrices (4 complex floats per pixel).

Parameters:
  • beam_mode – Selects beam mode (BeamMode::kElement, BeamMode::kArrayFactor or BeamMode::kFull)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize(1)

  • station_idx – Station index, must be smaller than number of stations in the Telescope

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

virtual void ResponseAllStations(BeamMode beam_mode, std::complex<float> *destination, double time, double frequency, size_t field_id) = 0

Compute the array factor for all stations in a Telescope. Result is stored in the output buffer, which should accommodate a Jones matrix (4 complex valued floats) per pixel for each station.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize()

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

virtual void IntegratedCorrection(BeamMode beam_mode, float *destination, double time, double frequency, size_t field_id, size_t undersampling_factor, const std::vector<double> &baseline_weights, bool square_mueller)

Calculate a grid of baseline-integrated (undersampled) linear or squared beam correction Mueller matrix for a single time step. This function makes use of MakeIntegratedSnapshot(). Subclasses may override MakeIntegratedSnapshot() to implement a more efficient version.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Buffer for storing the result, should have size width * height * 16

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

  • field_id – Field id

  • undersampling_factor – Undersampling factor

  • baseline_weights – Baseline weights, size should equal Telescope::GetNrStations() * (Telescope::GetNrStations() + 1)/2

virtual void IntegratedCorrection(BeamMode beam_mode, float *destination, const std::vector<double> &time_array, double frequency, size_t field_id, size_t undersampling_factor, const std::vector<double> &baseline_weights, bool square_mueller)

Calculate a grid of baseline-integrated linear or squared beam Mueller matrix correction over multiple time steps. This function makes use of MakeIntegratedSnapshot(). Subclasses may override MakeIntegratedSnapshot() to implement a more efficient version. This function stores all Mueller matrices for the full size image in memory. If this is undesirable, the functions UndersampledIntegratedCorrection() and UpsampleCorrection() may be used.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Buffer for storing the result, should have size width * height * 16

  • time_array – Vector with probing times, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

  • field_id – Field id

  • undersampling_factor – Undersampling factor

  • baseline_weights – Baseline weights, size should equal (Telescope::GetNrStations() * (Telescope::GetNrStations() + 1)/2) * time_array.size()

virtual std::vector<aocommon::HMC4x4> UndersampledIntegratedCorrection(BeamMode beam_mode, const std::vector<double> &time_array, double frequency, size_t field_id, size_t undersampling_factor, const std::vector<double> &baseline_weights, bool square_mueller)

Same as IntegratedCorrection(), but without performing the upsampling. This function therefore returns the undersampled data. Function UpsampleCorrection() can be used to upsample the returned data. This route is useful for big images, for which it is undesirable to hold all 16 elements of the Mueller matrix in memory at the same time.

Returns:

The undersampled data, input to UpsampleCorrection().

inline std::size_t GetStationBufferSize(std::size_t nstations) const
inline std::size_t GetIntegratedBufferSize() const
inline virtual bool PerformUndersampling() const

Allow undersampled calculation of the beam grid? If true, the beam will be calculated on a smaller grid and FFT resampled to a larger grid. This is important for arrays that produce large images and for which the beam calculations are expensive, such as MWA, LOFAR and SKA. On the other hand, beams that are fast to calculate and might have sharp cut-offs, should not be undersampled.

Public Static Functions

static void UpsampleCorrection(float *destination, size_t element_index, size_t width, size_t height, const std::vector<aocommon::HMC4x4> &undersampled_beam, size_t undersampling_factor)

Upsample a grid with a single element from an undersampled response.

Parameters:
  • destination – Result buffer for one Mueller matrix element for a grid of size Width() x Height().

  • element_index – Value from 0 to 15 indicating which Mueller matrix to upsample.

  • undersampled_beam – The previously calculated undersampled response

  • undersampling_factor – Undersampling factor that was used in the response calculation call.

class MWAGrid : public GriddedResponse
#include <mwagrid.h>

Public Functions

inline MWAGrid(const telescope::Telescope *telescope_ptr, const aocommon::CoordinateSystem coordinate_system)
virtual void Response(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t station_idx, size_t field_id) override

Compute the beam for a single station, given a prescribed beam mode. Result is stored in the output buffer, which should allow storing Jones matrices (4 complex floats per pixel).

Parameters:
  • beam_mode – Selects beam mode (BeamMode::kElement, BeamMode::kArrayFactor or BeamMode::kFull)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize(1)

  • station_idx – Station index, must be smaller than number of stations in the Telescope

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

inline virtual void ResponseAllStations(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t field_id) override

Compute the array factor for all stations in a Telescope. Result is stored in the output buffer, which should accommodate a Jones matrix (4 complex valued floats) per pixel for each station.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize()

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

class PhasedArrayGrid : public GriddedResponse, protected PhasedArrayResponse
#include <phasedarraygrid.h>

Subclassed by AartfaacGrid

Public Functions

PhasedArrayGrid(const telescope::Telescope *telescope_ptr, const aocommon::CoordinateSystem &coordinate_system)
virtual void Response(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t station_idx, size_t field_id) final override

Compute the beam for a single station, given a prescribed beam mode. Result is stored in the output buffer, which should allow storing Jones matrices (4 complex floats per pixel).

Parameters:
  • beam_mode – Selects beam mode (BeamMode::kElement, BeamMode::kArrayFactor or BeamMode::kFull)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize(1)

  • station_idx – Station index, must be smaller than number of stations in the Telescope

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

virtual void ResponseAllStations(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t field_id) override

Compute the array factor for all stations in a Telescope. Result is stored in the output buffer, which should accommodate a Jones matrix (4 complex valued floats) per pixel for each station.

Parameters:
  • beam_mode – Selects beam mode (element, array factor or full)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize()

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)

class SkaMidGrid : public DishGrid
#include <skamidgrid.h>

Public Functions

SkaMidGrid(const telescope::Telescope *telescope_ptr, const aocommon::CoordinateSystem coordinate_system, ElementResponseModel element_response_model)
virtual void Response(BeamMode beam_mode, std::complex<float> *buffer, double time, double frequency, size_t station_idx, size_t field_id) override

Compute the beam for a single station, given a prescribed beam mode. Result is stored in the output buffer, which should allow storing Jones matrices (4 complex floats per pixel).

Parameters:
  • beam_mode – Selects beam mode (BeamMode::kElement, BeamMode::kArrayFactor or BeamMode::kFull)

  • destination – Output buffer, compute and set size with GriddedResponse::GetStationBufferSize(1)

  • station_idx – Station index, must be smaller than number of stations in the Telescope

  • time – Time, modified Julian date, UTC, in seconds (MJD(UTC), s).

  • frequency – Frequency (Hz)