Skip to main content

fftvis: A Non-Uniform Fast Fourier Transform-based Visibility Simulator

Tests codecov Black Formatting

fftvis is a fast Python package designed for simulating interferometric visibilities using the Non-Uniform Fast Fourier Transform (NUFFT). It provides a convenient and efficient way to generate simulated visibilities.

Features

  • Utilizes the Flatiron Institute NUFFT (finufft) algorithm for fast visibility simulations that agree with similar methods (matvis) to high precision.
  • Designed to be a near drop-in replacement to matvis with a ~10-100x improvement in runtime
  • Extensible design that allows for easy addition of new backends
  • Support for polarized beam patterns and polarized sky models
  • Support for per-antenna beams w/ functionality to support representing per-antenna beams with a linear basis. See the example notebook for details.

Current Limitations

  • GPU backend exists only as a stub implementation (coming soon!)
  • Diffuse sky models must be pixelized

Installation

You can install fftvis via pip:

pip install fftvis

Basic Usage

from fftvis import simulate_vis

# Simulate visibilities with the CPU backend (default)
vis = simulate_vis(
    ants=antenna_positions,
    fluxes=source_fluxes,
    ra=source_ra,
    dec=source_dec,
    freqs=frequencies,
    times=observation_times,
    beam=beam_model,
    polarized=True,
    backend="cpu"  # Use "gpu" for GPU acceleration when implemented
)

Architecture

fftvis is structured with a modular design:

  • Core: Contains abstract interfaces and base classes that define the API
  • CPU: Contains the CPU-specific implementation
  • GPU: Contains the GPU implementation (currently stubbed for future development)
  • Wrapper: Provides a high-level API for backward compatibility

This modular design makes the package more maintainable and extensible, allowing for the addition of new backends and optimizations without affecting the user API.

Contributing

Contributions to fftvis are welcome! If you find any issues, have feature requests, or want to contribute improvements, please open an issue or submit a pull request on the GitHub repository: fftvis on GitHub

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This package relies on the finufft implementation provided by finufft library. Special thanks to the contributors and maintainers of open-source libraries used in this project.

Citation

If you use fftvis in your research, please cite our paper published in RAS Techniques and Instruments:

fftvis: a non-uniform Fast Fourier Transform based interferometric visibility simulator Tyler A. Cox, Steven G. Murray, Aaron R. Parsons, Joshua S. Dillon, Kartik Mandar, Zachary E. Martinot, Robert Pascua, Piyanat Kittiwisit, and James E. Aguirre.
RAS Techniques and Instruments, Volume 4, 2025, rzaf056.
DOI: 10.1093/rasti/rzaf056 | arXiv: 2506.02130

BibTeX

@article{2025RASTI...4af056C,
  author        = {Cox, Tyler A. and Murray, Steven G. and Parsons, Aaron R. and Dillon, Joshua S. and Mandar, Kartik and Martinot, Zachary E. and Pascua, Robert and Kittiwisit, Piyanat and Aguirre, James E.},
  title         = "{fftvis: a non-uniform Fast Fourier Transform based interferometric visibility simulator}",
  journal       = {RAS Techniques and Instruments},
  year          = {2025},
  month         = {jan},
  volume        = {4},
  pages         = {rzaf056},
  doi           = {10.1093/rasti/rzaf056},
  archivePrefix = {arXiv},
  eprint        = {2506.02130},
  primaryClass  = {astro-ph.IM},
  adsurl        = {https://ui.adsabs.harvard.edu/abs/2025RASTI...4af056C}
}

Metadata

Release files for fftvis 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fftvis 1.1.2
File Size Uploaded
fftvis-1.1.2.tar.gz 1.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for fftvis 1.1.2
File Interpreter ABI Platform
fftvis-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / fftvis-1.1.2.tar.gz

Download URL fftvis-1.1.2.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
65816d78eb28dc2ea35e54c8838639cb70372011c0e61052efc37f8a57f680c3
BLAKE2b-256 checksum
How to use checksums
aff1167be7f4cacd953dceb5ff9620f35beadb11b3153128a4b233799af81900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / fftvis-1.1.2-py3-none-any.whl

Download URL fftvis-1.1.2-py3-none-any.whl
Size 46.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0e73ca84e4176b33248c2cbf94da7d8e97dc4702d29f6972d478fd3134cf45f
BLAKE2b-256 checksum
How to use checksums
9903356ce0b4c3ee783e9a74501eda5d189d67382426fc5b13875d986680980f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page