Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ravensky-astro

RavenSky Astro is a modular collection of Rust crates for astronomical image I/O, metadata extraction, and quantitative image analysis.
Designed for astrophotography tools and observatory workflows, RavenSky Astro provides reusable building blocks for working with FITS and XISF data in pure Rust.
Status & Scope
RavenSky Astro is actively developed and used in production within my own astrophotography tools and workflows. The APIs are designed for reuse and stability, but the ecosystem continues to evolve as new utilities and applications are built on top of it.
The goal is not just experimentation — it is to build a durable, composable foundation for astronomical image tooling in Rust.
Architecture Overview
RavenSky Astro is intentionally modular. Each crate has a focused responsibility:
- astro-io → image file loading and saving
- astro-metadata → structured metadata extraction
- astro-metrics → statistical and quality analysis
These crates are designed to be used independently or together, depending on your application’s needs.
Planned format-layer refactoring and migration details are documented in the Format Architecture Plan.
Windows FITS Path-Length Note
On Windows, FITS file access in AstroMuninn and the ravensky-astro FITS APIs depends on CFITSIO (via fitsio / fitsio-sys). CFITSIO currently opens disk files using its fopen-based path handling (file_openfile), which in this environment follows the classic Windows path-length boundary.
Use full FITS paths shorter than 260 characters (< 260). At 260 or more, FITS open calls may fail.
This limitation is specific to FITS access through CFITSIO. XISF handling is not affected.
Crates
astro-io
Handles I/O operations for astronomical image formats:
- FITS file loading and saving
- XISF file loading and saving
- Efficient image data handling
use fits;
use xisf;
let = load_fits?;
astro-metadata
Provides structured metadata extraction and handling:
- FITS header parsing
- XISF header parsing
- Equipment information (telescope, camera, filters)
- Exposure details
- Environmental data
- Plate scale calculations
use fits_parser;
let metadata = extract_metadata_from_path?;
if let Some = metadata.plate_scale
astro-metrics
Implements statistical and quality metrics for astronomical images:
- Star detection and measurement (via SEP)
- Star metrics (count, FWHM, eccentricity, elongation)
- Background analysis (median, RMS, uniformity)
- Composite quality scoring
use sep_detect;
use quality_metrics;
let =
detect_stars_with_sep_background?;
let scores = calculate_quality_scores;
println!;
Design Goals
- Pure Rust implementation
- Minimal external dependencies
- Clear crate boundaries
- Composable APIs
- Suitable for CLI tools, services, or GUI applications
- Deterministic, testable image quality metrics
Installation
Add only the crates you need:
[]
= "0.4.0"
= "0.4.0"
= "0.4.0"
# Optional meta crate that re-exports all three:
= "0.4.0"
Each crate can be used independently.
If you depend on the meta crate, import it as ravensky_astro:
use ;
Example: Load, Extract Metadata, and Score an Image
use fits;
use fits_parser;
use sep_detect;
use quality_metrics;
let path = new;
let = load_fits?;
let metadata = extract_metadata_from_path?;
let =
detect_stars_with_sep_background?;
let scores = calculate_quality_scores;
println!;
println!;
println!;
Development
Clone and build:
This workspace tracks the current stable Rust toolchain for development. The checked-in rust-toolchain.toml ensures cargo, rustfmt, clippy, and rust-analyzer all resolve through the same stable channel and component set.
Run the standing maintenance loop from the workspace root:
Documentation
Additional documentation is available in the docs/ directory:
- Quality Metrics documentation
- Supported NINA tokens
- File organization tokens
Contributing
Contributions, suggestions, and issue reports are welcome.
RavenSky Astro is part of a broader effort to build open, composable tools for astrophotography workflows in Rust.
Support
If RavenSky Astro is useful in your projects, consider supporting development via GitHub Sponsors or other contribution channels.
License
Licensed under either:
- MIT License
- Apache License, Version 2.0