EigenFrame.PreProcessing 0.5.54

dotnet add package EigenFrame.PreProcessing --version 0.5.54
                    
NuGet\Install-Package EigenFrame.PreProcessing -Version 0.5.54
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EigenFrame.PreProcessing" Version="0.5.54" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EigenFrame.PreProcessing" Version="0.5.54" />
                    
Directory.Packages.props
<PackageReference Include="EigenFrame.PreProcessing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EigenFrame.PreProcessing --version 0.5.54
                    
#r "nuget: EigenFrame.PreProcessing, 0.5.54"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EigenFrame.PreProcessing@0.5.54
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EigenFrame.PreProcessing&version=0.5.54
                    
Install as a Cake Addin
#tool nuget:?package=EigenFrame.PreProcessing&version=0.5.54
                    
Install as a Cake Tool

EigenFrame.PreProcessing

Pure, dependency-free astrophotography preprocessing algorithms for .NET — frame classification, sample decode, tile-pyramid generation, image statistics, tile-based calibration, and stacking/integration math. Written in F#, usable from any .NET language.

The library is format-agnostic: it operates on already-decoded sample buffers and metadata, never on files. You read your XISF/FITS bytes however you like and hand the library canonical buffers; it does the math. This is what lets the same algorithms run identically in a cloud service and a local desktop app.

dotnet add package EigenFrame.PreProcessing
<PackageReference Include="EigenFrame.PreProcessing" Version="0.2.0" />

Targets .NET 10. Floors FSharp.Core at 10.0.100 (deliberately low — any net10 SDK satisfies it). MIT licensed.

The one thing to know: the canonical contract

Every pixel function works in one processing format: single-channel / planar float32 (or float), range [0, 65535]not [0, 1]. You convert your source samples into that range; the library never guesses. The per-source-format scaling is provided for you via SampleFormat:

type SampleFormat = UInt8 | UInt16 | UInt32 | Float32 | Float64
Source → canonical [0, 65535]
UInt8 v / 255 * 65535
UInt16 identity (raw ADU) — the zero-cost path
UInt32 v / UInt32.MaxValue * 65535
Float32 v * 65535 (XISF [0,1][0,65535])
Float64 v * 65535

SampleFormat is the library's own enum on purpose — it does not reference XisfLib.Core or any image-format library. If your data comes from XISF, map its XisfSampleFormat to SampleFormat once at your boundary (a ~5-line match).

A few invariants worth honoring:

  • Pure & synchronous. No I/O, no async — you own all reads/writes and thread the compute off your request threads.
  • You own the buffers. In-place variants (e.g. subtractBiasInPlace, normalizeInPlace) mutate the slice you pass and are named accordingly. (Some functions still allocate-and-return while the API settles pre-1.0.)
  • Tile geometry is library-canonical. Tile sizes, pyramid structure, and the [0,1] tile wire format are decided by the library so independently-built tiles line up — don't reinvent them host-side.

Pre-1.0: the surface may change between minor versions until 1.0. Pin a version.

Modules

Module What it does
Classification Bias/Dark/Flat/Light × Frame/Master from frame metadata
Grouping equipment-group rule matching, auto-group naming, sensor-temp banding, and session/observation-night date rules shared by cloud and desktop
SampleFormat the library's own dependency-free pixel-format enum (UInt8/UInt16/UInt32/Float32/Float64) and its canonical meta.json name
Decode raw bytes → canonical [0,65535] samples; level dimensions; area-average downsampling
Fits pure FITS primary-image decode over already-read bytes — header cards, BZERO/BSCALE, BLANK/NaN, ROWORDER, float range-sniff. Uncompressed FITS is the one format whose full read path is a dependency-free pure function, so it lives beside Decode's scaling conventions; XISF and camera raw stay host-side
Statistics min/max/mean/median/stddev/MAD (exact UInt16 histogram path)
Tiling tile-grid geometry, [0,1] byte encoders, Brotli, per-level tile generation, meta.json
Calibration scaled-out tile-based bias subtraction
Denoise integration-space denoising — variance-stabilize → undecimated-Haar SURE-LET shrinkage → un-stabilize, with uniform/parametric (Poisson–Gaussian)/auto-estimated noise models
PixelRepair per-tile hot/cold pixel defect detection and repair — dark-guided candidate adjudication plus a statistical fallback pass, with star-safety isolation
Integration tile decode, normalization, pixel rejection (MinMax / SigmaClip / LinearFitClip), combine
Quality per-frame quality scoring (FWHM/HFR/eccentricity/star count/SNR/background) that drives quality-weighted integration
Stars star detection over a decoded channel — candidate detection, acceptance filtering, flux/background measurement
LocalSurface shared smooth low-frequency field primitive (bilinear grid fit + sampling) underlying localized weighting and localized normalization
SurfaceConsistency flat-frame surface-quality analysis distinguishing transient spikes, progressive ramps, and persistent optical-train steps in a batch
FlatVerdict classifies a night's SurfaceConsistency analysis into a verdict (clean/rogue/cloud/dew/boundary) plus the frames worth rejecting
Interpolation resampling kernels over a decoded channel — nearest/bilinear/bicubic/Lanczos3
SpatialMatch KD-tree star lookups, the similarity-transform least-squares fit, RANSAC refinement, and the center-seeded Expanding matcher
TriangleMatch scale/rotation-invariant triangle-descriptor star matching with ratio matching and correspondence voting
RBFTransform RBF distortion model (TPS/Wendland/IMQ) layered on the similarity transform, plus the combined inverse-transform solve used when warping
Warp warp-on-read chunk geometry — back-projecting an output region into source space for tile-by-tile aligned-light integration
Alignment the star-list → similarity-transform → optional RBF-distortion → warp pipeline, staged as detect/matchToReference/computeDistortion/transform

Examples

Classify a frame from its FITS signals — the IMAGETYP value (or None if absent) and the two independent master markers, an NCOMBINE keyword and a PixInsight ImageIntegration HISTORY block:

open EigenFrame.PreProcessing

match Classification.classify (Some "Light Frame") false false with
| Classification.Classified (cat, sub) -> printfn "%A %A" cat sub   // Frame Light
| Classification.Unknown                -> printfn "unrecognised"

// Canonical persisted names, e.g. for a catalog row:
let category, subtype = Classification.names (Classification.classify (Some "Master Dark") true false)
// "Master", "Dark"

Decode + measure a frame you've already read into a ReadOnlyMemory<byte>:

open EigenFrame.PreProcessing

let fmt = SampleFormat.UInt16                       // map from your source format
let stats = Statistics.computeStats pixelBytes pixelCount fmt
printfn "mean=%f median=%f" stats.Mean stats.Median // both in [0, 65535]

Build the L4 tile pyramid straight from source bytes:

let tileSize = Tiling.validateTileSize 512
for (tx, ty, brotliBytes) in Tiling.generateL4Tiles pixelBytes width height fmt tileSize do
    // write brotliBytes to your tile store at (tx, ty)
    ()

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.54 135 7/26/2026
0.5.53 102 7/26/2026
0.4.52 101 7/26/2026
0.4.51 102 7/25/2026
0.4.50 144 7/19/2026
0.4.49 129 7/11/2026
0.4.48 111 7/8/2026
0.4.47 116 7/6/2026
0.4.46 119 7/4/2026
0.4.45 109 7/4/2026
0.4.44 114 7/3/2026
0.4.43 120 7/1/2026
0.4.38 149 6/24/2026
0.4.37 113 6/24/2026
0.4.36 115 6/24/2026
0.4.35 113 6/24/2026
0.4.34 114 6/23/2026
0.4.33 108 6/23/2026
0.4.32 113 6/23/2026
0.4.31 123 6/23/2026
Loading failed