Skip to main content

arcsec_io/
lib.rs

1//! Image input and output for the [arcsec] plate solver.
2//!
3//! [`arcsec_core`] solves pixels; this crate gets them out of files. It reads six
4//! formats, telling them apart by their first bytes rather than the
5//! extension ([`image_io::detect_format`]):
6//!
7//! | Format | Reader |
8//! |---|---|
9//! | FITS (also gzip/bzip2/compress-compressed) | [`fits_io`], via CFITSIO (`rsfitsio`) |
10//! | XISF (PixInsight) | [`xisf_io`], via the `xisf` crate |
11//! | ASDF (Roman, astropy) | [`asdf_io`], via the `asdf-rs` crate |
12//! | JPEG, PNG, TIFF | [`raster_io`], via `zune-jpeg`, `png` and `tiff` |
13//!
14//! Each supplies the pixels as an [`arcsec_core::ImageBuffer`] and what the header
15//! says about pointing and pixel scale; [`image_io`] dispatches between them and
16//! holds the keyword interpretation they share, and [`header`] applies the same
17//! rules to FITS header text an application already has in memory.
18//!
19//! It also writes ASTAP's `.wcs` and `.ini` sidecar files and updates a FITS header
20//! in place ([`fits_io`]).
21//!
22//! The `arcsec` command line and the arcsec C library (`libarcsec`) both read
23//! images through this crate. Its API follows their needs and may change between
24//! minor versions.
25//!
26//! [arcsec]: https://github.com/cruzzil/arcsec
27
28// `alloc` is not in the extern prelude for a crate that links std, so it has to
29// be declared before alloc:: paths can be written.
30extern crate alloc;
31
32pub mod asdf_io;
33pub mod fits_io;
34pub mod header;
35pub mod image_io;
36pub mod raster_io;
37pub mod xisf_io;