matvis.cpu.simulate

matvis.cpu.simulate(*, antpos: ndarray, freq: float, eq2tops: ndarray, crd_eq: ndarray, I_sky: ndarray, beam_list: Sequence[UVBeam | Callable] | None, precision: int = 1, polarized: bool = False, beam_idx: ndarray | None = None, beam_spline_opts: dict | None = None, max_progress_reports: int = 100)[source]

Calculate visibility from an input intensity map and beam model.

Parameters:
  • antpos (array_like) – Antenna position array. Shape=(NANT, 3).

  • freq (float) – Frequency to evaluate the visibilities at [GHz].

  • eq2tops (array_like) – Set of 3x3 transformation matrices to rotate the RA and Dec cosines in an ECI coordinate system (see crd_eq) to topocentric ENU (East-North-Up) unit vectors at each time/LST/hour angle in the dataset. Shape=(NTIMES, 3, 3).

  • crd_eq (array_like) – Cartesian unit vectors of sources in an ECI (Earth Centered Inertial) system, which has the Earth’s center of mass at the origin, and is fixed with respect to the distant stars. The components of the ECI vector for each source are: (cos(RA) cos(Dec), sin(RA) cos(Dec), sin(Dec)). Shape=(3, NSRCS).

  • I_sky (array_like) – Intensity distribution of sources/pixels on the sky, assuming intensity (Stokes I) only. The Stokes I intensity will be split equally between the two linear polarization channels, resulting in a factor of 0.5 from the value inputted here. This is done even if only one polarization channel is simulated. Shape=(NSRCS,).

  • beam_list (list of UVBeam, optional) – If specified, evaluate primary beam values directly using UVBeam objects instead of using pixelized beam maps. Only one of bm_cube and beam_list should be provided.Note that if polarized is True, these beams must be efield beams, and conversely if polarized is False they must be power beams with a single polarization (either XX or YY).

  • precision (int, optional) – Which precision level to use for floats and complex numbers. Allowed values: - 1: float32, complex64 - 2: float64, complex128

  • polarized (bool, optional) – Whether to simulate a full polarized response in terms of nn, ne, en, ee visibilities. See Eq. 6 of Kohn+ (arXiv:1802.04151) for notation. Default: False.

  • beam_idx – Optional length-NANT array specifying a beam index for each antenna. By default, either a single beam is assumed to apply to all antennas or each antenna gets its own beam.

  • beam_spline_opts (dict, optional) – Dictionary of options to pass to the beam interpolation function.

  • max_progress_reports (int, optional) – Maximum number of progress reports to print to the screen (if logging level allows). Default is 100.

Returns:

vis – Simulated visibilities. If polarized = True, the output will have shape (NTIMES, NFEED, NFEED, NANTS, NANTS), otherwise it will have shape (NTIMES, NANTS, NANTS).

Return type:

array_like