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.
Astro Core
Astro Core 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, Astro Core provides reusable building blocks for working with FITS and XISF data in pure Rust.
Status & Scope
Astro Core 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
Astro Core 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.
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.2.0"
= "0.2.0"
= "0.2.0"
# Optional meta crate that re-exports all three:
= "0.2.0"
Each crate can be used independently.
If you depend on the meta crate, import it as astro_core:
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:
Run tests:
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.
Astro Core is part of a broader effort to build open, composable tools for astrophotography workflows in Rust.
Support
If Astro Core 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