matvis.wrapper.simulate_vis¶
- matvis.wrapper.simulate_vis(ants, fluxes, ra, dec, freqs, lsts, beams, polarized=False, precision=1, latitude=-0.5361913261514378, use_feed='x', use_gpu: bool = False, beam_spline_opts: dict | None = None, beam_idx: ndarray | None = None, **backend_kwargs)[source]¶
Run a basic simulation using
matvis
.This wrapper handles the necessary coordinate conversions etc.
- Parameters:
ants (dict) – Dictionary of antenna positions. The keys are the antenna names (integers) and the values are the Cartesian x,y,z positions of the antennas (in meters) relative to the array center.
fluxes (array_like) – 2D array with the flux of each source as a function of frequency, of shape (NSRCS, NFREQS).
ra (array_like) – Arrays of source RA and Dec positions in radians. RA goes from [0, 2 pi] and Dec from [-pi, +pi].
dec (array_like) – Arrays of source RA and Dec positions in radians. RA goes from [0, 2 pi] and Dec from [-pi, +pi].
freqs (array_like) – Frequency channels for the simulation, in Hz.
lsts (array_like) – Local sidereal times for the simulation, in radians. Range is [0, 2 pi].
beams (list of
UVBeam
objects) – Beam objects to use for each antenna.pixel_beams (bool, optional) – If True, interpolate the beams onto a pixel grid. Otherwise, use the
UVBeam
interpolation method directly.beam_npix (int, optional) – If
pixel_beam == True
, sets the pixel grid resolution along each dimension (corresponds to then_pix_lm
parameter of the conversions.uvbeam_to_lm function).polarized (bool, optional) – If True, use polarized beams and calculate all available linearly- polarized visibilities, e.g. V_nn, V_ne, V_en, V_ee. Default: False (only uses the ‘ee’ polarization).
precision (int, optional) – Which precision setting to use for
matvis()
. If set to1
, uses the (np.float32
,np.complex64
) dtypes. If set to2
, uses the (np.float64
,np.complex128
) dtypes.latitude (float, optional) – The latitude of the center of the array, in radians. The default is the HERA latitude = -30.7215 * pi / 180.
beam_spline_opts (dict, optional) – Options to be passed to
pyuvdata.uvbeam.UVBeam.interp()
as spline_opts.
- Returns:
vis – Complex array of shape (NFREQS, NTIMES, NFEED, NFEED, NANTS, NANTS) if
polarized == True
, or (NFREQS, NTIMES, NANTS, NANTS) otherwise.- Return type:
array_like