Skip to content
@SharpAstro

SharpAstro

Astronomy processing stack written in C#

SharpAstro

A .NET ecosystem for astrophotography automation — from hardware control to fully automated imaging sessions — plus a set of general-purpose, AOT-compatible .NET libraries that grew out of that work.

sharpastro.github.io — what it all does, with screenshots. The planner and sky atlas run in your browser, no install. The image viewer is in the Microsoft Store as Astro Photo Viewer.

Astrophotography

Core

  • TianWen (天文) — Free, open-source astronomical imaging suite for .NET. Manages cameras, mounts, focusers, filter wheels, and guiders via ASCOM, Alpaca, ZWO, QHYCCD, Meade, Skywatcher, OnStep, and iOptron, with first-class support for multi-OTA (dual-rig) setups. Ships as a NuGet library (TianWen.Lib), a cross-platform CLI with an interactive TUI, a headless REST API server (used by Touch N Stars), a standalone FITS viewer (in the Microsoft Store as Astro Photo Viewer), and an integrated N.I.N.A.-style GUI. Includes an automated session orchestrator (cooling, focusing, guiding, meridian flips, dithering), FITS I/O, star detection, and plate solving.
  • TianWen.DAL — Vendor-neutral Device Access Layer defining the core abstractions for consumer astronomical hardware (cameras, mounts, focusers, filter wheels). Pure interfaces, implemented by the device SDKs below.

Device SDKs & bindings

  • ZWOptical.SDK — NuGet packages wrapping ZWO's native C SDKs (ASI cameras, EAF focusers, EFW filter wheels) via P/Invoke, with bundled native binaries for Windows and Linux (x86/x64/ARM). Implements TianWen.DAL.
  • QHYCCD.SDK — QHYCCD native SDK wrapper for .NET, with TianWen.DAL integration.
  • Canon.EDSDK — Modern .NET 10 P/Invoke bindings for Canon's EDSDK, fully source-generated (LibraryImport) and NativeAOT-compatible.
  • FC.SDK ("Free Canon SDK") — Canon EOS camera control via PTP over USB and Wi-Fi, pure managed C# with no EDSDK binary required — an alternative for platforms where Canon's closed-source, Windows-only EDSDK isn't an option.

Formats & imaging

  • SER.Lib — Pure-managed reader/writer for the SER planetary-imaging video format (Lucam Recorder v3), with memory-mapped, frame-accurate random access even in multi-gigabyte files. Consumed by tianwen's FITS viewer to open SER captures as a frame sequence.
  • FITS.Lib — Fork of the CSharpFITS library with a significant performance boost for writing large, multi-dimensional int/short arrays — the common case for astronomical imaging data.

Utilities

  • openphd2-multiscope — Multiplexing proxy for PHD2's JSON-RPC event API, enabling synchronized dithering across a multi-telescope setup.
  • usbreset — Small USB reset tool, handy for recovering wedged cameras/focusers without a physical replug.

General-purpose .NET libraries

Pure-managed, AOT/trim-friendly libraries with no native dependencies, built to support the astrophotography stack (rendering, terminal UI, codecs) but independently useful.

  • DIR.Lib — Device-independent input and rendering foundation shared by GPU (SDL3 + Vulkan) and terminal (console) front ends.
  • SdlVulkan.Renderer — SDL3 + Vulkan rendering surface built on DIR.Lib primitives, AOT-compatible.
  • WebGl.Renderer — WebGL2 backend for the same DIR.Lib Renderer<TSurface>: Blazor WebAssembly, command-buffer JS interop, MSDF text. A widget written once therefore draws on the desktop through Vulkan and in a browser tab through WebGL, which is what puts the planner and sky atlas at sharpastro.github.io/tianwen.
  • Console.Lib — Library for building terminal applications: dock-based layouts, widgets, mouse/keyboard input, VT styling, and Sixel graphics. Also ships mdcat, a cat-for-Markdown CLI built on it.
  • Fonts.Lib — Pure-managed OpenType/TrueType font loading and rendering: hinting, CFF outlines, COLR color glyphs, bitmap emoji, variable fonts, PostScript Type 1, and WOFF/WOFF2.
  • Codecs — Family of pure-managed, AOT-compatible image codec NuGets for .NET, with a facade that sniffs a byte stream's magic bytes and dispatches to the right decoder.
  • Lzip.Lib — Pure-managed lzip (LZMA1) compressor/decompressor, including parallel decoding of multi-member files, compatible with the reference lzip binary.
  • LAN.Lib — Zero-dependency LAN peer discovery: a symmetric UDP announce beacon plus a self-expiring peer table over a shared broadcast domain, filtered by service name. TimeProvider-driven, so beacon cadence and expiry stay deterministic in tests.
  • Serial.Lib — Serial port I/O that does one job well. Cancellable, deadline-honouring reads and writes that never abort spuriously (the CH34x trap of System.IO.Ports async reads), typed failures (a timeout carrying the partial reply, a removed device, a busy port), port enumeration with a stable hardware identity (USB vendor and product, serial number, socket), and an in-memory loopback pair for testing without hardware. Built for tianwen's native serial drivers: mounts, focusers, flat panels.
  • LALR.CC — LALR(1) parser-table generator and runtime for C#, with a YAML grammar schema and a Roslyn source generator pipeline.

Pinned Loading

  1. tianwen tianwen Public

    Astrophotography automation in .NET. Runs a night unattended, plate solves without an external solver, stacks deep-sky and planetary, and ships a CLI, a GUI, a headless server and a FITS viewer.

    C# 3

  2. ZWOptical.SDK ZWOptical.SDK Public

    P/Invoke wrappers for ZWO's native SDKs (ASI cameras, EAF focusers, EFW filter wheels), with bundled native binaries for Windows and Linux on x86, x64 and ARM. Implements TianWen.DAL.

    C 1

  3. FITS.Lib FITS.Lib Public

    Forked from rwg0/csharpfits

    FITS I/O for .NET, forked from CSharpFITS 1.1: much faster writes for large int and short arrays, tile-compressed .fz reads, and multi-extension files.

    C# 2 1

  4. FC.SDK FC.SDK Public

    Canon EOS camera control via PTP over USB and WiFi: pure managed C#, no EDSDK binary required.

    C# 7 2

  5. Codecs Codecs Public

    Image codecs for .NET, pure managed and AOT-friendly: TIFF, PNG, JPEG, JPEG 2000, JPEG XL, JPEG XR, EXR and JBIG2, plus EXIF and ICC, behind one decode contract. Began as a C# port of stb_image.

    C# 23 5

  6. QHYCCD.SDK QHYCCD.SDK Public

    QHYCCD native SDK wrapper for .NET - P/Invoke bindings with TianWen.DAL integration

    C#

Repositories

Showing 10 of 38 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…