Preview .fits files directly in the terminal and convert them to images. Works on remote hosts over ssh!
Your terminal must support either the Kitty or iTerm image protocols.
A few terminals with known support:
f2i can also quickly save .fits to common image formats such as PNG and JPEG
using the --output
parameter. See f2i --help
for more options.
When used as a thumbnailer, f2i has significant speed gains over fits2image:
Test | f2i | fits2image |
---|---|---|
tfn0m436-sq33-20250201-0129-e91.fits - 800x800 jpg | 84 ms | 255 ms |
tfn0m436-sq33-20250201-0129-e91.fits - original size | 106 ms | 255 ms |
tfn0m436-sq33-20250201-0129-e91.fits - 800x800 jpg 10 times | 858 ms | 2.6 seconds |
tfn0m436-sq33-20250201-0129-e91.fits - original size 10 times | 1.1 seconds | 2.6 seconds |
Binaries for Linux-x86_64 can be downloaded from the release page.
cfitsio
and openblas
are required to build f2i. Built and tested with Rust 1.84.
cargo build --release && cargo install