py21cmsense.observation.Observation

class py21cmsense.observation.Observation(*, observatory: Observatory, frequency: Quantity, PhysicalType('frequency')]=<Quantity 150. MHz>, time_per_day: Quantity, PhysicalType('time')]=NOTHING, track: Quantity, PhysicalType('time')] | None=None, lst_bin_size: Quantity, PhysicalType('time')]=NOTHING, integration_time: Quantity, PhysicalType('time')]=<Quantity 60. s>, bandwidth: Quantity, PhysicalType('frequency')]=<Quantity 8. MHz>, channel_bandwidth: Quantity, PhysicalType('frequency')] | None=None, n_channels=NOTHING, n_days=NOTHING, coherent=True, spectral_index=2.6, tsky_amplitude: Quantity, PhysicalType('temperature')]=<Quantity 260000. mK>, tsky_ref_freq: Quantity, PhysicalType('frequency')]=<Quantity 150. MHz>, use_approximate_cosmo=False, cosmo: Any = FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486), phase_center_dec=NOTHING, max_chunk_mem_gb=1.0)[source]

A class defining an interferometric Observation.

Note that to achieve the same behaviour as the original 21cmSense’s --track option (i.e. track-scan instead of drift-scan) merely requires setting lst_bin_size to the length of the tracked scan.

Parameters:
  • observatory (Observatory) – An object defining attributes of the observatory itself (its location etc.)

  • hours_per_day (float or Quantity, optional) – The number of good observing hours per day. This corresponds to the size of a low-foreground region in right ascension for a drift scanning instrument on the Earth. The total observing time is n_days*hours_per_day where a day is 24 hours on the Earth and 655.2 hours on the moon. Default is 6 (163.8 on moon). If simulating a tracked scan, hours_per_day should be a multiple of the length of the track (i.e. for two three-hour tracks per day, hours_per_day should be 6).

  • track (astropy.units.quantity.Quantity | None) – Tracked scan observation duration. This is an alias for lst_bin_size, and is provided only for ease of use for those familiar with 21cmSense v1.

  • lst_bin_size (float or Quantity, optional) – The time assigned to a single LST bin, by default the time it takes for a source to travel through the beam’s FWHM. If a float, assumed to be in minutes.

  • integration_time (float or Quantity, optional) – The amount of time integrated into a single visibility, by default a minute. If a float, assumed to be in seconds.

  • bandwidth (Quantity, optional) – The bandwidth used for the observation; must be an astropy Quantity with frequency units. Note this is not the total instrument bandwidth, but the redshift range that can be considered coeval.

  • channel_bandwidth (Quantity, optional) – The bandwidth of a single frequency channel; must be an astropy Quantity with frequency units. If provided, overrides n_channels (which is computed as bandwidth / channel_bandwidth). Not set by default. If both channel_bandwidth and n_channels are explicitly provided, n_channels takes precedence.

  • n_channels (int, optional) – Number of channels across the coeval bandwidth (see bandwidth parameter). Defaults to 82, to match the HERA 97 kHz channel width across 8 MHz. Sets maximum k_parallel that can be probed, but little to no overall effect on sensitivity. Overridden by channel_bandwidth if that parameter is provided.

  • n_days (int, optional) – The number of days observed (for the same set of LSTs). The default is 180 (6 on moon), which is the maximum a particular R.A. can be observed in one year if one only observes at night. The total observing time is n_days*hours_per_day where a day is 24 hours on the Earth and 655.2 hours on the moon.

  • baseline_filters – A function that takes a single value: a length-3 array of baseline co-ordinates, and returns a bool indicating whether to include the baseline. Built-in filters are provided in the baseline_filters module.

  • redundancy_tol (int, optional) – The number of decimal places to which baseline vectors must match (in all dimensions) to be considered redundant.

  • coherent (bool, optional) – Whether to add different baselines coherently if they are not instantaneously redundant.

  • spectral_index (float, optional) – The spectral index of the foreground model. The foreground model is approximated as a spatially-independent power-law, and used only for generating sky noise temperature. The default is 2.6, based on Mozdzen et al. 2017: 2017MNRAS.464.4995M, figure 8, with Galaxy down (see also tsky_amplitude and tsky_ref_freq).

  • tsky_amplitude (float or Quantity, optional) – The temperature of foregrounds at tsky_ref_freq. See spectral_index. Default assumed to be in mK.

  • tsky_ref_freq (float or Quantity) – Frequency at which the foreground model is equal to tsky_amplitude. See spectral_index. Default assumed to be in MHz.

  • use_approximate_cosmo (bool) – Whether to use approximate cosmological conversion factors. Doing so will give the same results as the original 21cmSense code, but non-approximate versions that use astropy are preferred.

  • cosmo (LambdaCDM) – An astropy cosmology object to use.

  • phase_center_dec – The declination of the phase center (typically used for a tracked scan observation). By default, this is set to the latitude of the observatory (i.e. the phase-center passes through zenith, like a typical drift-scan observation).

Methods

__init__(*, observatory, frequency, ...[, ...])

Method generated by attrs for class Observation.

clone(**kwargs)

Create a clone of this instance, with arbitrary changes to parameters.

from_yaml(yaml_file)

Construct an Observation from a YAML file.

Attributes

Trcv

Receiver temperature.

Trms

Effective radiometric noise temperature per UV bin.

Tsky

Temperature of the sky at the default frequency.

Tsys

System temperature (i.e. Tsky + Trcv).

baseline_groups

The baseline groups for this observation, defined by the observatory.

beam_crossing_time

The time it takes for a source to cross the beam.

eta

The fourier dual of the frequencies of the observation.

kparallel

1D array of kpar values, defined by the bandwidth and number of channels.

metres_to_wavelengths

Conversion factor for metres to wavelengths at fiducial frequency.

n_lst_bins

Number of LST bins in the complete observation.

observation_duration

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

redshift

Central redshift of the observation.

total_integration_time

The total (effective) integration time over UV bins for a particular LST bin.

ugrid

Centres of the linear grid which defines a side of the UV grid.

ugrid_edges

Edges of the linear grid which defines a side of the UV grid.

uv_coverage

A 2D array specifying the effective number of baselines in a grid of UV.

vgrid

Centres of the linear grid which defines a side of the UV grid.

vgrid_edges

Edges of the linear grid which defines a side of the UV grid.

observatory

frequency

time_per_day

track

lst_bin_size

integration_time

bandwidth

channel_bandwidth

n_channels

n_days

coherent

spectral_index

tsky_amplitude

tsky_ref_freq

use_approximate_cosmo

cosmo

max_chunk_mem_gb