Releases: astroai/torchfits
Release list
v1.0.0rc4
v1.0.0rc3
torchfits 1.0.0rc3 — collaborator soak
Please install, try the examples, report bugs, and contribute.
Highlights
- Examples: Learn Astropy parity (M13 stack, MEF header, Spitzer cutout), real Lupton RGB (SDSS g/r/i), MaNGA LOGCUBE, CFHT MegaCam MEF cutouts, custom transform +
make_loadervsDataLoader - Docs: API button on landing, cache how/when, Dataset/loader tables, custom transform how-to, persona pass; fixed escaped pipes in API tables
- Jules:
AGENTS.md+JULES.md— one weekly researched bug/perf pass (delete old cosmetic schedules in the Jules UI and paste the prompt fromJULES.md) - Fixes:
hdu="EXTNAME"onread_tensor/read_subset, 3D + zero-size cutouts, tablewhere=+ TNULL, remote prefetch race, Lupton empty bands, clear.bz2error
Benchmarks
- Host scorecard: MPS
exhaustive_mps_20260718_180230; Linux CPU/CUDA still Jul-17 soak (CANFAR Jul-18 sessions still Pending) - ML loader:
ml_20260718_191908 - MegaCam:
20260718_124403
Docs edge: https://astroai.github.io/torchfits/edge/
v1.0.0rc2
Install
pip install torchfits==1.0.0rc2Requires Python 3.10+ and PyTorch 2.10. Docs: https://astroai.github.io/torchfits/
Highlights
- Concurrent FITS reads open a private CFITSIO handle per call (safe under multi-worker DataLoaders and multi-HDU access).
- Dataset peers:
FitsTensorDataset,FitsImageDataset,FitsCubeDataset,FitsSpectrumDataset; configurableTORCHFITS_CACHE_DIR/cache_dir=. - CLI short options,
probeSSRF hardening (all DNS records + redirect hops), convert/table filters. - Contiguous table/image writes, header integer overflow checks, empty-primary MEF compress fix.
Breaking / notes
- Cross-thread shared
fitsfile*handle LRUs are gone (correctness). Metadata/preadcaching remains. - SemVer
1.0.0is not this tag — soak on the rc line first.
Links
- Changelog: https://astroai.github.io/torchfits/changelog/
- Compare: v1.0.0rc1...v1.0.0rc2
torchfits 1.0.0rc1
Install
pip install torchfits==1.0.0rc1Requires Python 3.10+ and PyTorch 2.10. See the compatibility matrix.
Highlights
- Release candidate for the 1.0 API (formal stamp in
docs/reviews/release-api-freeze-1.0.0rc1.md) - Empty table filters preserve schema; stretch
a > 0validation; verify treats missing checksums as OK (exit 0) - CLI/docs polish: convert
--toinference, CFITSIO image sections on cutout,--format text|json|jsonl - Root
read_table/stream_table/read_table_rowsemitDeprecationWarning— prefertorchfits.table.*
Breaking / behavior change
torchfits verifyon files without checksum keywords now exits 0 (was 4). Usestatus == "fail"/ exit 4 for corruption.
Links
- Changelog: https://github.com/astroai/torchfits/blob/v1.0.0rc1/docs/changelog.md
- Compare: v1.0b1...v1.0.0rc1
Wheels publish via trusted publishing when build_wheels.yml completes.
What's Changed
Full Changelog: v1.0b1...v1.0.0rc1
v1.0b1
torchfits 0.9.3
Install
pip install torchfits==0.9.3Requires 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 pngCSV/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 --jsonOptional vos: / vos:// probe when the vos package is installed.
Transforms package
Same public API, split by domain:
from torchfits.transforms import ArcsinhStretch, Compose, ZScaleNormalizeNotebooks
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
- Pull request
- Full changelog
- Compare: v0.9.2...v0.9.3
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
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
v0.9.1
What's Changed
Full Changelog: v0.9.0...v0.9.1