Skip to content

torchfits 0.9.2

Choose a tag to compare

@sfabbro sfabbro released this 17 Jul 01:15
c27b7c0

Install

pip install torchfits==0.9.2

Requires Python 3.10+ and PyTorch 2.10. Pre-built wheels for Linux x86_64 and macOS arm64.

Docs: https://astroai.github.io/torchfits/
Changelog: https://astroai.github.io/torchfits/changelog/

Highlights

Command-line tools

pip install provides a torchfits CLI for multi-extension FITS (MEF) workflows:

torchfits info science.fits
torchfits header *.fits --keyword OBJECT --json
torchfits verify science.fits
torchfits stats science.fits --hdu 0 --jsonl
torchfits table catalog.fits --hdu 1 --preview 5
torchfits cutout science.fits cutout.fits --box 100,100,256,256

Full command list and exit codes: CLI guide.

Clearer Python imports

  • Root imports are FITS I/O and HDU helpers only.
  • Transforms import from torchfits.transforms (for example from torchfits.transforms import ZScaleNormalize).
  • read_fast and read_image are removed — use read / read_tensor.

Performance

Lab scorecard refresh: Linux CPU and CUDA report 0 strict-gate deficits; Mac MPS reports 4. Methodology and tables: Benchmarks.

Breaking changes

Before After
from torchfits import ZScaleNormalize from torchfits.transforms import ZScaleNormalize
torchfits.read_fast(...) / read_image(...) torchfits.read(...) / read_tensor(...)

Links

What's Changed

  • Zero-deficit CANFAR scorecard + engine fixes by @sfabbro in #210
  • Release 0.9.2: lean API, CLI, scorecard by @sfabbro in #211

Full Changelog: v0.9.1...v0.9.2