torchfits 0.9.2
Install
pip install torchfits==0.9.2Requires 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,256Full 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 examplefrom torchfits.transforms import ZScaleNormalize). read_fastandread_imageare removed — useread/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
- Pull request
- Full changelog
- Compare: v0.9.1...v0.9.2
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