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.
- 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.
- 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.DALintegration. - 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.
- 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.
- 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.
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.Libprimitives, AOT-compatible. - WebGl.Renderer — WebGL2 backend for the same
DIR.LibRenderer<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, acat-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
lzipbinary. - 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.Portsasync 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 fortianwen'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.