Skip to main content

An FFT-based visibility simulator

Project description

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 ~10x improvement in runtime
  • Extensible design that allows for easy addition of new backends
  • Support for polarized beam patterns and polarized sky models

Current Limitations

  • No support for per-antenna beams
  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fftvis-1.0.0.tar.gz (147.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fftvis-1.0.0-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file fftvis-1.0.0.tar.gz.

File metadata

  • Download URL: fftvis-1.0.0.tar.gz
  • Upload date:
  • Size: 147.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fftvis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a2c1c9b45363e4389161ce0869e7693d619469bab9f7e9503419596b40be4657
MD5 336ce9c88fb8996fd3c57d8efbceb425
BLAKE2b-256 0ad32c1de6747a0f8f52fd518a9cb575b5ce6cd3dfcd91d6ea585b09ee475b0f

See more details on using hashes here.

File details

Details for the file fftvis-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fftvis-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fftvis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6713cd1fc5e8789d6c69238fef663a694fd4558c04f8340fb1ce7445142f09c3
MD5 98aecb6cbcac1b8c2de7d3785cb51b92
BLAKE2b-256 bc6835f7071207430562a5210d40479933b02460ef3d169bdc6a5bf252952796

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page