Change Log#

Pyvisgen 0.7.0 (2025-12-10)#

API Changes#

Bug Fixes#

  • Changed indexing of UV and RD grid calculations using torch.meshgrid to xy instead of ij. This avoids confusion between x and y systems and row and column systems and fixes the long-standing issue of inverted and rotated visbilities. [#103]

  • Fixed a bug which raised an AttributeError when using a tensor() in an SkyCoord object [#110]

New Features#

  • Enhanced dropping of station_name column in src/pyvisgen/layouts/layout.py

  • Reworked scan calculation using Scan dataclass, which stores start time, end time, integration time and seperation for each scan. This allows the usage of arrays as scan_seperation, scan_duration and integration_time. That way it is now possible to replicate the (u,v) space calculation of a real measurement.

  • Enhanced docstrings for Observation class by adding units to the physical quantities. [#94]

  • Added cufinufft backend for faster visibility calculations [#101]

  • Removed gridding methods and replace it with [pyvisgrid](radionets-project/pyvisgrid)

  • Added pyvisgrid as dependency

  • Moved the dataset creation, utility methods and scripts to the new pyvisgen.dataset module.

  • Fixed typo sensitivty_cut for dataset config [#105]

  • Added plugin support to pyvisgen, allowing external gridder plugins to be used inside the simulation loop [#108]

  • Added new config system based on pydantic

  • Added contextmanager-based file writing to pyvisgen.dataset.dataset [#117]

  • Added PTWriter class for saving data in PyTorch (.pt) format [#118]

  • Added optional CodeCarbon tracker to pyvisgen [#119]

  • Added a WebDataset writer to the available data writers of pyvisgen [#122]

  • Added new main CLI tool merging the old pyvisgen-simulate and pyvisgen-quickstart commands into one tool that can be accessed through the new pyvisgen command (see $ pyvisgen --help). [#123]

  • Added Fourier transform option to configuration system, that allows changing the Fourier transform for the simulation [#127]

Maintenance#

  • Changed default symmetry overlap to 5 px in pyvisgen.dataset.utils.save_fft_pair() [#106, #107]

  • Removed pyvisgen.dataset.utils.save_fft_pair() and pyvisgen.dataset.utils.test_shapes() as they are now part of the DataWriter abstract base class

  • Removed Python 3.10 support [#117]

Refactoring and Optimization#

Pyvisgen 0.5.0 (2025-08-19)#

API Changes#

Bug Fixes#

New Features#

Maintenance#

  • Replaced all uses of tqdm with a multi-progress bar system using rich.progress

  • Added rich traceback for improved error reporting

  • Changed the config option file_prefix to dataset_type throughout the codebase and in the default config for clarity and better readability

  • Updated the device key value in the default config from "cpu" to "cuda", CUDA is considered default from now on

  • Added rich-click as new dependency and replaced click with rich_click for improved CLI appearance

  • Refactored load_bundles() to directly filter HDF5 files by dataset_type (using pathlib.Path.glob)

  • Removed obsolete pyvisgen.utils.get_bundles() function [#102]

Refactoring and Optimization#

Pyvisgen v0.4.0 (2025-08-05)#

API Changes#

Bug Fixes#

New Features#

  • Added a new setup_logger function in {mod}`pyvisgen.utils`

  • Added logging throughout the codebase

  • Replaced bare prints with LOGGER.info or LOGGER.warning for better status messages

  • Added exception logging before raising an exception, providing better tracebacks and error context [#98]

Maintenance#

  • Updated most of the docs to use myst parser

  • Updated user guide

  • Updated developer guide

  • Added contribution guide

  • Added coding style guide

  • Added “Cite Us” page [#96]

Refactoring and Optimization#

Pyvisgen v0.4.0 (2025-08-05)#

API Changes#

Bug Fixes#

New Features#

Maintenance#

Refactoring and Optimization#

Pyvisgen v0.3.0 (2025-07-02)#

API Changes#

Bug Fixes#

  • Fix shape of num_ifs

    • Delete additional bin in masking

    • Fix ra dec bug [#25]

  • Fix baseline num calculation

    • Fix wavelength scaling

    • Fix lm grid calculation

    • Fix gridding so that it fits the numpy fft gridding [#28]

  • Fix a numerical issue in the lm grid calculation, caused by adding a big number to small values in the lm grid

    • Use torch.float64 for rd grid and lm grid calculation [#32]

  • Fix gridding in pyvisgen.simulation.observation.Observation methods create_rd_grid() and create_lm_grid() methods resulting in rotated images

  • Fix image rotation caused by bug in rd/lm grid computation in pyvisgen.simulation.observation.Observation

  • Fixed random number drawing in tests by changing the location of the seed override [#44]

  • Update the order of simulated bandwidths in the fits writer to the standard found from converted MeerKat observations

    • Tried to fix polarisation infos antenna hdu [#49]

  • Fix bug in feed rotation/parallactic angle computation in RIME [#57]

  • Fix observation dec not on same device as r [#62]

  • examples/ideal_interferometer.ipynb: Added a new code cell to create an lm_grid with used fov parameters.

    • Fixed missing images for the lm_grid in the docs. [#63]

  • Add quick fix of the annoying import warning when using tqdm.autonotbook(): Use tqdm.auto() instead. This does not create any warnings, as written in the tqdm documentation (https://tqdm.github.io/docs/shortcuts/#tqdmauto). [#65]

New Features#

  • Implement GPU support for visibility calculations

    • New grid mode:

      • When more than one visibility falls into the same pixel, only the first is calculated

      • Define grid before calculation

    • New dense mode:

      • Calculate visibilities for a dense uv grid

      • Simulate ideal interferometer response

    • Add sensitivity cut in image space:

      • Avoid calculation of pixel values below detection threshold

      • Significantly speed-up simulations

    • Add torch compile to RIME functions [#28]

  • Changes to vis_loop() function in visibility.py:

    • Add a an optional tqdm progress bar to get a visual confirmation the calculation is still running

    • Add optional batch_size parameter to control memory consumption [#33]

  • Add class Polarization to pyvisgen.simulation.visibility that is called in vis_loop()

    • Add linear, circular, and no polarisation options

    • Update pyvisgen.simulation.visibility.Visibilities dataclass to also store polarisation degree tensors

    • Add keyword arguments for polarisation simulation to pyvisgen.simulation.observation.Observation class

    • Add parallactic angle computation [#39]

  • pyvisgen.layouts.get_array_layout() now also accepts custom layouts stored in a pandas.DataFrame [#46]

  • Add docs [#47]

  • Add optional auto scaling for batchsize in vis_loop [#48]

  • Add new gridder that can handle vis data returned by the vis_loop() [#53]

  • Add ideal interferometer simulation guide to documentation (in User Guide)

    • Add example notebook ideal_interferometer.ipynb containing full code for the user guide entry

    • Change primary and primary highlight colors for light theme in _static/pyvisgen.css to darker greens to be more visible

    • Change maintainers in pyproject.toml [#58]

    • Add DSA-2000 layouts [#61]

    • Add new quickstart CLI tool that creates a copy of the default configuration at the specified path [#73]

Maintenance#

  • Update readme [#26]

  • Add docstrings - Delete unused files [#27]

  • Delete unused code and relicts

    • Change from numpy arrays to torch tensors

    • Change some of the keywords to more common phrases inside the toml config

    • Update default data_set.toml

    • Delete old config examples

    • Avoid torch einsum for better readability of the code

    • Update ci.yml and workflow.yml for node20 [#28]

  • Add missing changelog [#29]

  • Use observation class to pass sampling options to the fits writer

    • Include writer in tests [#31]

  • Use c from scipy in scan.py [#32]

  • Switch from setup.py to pyproject.toml [#35]

  • Fix package name and url in pyproject.toml

    • Remove obsolete setup.py

    • Fix setuptools find packages path in pyproject.toml

    • Fix formatting of pyproject.toml [#36]

  • Create new dev environment file that contains pytorch-gpu and pytorch-cuda [#37]

  • Change pyvisgen.simulation.visibility.Visibilities dataclass component names from stokes components (I , Q, U, and V) to visibilities constructed from the stokes components (V_11, V_22, V_12, V_21)

  • Switch README to reStructuredText

    • Add Codecov badge [#45]

  • Drop integration time in fits writer (also missing fits files which are converted from ms files)

    • Update saving of visibility dates to modern standards

    • Use infos from observation class [#49]

  • Increase verbosity of tests in CI [#50]

  • Complete rewrite of dataset creation routine pyvisgen.simulation.data_set.SimulateDataSet

    • Accessible using a classmethod to load a config file

    • Add optional multithreading support

    • Draw and fully test parameters before simulation loop. Previously this was done in the loop and tests were only performed for two time steps

    • Support for polarization

    • Add new default config file for new dataset creation routine

    • Update CLI tool for dataset creation routine

    • Allow passing HDF5 key in pyvisgen.utils.data.open_bundles()

    • Restructure pyvisgen.gridding module by adding a utils submodule that contains all utility functions that previously were in the gridder submodule

      • Also fix parts of the utility functions

    • Update and fix tests [#53]

  • Add/update docstrings throughout the codebase [#54]

  • Remove torch.flip() call in visibility.py

    • Change dense UV grid creation to use numpy.float128() and convert to torch.float64() afterwards to fix numerical instabilities

    • Change integration in scan.py to return int_f instead of int_t, removed time integration

    • Exclude dense calculations from code coverage due to lack of GPU computations in GitHub actions [#56]

  • Fix docs index and readme text [#60]

  • Add linting CI job

Refactoring and Optimization#

  • Refactor data classes (Visibilities, Baselines)

    • Add observation class, which holds all relevant information

    • Drop scan-wise splitting in visibilities calculations, but split all valid baselines equally

    • Refactor RIME components (currently only uncorrupted available)

    • Refactor baseline calculations by replacing loops with pytorch built-in methods [#28]

  • Improve hour angle calculation via array-wise operations [#30]

  • Use obs.layout instead of passing the layout name separately in pyvisgen.fits.writer.create_vis_hdu() [#38]

  • Added optional normalize parameter to pyvisgen.visibility.vis_loop() to decide whether to apply a normalization multiplier of 0.5 (default: True) [#43]

  • Remove reading of layout files relative to pyvisgen.layouts.layout

    • Move layout files to external resources directory that is shipped with the distribution

    • Ship default config with distribution [#73]

Pyvisgen v0.2.0 (2024-06-12)#

API Changes#

Bug Fixes#

  • Fix baseline num calculation

  • Fix wavelength scaling

  • Fix lm grid calculation

  • Fix gridding so that it fits the numpy fft gridding [#28]

New Features#

  • Implement GPU support for visibility calculations

  • New grid mode:

    • When more than one visibility falls into the same pixel, only the first is calculated

    • Define grid before calculation

  • New dense mode:

    • Calculate visibilities for a dense uv grid

    • Simulate ideal interferometer response

  • Add sensitivity cut in image space:

    • Avoid calculation of pixel values below detection threshold

    • Significantly speed-up simulations

  • Add torch compile to RIME functions [#28]

Maintenance#

  • Delete unused code and relicts

  • Change from numpy arrays to torch tensors

  • Change some of the keywords to more common phrases inside the toml config

  • Update default data_set.toml

  • Delete old config examples

  • Avoid torch einsum for better readability of the code [#28]

Refactoring and Optimization#

  • Refactor data classes (Visibilities, Baselines)

  • Add observation class, which holds all relevant information

  • Drop scan-wise splitting in visibilities calculations, but split all valid baselines equally

  • Refactor RIME components (currently only uncorrupted available) [#28]

  • Refactor baseline calculations by replacing loops with pytorch built-in methods

Pyvisgen v0.1.4 (2023-11-09)#

API Changes#

Bug Fixes#

  • Fix shape of num_ifs

    • Delete additional bin in masking

    • Fix ra dec bug [#25]

New Features#

  • Update ci:

    • Change conda to mamba

    • Install towncrier [#24]

Maintenance#

  • Update readme [#26]

  • Add docstrings

    • Delete unused files [#27]

Refactoring and Optimization#