Beam model modules

Beamformer

class arts_localisation.beam_models.beamformer.BeamFormer(dish_pos, freqs, ntab=12, lon=<Longitude 6.60894465 deg>, ref_pos=None, itrf=True)

Bases: object

ARTS tied-array beamformer simulation

Parameters:
  • dish_pos (array) – dish positions with shape (ndish, 3), with unit

  • freqs (array) – Observing frequencies (with unit)

  • ntab (int) – Number of TABs (Default: NTAB from constants)

  • lon (Quantity) – longitude of observatory (Default: WSRT)

  • ref_pos (Quantity) – Observatory reference position relative to dish_pos (Default: None)

  • itrf (bool) – Dish positions and ref position are ITRF coordinates (Default: True)

_get_uvw(ha, dec)

Convert sky coordinates to uvw

Parameters:
  • ha (Quantity) – hour angle

  • dec (Quantity) – declination

Returns:

array of uvw with shape (ndish, nfreq, 3)

static _itrf_to_xyz(dish_pos, lon, ref_pos=None)

Convert ITRF to local XYZ coordinates

Parameters:
  • dish_pos (array) – dish positions with shape (ndish, 3), with unit

  • lon (Quantity) – longitude of observatory (Default: WSRT)

  • ref_pos (Quantity) – Observatory reference position relative to dish_pos (Default: None)

Returns:

XYZ positions of dishes

static _phase_to_pbeam(phases)

Convert an array of phase offsets to a power beam

Parameters:

phases (array) – complex phase offsets

Returns:

power beam

beamform(tab=0)

Beamform a tied-array beam

Parameters:

tab (int) – tied-array beam index

Returns:

power beam

set_coordinates_and_phases(grid_ha, grid_dec, ha0, dec0)

Calculate the geometric phases at each point in the coordinate grid, given a phase centre

Parameters:
  • grid_ha (array) – hour angle grid

  • grid_dec (array) – declination grid

  • ha0 – hour angle of phase centre

  • dec0 – declination of phase centre

Compound Beam

class arts_localisation.beam_models.compound_beam.CompoundBeam(freqs, theta=<Quantity 0. deg>, phi=<Quantity 0. deg>, rot=<Quantity 0. deg>)

Bases: object

Generate a compound beam pattern :param freqs: observing frequencies :param theta: E-W offsets (default: 0) :param phi: N-S offsets (default: 0) :param rot: rotation applied to model (parallactic angle, default 0)

_airy()

Airy disk beam pattern

Returns:

beam pattern

_gaussian()

Gaussian beam pattern

Returns:

beam pattern

_real(cb, thresh=0.5)

Measured beam pattern

Parameters:
  • cb (int) – beam number

  • thresh (flaot) – max NaN fraction, reverts to default gaussian above this (Default: 0.5)

Returns:

beam pattern

beam_pattern(mode, cb=None)

Return beam pattern for given mode

Parameters:
  • mode (str) – gauss, airy, or real

  • cb (int) – beam number (only used for real beam)

Returns:

beam pattern

arts_localisation.beam_models.compound_beam.gauss_2d(xy, x_mean, x_sig, y_mean, y_sig, rho)

Construct a 2D Gaussian

Parameters:
  • xy (array) – 2xN array of x, y values

  • x_mean (float) – mean of x

  • x_sig (float) – sigma of x

  • y_mean (float) – mean of y

  • y_sig (float) – sigma of y

  • rho (float) – correlation between x and y

Returns:

An NxN array with the Gaussian distribution

Synthesised Beam Generator

class arts_localisation.beam_models.sb_generator.SBGenerator(fname=None, science_case=None)

Bases: object

Synthesised beam layout and generator

Parameters:
  • fname (str) – path to SB table

  • science_case – ARTS science case (3 or 4)

_load_table()

Load the SB table

classmethod from_science_case(science_case)

Initalize default table for given science cases

Parameters:

science_case (int) – science case (3 or 4)

Returns:

SBGenerator object

classmethod from_table(fname)

Initalize with provided SB table

Parameters:

fname (str) – Path to SB table

Returns:

SBGenerator object

get_map(sb)

Return mapping of requested SB

Parameters:

sb (int) – beam to return mapping for

Returns:

SB mapping for requested beam

property reversed

Whether or not the SB table is reversed for use on filterbank data

Returns:

reversed (bool)

synthesize_beam(data, sb)

Synthesise beam

Parameters:
  • data (array) – TAB data with shape [TAB, freq, others(s)]

  • sb (int) – SB index

Returns:

SB data with shape [freq, other(s)]

exception arts_localisation.beam_models.sb_generator.SBGeneratorException

Bases: Exception