Skip to main content

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 (`fitscube`).
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 specs;
25
26pub use beams::Beam;
27pub use bounding_box::{BoundingBox, create_bound_box_plane, extract_common_bounding_box};
28pub use combine::{CombineOptions, combine_fits};
29pub use error::{FitsCubeError, Result};
30pub use extract::{ExtractOptions, extract_plane_from_cube};
31
32#[cfg(feature = "python")]
33mod python;
34#[cfg(feature = "python")]
35pub use python::_fitscube_rs;