py21cmsense.observatory.Observatory

class py21cmsense.observatory.Observatory(*, antpos, beam, latitude=0, Trcv)[source]

A class defining an interferometric Observatory and its properties.

Parameters
  • antpos (array) – An array with shape (Nants, 3) specifying the positions of the antennas. These should be in the ENU (East-North-Up) frame, relative to a central location given by latitude. If not a Quantity, units are assumed to be meters.

  • beam (PrimaryBeam instance) – A beam, assumed to be homogeneous across antennas.

  • latitude (float or Quantity, optional) – Latitude of the array center. If a float, assumed to be in radians. Note that longitude is not required, as we assume an isotropic sky.

  • Trcv (float or Quantity) – Receiver temperature, assumed to be in mK unless otherwise defined.

Methods

__init__(self, \*, antpos, beam[, latitude])

Initialize self.

beamgridder(xcen, ycen, uvgrid, n)

A function for updating a uvgrid with a baseline group

clone(self, \*\*kwargs)

Return a clone of this instance, but change kwargs

from_uvdata(uvdata, beam)

Instantiate an Observatory from a pyuvdata.UVData object or compatible file

from_yaml(yaml_file)

Instantiate an Observatory from a compatible YAML config file.

get_redundant_baselines(self[, bl_min, …])

Determine all baseline groups.

grid_baselines(self, integration_time[, …])

Grid baselines onto a pre-determined uvgrid, accounting for earth rotation.

grid_baselines_coherent(self, \*\*kwargs)

Produce a UV grid of gridded baselines, where different baseline groups are averaged coherently if they fall into the same UV bin.

grid_baselines_incoherent(self, \*\*kwargs)

Produce a UV grid of gridded baselines, where different baseline groups are averaged incoherently if they fall into the same UV bin.

longest_used_baseline(self[, bl_max])

Determine the maximum baseline length kept in the array

projected_baselines(self[, time_offset])

The projected baseline lengths (in wavelengths) phased to a point that has rotated off zenith by some time_offset.

time_offsets_from_obs_int_time(self, …[, …])

Compute a list of time offsets within an LST-bin (i.e.

ugrid(self[, bl_max])

Generate a uv grid out to the maximum used baseline smaller than the given bl_max.

Attributes

baseline_lengths

Lengths of baselines in units of wavelengths, shape (Nant, Nant)

baselines_metres

The raw baseline distances in metres for every pair of antennas (shape (Nant, Nant, 3)).

frequency

Central frequency of the observation

longest_baseline

Longest baseline in units of wavelengths

metres_to_wavelengths

Conversion factor for converting a quantity in m to wavelengths at the fiducial frequency of the observation

n_antennas

Number of antennas in the array

observation_duration

The time it takes for the sky to drift through the FWHM

shortest_baseline

Shortest baseline in units of wavelengths