Repository navigation
Hexagonal Architecture
CassiniFlow is designed following Hexagonal Architecture (Ports and Adapters) and Domain-Driven Design (DDD) principles, targeting .NET 10 and C# 14 with high-throughput zero-allocation memory constraints.
graph TD
subgraph Presentation["Presentation Layer (Driving Adapters)"]
GUI["CassiniFlow.Desktop<br/>(Avalonia UI 12.1.5, MVVM)"]
CLI["CassiniFlow.Cli<br/>(Headless Console Runner)"]
end
subgraph Application["Application Layer (Use Cases & Pipelines)"]
UC["Use Cases<br/>(RunPipelineUseCase, LiveStackingSessionUseCase, PreviewFrameUseCase)"]
Pipe["Pipeline Pattern<br/>(FrameProcessingPipeline)"]
end
subgraph Domain["Domain Layer (Core Pure Logic)"]
Entities["Entities & Models<br/>(AstroFrame, Centroid, CropRegion, QualityScore, LiveHistogramData)"]
Services["Domain Services<br/>(ImageProcessor, LiveStackingEngine, FieldDerotationEngine)"]
Ports["Inbound & Outbound Ports<br/>(ICameraDriver, IMountController, IFocuserController, IFilterWheelController)"]
end
subgraph Infrastructure["Infrastructure Layer (Driven Adapters)"]
Codecs["Codecs & Formats<br/>(SerFile, FitsFile, UniversalMediaReader)"]
Hardware["Camera & Observatory Drivers<br/>(Alpaca REST, ZWO ASI/EFW, Player One, QHY, ToupTek, SVBony)"]
Native["Native Libraries<br/>(OpenCV / OpenCvSharp4, FFmpeg CLI)"]
Persistence["Storage & Serialization<br/>(ProfileSerializer, Astronomical Naming Helper)"]
end
GUI --> Application
CLI --> Application
Application --> Domain
Infrastructure --> Ports
-
CassiniFlow.Domain:- Zero external dependencies on UI frameworks or third-party imaging libraries.
- Pure domain models (
AstroFrame,QualityScore,Centroid,BoundingBox). - Pure domain calculations (CoG, limb math, crop math, sorting heuristics).
-
CassiniFlow.Application:- Implements use cases and coordinates domain services via composable pipeline stages.
- Tracks cancellation tokens, error dispatching, and progress reporting.
-
CassiniFlow.Infrastructure:- Implements outbound ports (secondary adapters): reading/writing
.serbinaries, FITS astronomical cubes, OpenCV video interop.
- Implements outbound ports (secondary adapters): reading/writing
-
CassiniFlow.Desktop/CassiniFlow.Cli:- Driving adapters that receive user input and render feedback.
Processing raw astronomical video streams can easily saturate .NET garbage collection (GC) if naive byte[] arrays are allocated per frame.
CassiniFlow adheres to strict zero-allocation performance rules:
-
MemoryPool<byte>&ArrayPool<byte>.Shared: Frame memory is rented and returned to pools instead of triggering heap allocations. -
Span<T>andReadOnlySpan<T>: In-place pixel arithmetic and convolution kernels operate without memory copies. - SIMD Hardware Acceleration: Vectorized CPU intrinsics (AVX2 / SSE4.1) accelerate gradient and debayering convolutions.
-
Single-Pass Bounded Top-K Min-Heap: Limits memory usage to
$< 900\text{ MB}$ even when ranking sequences of 50,000+ frames.
CassiniFlow • Modern Planetary & Solar Preprocessing Engine • High Performance .NET 10 & Avalonia UI
GitHub Repository • Releases • Report an Issue
CassiniFlow Wiki
Astronomical Lucky Imaging & Multi-Zone Stacking Suite
🌐 Language / Langue
🇬🇧 English • 🇫🇷 Français
-
Getting Started
-
Desktop Application (GUI)
-
Automation & CLI
-
Support & Internals
-
Prise en main
-
Interface Graphique (Desktop)
-
Automatisation & CLI
-
Support & Architecture