generate_noise#

pyvisgen.simulation.generate_noise(shape: tuple, obs, noise_value: float, mode: str = 'sefd', el1_deg: Tensor | None = None, el2_deg: Tensor | None = None, telescope: str = 'meerkat', band: str | None = None) tuple[Tensor, Tensor][source]#

Generate complex Gaussian visibility noise and natural weights.

Parameters:
shapetuple

Shape of the visibility array (n_baselines, n_channels, …).

obsObservation

Observation object.

noise_valuefloat

SEFD in Jy when mode='sefd', or T_sys/η in K when mode='tsys'.

modestr

'sefd': uniform SEFD noise, no elevation dependence (backward compatible). 'tsys': elevation-dependent noise derived from system temperature.

el1_deg, el2_degtorch.Tensor, optional

Per-baseline elevation in degrees. Required when mode='tsys'.

telescopestr

Telescope name for elevation-dependent corrections. Must match a file in the noise_configs resource directory. Only used for mode='tsys'.

bandstr, optional

Frequency band name defined in the telescope config. Defaults to the first band in the config file. Only used for mode='tsys'.

Returns:
noisetorch.Tensor

Complex noise array of the given shape.

weightstorch.Tensor

Natural weights (1/σ²) of shape (n_baselines, n_channels).