vis_loop#
- pyvisgen.simulation.visibility.vis_loop(obs, SI: torch.Tensor, num_threads: int = 10, noise_level: float = 0, noise_mode: str = 'sefd', telescope: str = 'meerkat', band: str | None = None, mode: str = 'full', batch_size: int | Literal['auto'] = 'auto', show_progress: bool = False, normalize: bool = True, ft: Literal['default', 'finufft', 'reversed'] = 'default') Visibilities[source]#
Computes the visibilities of an observation.
- Parameters:
- obsObservation class object
Observation class object generated by the ~pyvisgen.simulation.Observation class.
- SItorch.tensor
Tensor containing the sky intensity distribution.
- num_threadsint, optional
Number of threads used for intraoperative parallelism on the CPU. See ~torch.set_num_threads. Default: 10
- noise_levelfloat, optional
Noise amplitude: SEFD in Jy when
noise_mode='sefd', or T_sys/η in K whennoise_mode='tsys'. Set to 0 to disable noise. Default: 0- noise_modestr, optional
'sefd': uniform SEFD noise (backward compatible, no elevation dependence).'tsys': elevation-dependent noise from system temperature. Default:'sefd'- telescopestr, optional
Telescope name for elevation-dependent Tsys corrections. Only used when
noise_mode='tsys'. Default:'meerkat'- modestr, optional
Select one of ‘full’, ‘grid’, or ‘dense’ to get all valid baselines, a grid of unique baselines, or dense baselines. Default: ‘full’
- batch_sizeint, optional
Batch size for iteration over baselines. Default: 100
- polarizationstr, optional
Choose between ‘linear’ or ‘circular’ or None to simulate different types of polarizations or disable the simulation of polarization. Default: ‘linear’
- random_stateint, optional
Random state used when drawing amp_ratio and during the generation of the random polarization field. Default: 42
- show_progressbool, optional
If True, show a progress bar during the iteration over the batches of baselines. Default: False
- normalizebool, optional
If
True, normalize stokes matrixBby a factor 0.5. Default:True- ftstr, optional
Sets the type of fourier transform used in the RIME. Choose one of
'default','finufft'(Flatiron Institute Nonuniform Fast Fourier Transform) or ‘reversed’. Default:'default'
- Returns:
- visibilitiesVisibilities
Dataclass object containing visibilities and baselines.