UVBeam Class

UVBeam is the main user class for beam models. It provides import and export functionality to supported file formats and can be interacted with directly.

class pyuvdata.UVBeam[source]

A class for defining a radio telescope antenna beam.

UVParameter objects

For full list see UVBeam Parameters (http://pyuvdata.readthedocs.io/en/latest/uvbeam_parameters.html). Some are always required, some are required for certain beam_types, antenna_types and pixel_coordinate_systems and others are always optional.

check(run_check_acceptability=True)[source]

Check that all required parameters are set reasonably.

Check that required parameters exist and have appropriate shapes. Optionally check if the values are acceptable.

Parameters:run_check_acceptability – Option to check if values in required parameters are acceptable. Default is True.
read_beamfits(filename, run_check=True, run_check_acceptability=True)[source]

Read in data from a beamfits file.

Parameters:
  • filename – The beamfits file or list of files to read from.
  • run_check – Option to check for the existence and proper shapes of required parameters after reading in the file. Default is True.
  • run_check_acceptability – Option to check acceptable range of the values of required parameters after reading in the file. Default is True.
select(axis1_inds=None, axis2_inds=None, pixels=None, frequencies=None, freq_chans=None, feeds=None, polarizations=None, run_check=True, run_check_acceptability=True, inplace=True)[source]

Select specific image axis indices or pixels (if healpix), frequencies and feeds or polarizations (if power) to keep in the object while discarding others.

The history attribute on the object will be updated to identify the operations performed.

Parameters:
  • axis1_inds – The indices along the first image axis to keep in the object. Cannot be set if pixel_coordinate_system is “healpix”.
  • axis2_inds – The indices along the second image axis to keep in the object. Cannot be set if pixel_coordinate_system is “healpix”.
  • pixels – The healpix pixels to keep in the object. Cannot be set if pixel_coordinate_system is not “healpix”.
  • frequencies – The frequencies to keep in the object.
  • freq_chans – The frequency channel numbers to keep in the object.
  • feeds – The feeds to keep in the object. Cannot be set if the beam_type is “power”.
  • polarizations – The polarizations to keep in the object. Cannot be set if the beam_type is “efield”.
  • run_check – Option to check for the existence and proper shapes of required parameters after downselecting data on this object. Default is True.
  • run_check_acceptability – Option to check acceptable range of the values of required parameters after downselecting data on this object. Default is True.
  • inplace – Option to perform the select directly on self (True, default) or return a new UVBeam object, which is a subselection of self (False)
set_cs_params()[source]

Set various forms and required parameters depending on pixel_coordinate_system.

set_efield()[source]

Set beam_type to ‘efield’ and adjust required parameters.

set_phased_array()[source]

Set antenna_type to ‘phased_array’ and adjust required parameters.

set_power()[source]

Set beam_type to ‘power’ and adjust required parameters.

set_simple()[source]

Set antenna_type to ‘simple’ and adjust required parameters.

write_beamfits(filename, run_check=True, run_check_acceptability=True, clobber=False)[source]

Write the data to a beamfits file.

Parameters:
  • filename – The beamfits file to write to.
  • run_check – Option to check for the existence and proper shapes of required parameters before writing the file. Default is True.
  • run_check_acceptability – Option to check acceptable range of the values of required parameters before writing the file. Default is True.
  • clobber – Option to overwrite the filename if the file already exists. Default is False.