fitscube_rs/lib.rs
1//! Combine single-frequency (or single-time) FITS images into a FITS cube.
2//!
3//! A Rust port of the [`fitscube`](https://github.com/AlecThomson/fitscube)
4//! Python package. Also available as a Python package (`fitscube_rs`) and a CLI
5//! tool (`fitscubers`).
6//!
7//! # Overview
8//!
9//! - [`combine_fits`]: stack a list of images into a cube along the frequency
10//! or time axis ([`combine`] module), handling uneven spacing, blank-channel
11//! interpolation, per-channel beams, and bounding-box trimming.
12//! - [`extract_plane_from_cube`]: pull one channel/timestep back out of a cube
13//! ([`extract`] module).
14//!
15//! Assumptions (inherited from the original): all inputs share the same WCS and
16//! pixel grid, and the frequency/time of each image is available either as a WCS
17//! axis, the `REFFREQ` keyword, or the `DATE-OBS` keyword (time mode).
18pub mod beams;
19pub mod bounding_box;
20pub mod combine;
21pub mod error;
22pub mod extract;
23pub mod fits_io;
24pub mod progress;
25pub mod specs;
26
27pub use beams::Beam;
28pub use bounding_box::{BoundingBox, create_bound_box_plane, extract_common_bounding_box};
29pub use combine::{CombineOptions, combine_fits};
30pub use error::{FitsCubeError, Result};
31pub use extract::{ExtractOptions, extract_plane_from_cube};
32
33#[cfg(feature = "python")]
34mod python;
35#[cfg(feature = "python")]
36pub use python::_fitscube_rs;