py21cmsense.observation.Observation

class py21cmsense.observation.Observation(*, observatory: ~py21cmsense.observatory.Observatory, time_per_day: ~astropy.units.quantity.Quantity = <Quantity 6. h>, track: ~astropy.units.quantity.Quantity | None = None, lst_bin_size: ~astropy.units.quantity.Quantity = NOTHING, integration_time: ~astropy.units.quantity.Quantity = <Quantity 60. s>, n_channels=82, bandwidth: ~astropy.units.quantity.Quantity = <Quantity 8. MHz>, n_days=180, baseline_filters=(), redundancy_tol=1, coherent=True, spectral_index=2.6, tsky_amplitude: ~astropy.units.quantity.Quantity = <Quantity 260000. mK>, tsky_ref_freq: ~astropy.units.quantity.Quantity = <Quantity 150. MHz>, use_approximate_cosmo=False, cosmo=FlatLambdaCDM(name="Planck15", H0=67.74 km / (Mpc s), Om0=0.3075, Tcmb0=2.7255 K, Neff=3.046, m_nu=[0.   0.   0.06] eV, Ob0=0.0486))[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 obs_duration 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. The total observing time is n_days*hours_per_day. Default is 6. 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 obs_duration, and is provided only for ease of use for those familiar with 21cmSense v1.

  • obs_duration (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.

  • n_channels (int, optional) – Number of channels used in the observation. Defaults to 82, which is equivalent to 1024 channels over 100 MHz of bandwidth. Sets maximum k_parallel that can be probed, but little to no overall effect on sensitivity.

  • bandwidth (float or Quantity, optional) – The bandwidth used for the observation, assumed to be in MHz. Note this is not the total instrument bandwidth, but the redshift range that can be considered co-eval.

  • n_days (int, optional) – The number of days observed (for the same set of LSTs). The default is 180, 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.

  • baseline_filters (tuple[Callable[[astropy.units.quantity.Quantity], bool]]) – 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.

Methods

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

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_group_coords

Co-ordinates of baseline groups in metres.

baseline_group_counts

The number of baselines in each group.

baseline_group_lengths

The displacement magnitude of the baseline groups.

baseline_groups

A dictionary of redundant baseline groups.

beam_crossing_time

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

bl_max

Shortest included baseline.

bl_min

Shortest included baseline.

eta

The fourier dual of the frequencies of the observation.

frequency

Frequency of the observation.

kparallel

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

n_lst_bins

Number of LST bins in the complete observation.

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.

observatory

time_per_day

track

lst_bin_size

integration_time

n_channels

bandwidth

n_days

baseline_filters

redundancy_tol

coherent

spectral_index

tsky_amplitude

tsky_ref_freq

use_approximate_cosmo

cosmo