Skip to content

torchfits 0.9.3

Latest

Choose a tag to compare

@sfabbro sfabbro released this 17 Jul 15:44
6b15196

Install

pip install torchfits==0.9.3

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

Convert more catalog formats

torchfits convert catalog.fits out.parquet --to parquet --hdu 1
torchfits convert catalog.fits out.csv --to csv --hdu 1
torchfits convert catalog.fits out.tsv --to tsv --hdu 1
torchfits convert catalog.fits out.arrow --to arrow --hdu 1
torchfits convert r.fits g.fits b.fits rgb.png --to png

CSV/TSV export flat columns; nested columns use parquet or arrow. PNG is a Lupton RGB preview (stdlib, no Pillow). --to ppm is removed.

Header fitsort + probe

torchfits header *.fits --fitsort --keyword OBJECT --keyword DATE-OBS
torchfits probe science.fits --json

Optional vos: / vos:// probe when the vos package is installed.

Transforms package

Same public API, split by domain:

from torchfits.transforms import ArcsinhStretch, Compose, ZScaleNormalize

Notebooks

Lean _repr_html_ previews on TensorHDU, TableHDU, and TableHDURef.

Performance

Scorecard refresh: CUDA 0 strict deficits; Linux CPU 1; Mac MPS 16. Methodology: Benchmarks.

Security

Filenames using CFITSIO’s sh:// protocol are rejected (same class of checks as | pipes).

Breaking changes

Before After
torchfits convert … --to ppm --to png

Links

What's Changed

  • 🛡️ Sentinel: [CRITICAL] Fix command injection vulnerability via CFITSIO sh:// protocol by @sfabbro in #207
  • 0.9.3: fitsort header tables and vos probe by @sfabbro in #212

Full Changelog: v0.9.2...v0.9.3