aces.beamset.beammap

Defines the BeamMap class

Copyright (C) CSIRO 2017

Module Contents

Classes

BeamMap

BeamMap is a 2D ndarray representing an antenna/beam quantity as a function of direction.

class aces.beamset.beammap.BeamMap(x, y, data, maptype, flag, vector)[source]

Bases: object

BeamMap is a 2D ndarray representing an antenna/beam quantity as a function of direction. It isn’t sufficient to define the quantities stored. Most of the metadata defining the quantities is in the BeamSet class. BeamMap is more of a convenience class used to implement the BeamSet class. It doesn’t stand on it’s own. (?)

is_one_dim()[source]
get_data()[source]
get_contour(level)[source]

Calculate contour of 2D data at given level, in this class it’s used only to put a mark at the estimated centre of the beam, but has general use, for example in fitting and parameter estimation.

Parameters:

level – level at which to calculate contour

Returns:

list of contour segments [(segs, closed)]

normalise()[source]

Normalise the data array: divide the whole array by the maximum of its absolute value.

mask_below(level)[source]

Convert the map data to a masked array, and mask all values below the given level.

static _seg_closed(seg)[source]

Determines if a contour segment is a closed loop :return: Boolean, True if contour segment is closed

plot(log=False, title=False, xlabels=False, ylabels=False, bar=False, cmap=None, **kwargs)[source]

Plot a BeamMap :param log: bool, plot on a dB scale (only used if BeamMap type is power) :param title: str, plot title :param bool xlabels: plot x axis labels if true :param bool ylabels: plot y axis labels if true :param bar: bool, plot colorbar if true :param cmap: str, matplotlib colormap [rainbow] :param kwargs: ‘vmin’, ‘vmax’ allow default data limits to be overriden

is_equiv(other)[source]

Check equivalence of grid and maptype of self and other map object

multiply(other)[source]

Create and return a new map object which is the product of self and other TBD: modify the vector of the returned map in some consistent way. Perhaps need extension of the vector or the BeamMap class.

divide(other)[source]

Create and return a new map object which is the quotient : self / other TBD: modify the vector of the returned map in some consistent way. Perhaps need extension of the vector or the BeamMap class.

add(other)[source]

Create and return a new map object which is the sum of self and other TBD: modify the vector of the returned map in some consistent way. Perhaps need extension of the vector or the BeamMap class.

subtract(other)[source]

Create and return a new map object which is the difference of self and other TBD: modify the vector of the returned map in some consistent way. Perhaps need extension of the vector or the BeamMap class.