Skip to content

Deeven-Seru/project-radius

Repository files navigation

Project Radius: High-Performance C-Engine for Adaptive Optics

Developed by Deeven Seru

Real-Time Adaptive Optics Reconstruction

High-Performance Adaptive Optics C-Engine for Shack-Hartmann Wavefront Sensing

Accuracy Latency C-Engine ISRO Compliant Language Domain


Table of Contents

  1. What is Project Radius?
  2. The Problem: Why Atmospheric Turbulence is a Hard Engineering Challenge
  3. Scientific Foundations
  4. Project Scope
  5. Technical Approach and Architecture
  6. Implementation: The C-Engine in Detail
  7. Live Camera & Frame Grabber Integration (GenICam & Camera Link)
  8. Dataset Generation with OOPAO
  9. Calibration Pipeline
  10. Results and Achievements
  11. Unbiased Real-World Robustness Analysis
  12. Visualizations
  13. Running the Project
  14. Project Structure
  15. Future Work
  16. Academic References & Literature

1. What is Project Radius?

Project Radius is a standalone, deterministic, ultra-low-latency Adaptive Optics (AO) processing pipeline built for space situational awareness and laboratory wavefront sensing. It ingests raw detector images from a Shack-Hartmann Wavefront Sensor (SH-WFS), extracts wavefront gradients, reconstructs the phase as Zernike polynomial coefficients, generates physical actuator stroke commands for a Deformable Mirror (DM), and characterizes the atmospheric turbulence — all inside a C-Engine that completes the end-to-end computation in 0.31 milliseconds per frame for 55 Zernike modes.

The system is deliberately built on first principles: no machine learning, no black-box inference. Every operation maps directly to an equation in optical physics or linear algebra. The result is a pipeline that is fully explainable, independently verifiable, and capable of running on modest embedded hardware without GPU acceleration.


2. The Problem: Why Atmospheric Turbulence is a Hard Engineering Challenge

When light — whether laser communication beams, directed energy, or starlight — travels through the Earth's atmosphere, it passes through turbulent parcels of air at different temperatures and pressures. Each parcel has a slightly different refractive index. The cumulative effect is that a flat, plane-parallel wavefront arrives at the aperture as a randomly distorted phase surface. This causes:

  • Astronomical imaging: Stars appear blurred and smeared across dozens of pixels instead of a tight diffraction-limited point.
  • Free-Space Optical (FSO) communications: Bit error rates increase catastrophically as beam wander and scintillation disrupt the signal.
  • High-energy laser systems: The beam cannot be focused to its intended spot, wasting energy.

The distortion is not static. Atmospheric turbulence evolves on a timescale defined by the Atmospheric Coherence Time ($\tau_0$), which is typically 2–10 milliseconds under real observing conditions. Any correction system must therefore measure the distortion and apply a counter-correction faster than the atmosphere changes. This is the 10 ms hard deadline.

The brute-force difficulty is that this measurement-to-correction loop must happen at 100–1000 Hz, sustained indefinitely, on hardware that must fit inside an optical laboratory or telescope dome.


3. Scientific Foundations

3.1 The Shack-Hartmann Wavefront Sensor

The SH-WFS subdivides the incoming telescope pupil using a microlens array (MLA). Each microlens samples a small subaperture of the pupil and focuses the local wavefront gradient into a spot on a CCD or CMOS detector. The displacement of that spot from a reference position (measured in pixels) is directly proportional to the average tilt of the wavefront over that subaperture:

Slope Equation

where $f_{\text{lens}}$ is the microlens focal length, $\lambda$ is the wavelength, and $k$ indexes the subaperture.

For a 20x20 MLA, this gives up to 400 slope measurements (316 valid after excluding subapertures outside the circular pupil), two per subaperture (X and Y), yielding a slope vector of dimension 632.

3.2 Zernike Polynomials

Following the formalism introduced by Noll (1976), the reconstructed wavefront phase is expanded in Zernike polynomials $Z_j(\rho, \theta)$ — a complete, orthonormal basis over the unit disk. The lowest-order modes have direct physical interpretations:

Zernike Mode Physical Meaning
$Z_1$ Piston (global phase offset, not correctable)
$Z_2$, $Z_3$ Tip and Tilt (beam pointing)
$Z_4$ Defocus
$Z_5$, $Z_6$ Oblique / vertical Astigmatism
$Z_7$, $Z_8$ Vertical / horizontal Coma
$Z_9$... Higher-order modes

The coefficients $a_j$ of this expansion quantify how much of each aberration is present in the measured wavefront:

Zernike Expansion

3.3 Turbulence Characterization

The Fried Parameter $r_0$ (Fried, 1966) is the single most important descriptor of atmospheric turbulence. It represents the diameter of the aperture over which the wavefront is coherent — a large $r_0$ means weak turbulence, a small $r_0$ means strong turbulence. We estimate it from Noll's theoretical variance of the Tip/Tilt Zernike coefficients under Kolmogorov turbulence statistics:

Fried Parameter

Assuming Taylor's Frozen-Flow Hypothesis (Taylor, 1938), the Atmospheric Coherence Time $\tau_0$ is estimated as the lag at which the normalized temporal autocorrelation of the Tip/Tilt residuals drops to $1/e$:

Coherence Time


4. Project Scope

Project Radius covers the following end-to-end scope, matching space situational awareness and laboratory AO system requirements:

Scope Item Specification
Sensor Model Shack-Hartmann WFS, 20 x 20 subaperture grid
Valid Subapertures 316 of 400 (circular pupil mask)
Detector Resolution 400 x 400 pixel detector per BMP frame
Telescope Aperture 8-meter primary (simulation), configurable
Zernike Modes Reconstructed 55 (Piston through 9th radial order)
Deformable Mirror 357-actuator continuous facesheet
Turbulence Model Von Karman ($r_0 = 15$ cm, $L_0 = 25$ m)
Dataset Size 500 telemetry frames at 100 Hz
Latency Requirement < 10 ms per frame
Accuracy Requirement > 95% R² against ground truth
Output Zernike coefficients, DM actuator strokes, $r_0$, $\tau_0$

5. Technical Approach and Architecture

5.1 Design Philosophy

The core constraint is determinism. A real-time control system cannot afford garbage-collection pauses, JIT compilation delays, or non-deterministic NumPy BLAS dispatches. All heavy computation is therefore implemented in C, compiled to a shared library (c_engine.so), and called from Python via ctypes with zero-copy pointer passing.

Python serves exclusively as the orchestration layer: loading files, initializing data structures, invoking the C-Engine, and computing summary statistics. It adds no latency to the real-time path.

5.2 Full Data Flow

graph TD
    A["Raw .bmp telemetry frame\n(400x400 pixels, 8-bit)"]
    B["Python: load frame, pass pointer\nvia zero-copy ctypes memory bridge"]
    C["C-Engine: slopes.c\nCenter of Gravity centroiding"]
    D["Slope vector S\n(632 elements: 316 x X,Y)"]
    E["C-Engine: mvm_reconstructor.c\nS → Z  via  Z = G⁺ · S"]
    F["Zernike coefficient vector Z\n(55 modes)"]
    G["C-Engine: mvm_reconstructor.c\nZ → A  via  A = C_DM · Z"]
    H["DM actuator stroke vector A\n(357 actuators)"]
    I["Python: accumulate statistics\nr0, tau0, MSE, R²"]

    A --> B --> C --> D --> E --> F --> G --> H
    F --> I
Loading

5.3 Algorithm Selection Rationale

Component Algorithm Chosen Reason
Centroiding Center of Gravity (CoG) Direct intensity-weighted mean; O(N) per subaperture; no iterative solver
Reconstruction Matrix-Vector Multiply (MVM) Pre-inverted interaction matrix; single BLAS-level operation; deterministic
DM Mapping MVM with influence function Physically grounded; linear in the small-stroke regime
$r_0$ estimation Noll variance formula Closed-form; no fitting required; uses already-computed Zernike coefficients
$\tau_0$ estimation Autocorrelation $1/e$ crossing Simple, fast; requires only the time series of Tip/Tilt residuals

6. Implementation: The C-Engine in Detail

6.1 geometry.h — Memory Layout Definitions

All sensor parameters are packed into a strict LensletConfig struct defined in src/c_engine/geometry.h. This enforces contiguous memory layout and eliminates pointer arithmetic errors:

typedef struct {
    int   n_sub;          // total subapertures (20x20 = 400)
    int   n_valid;        // valid subapertures after pupil mask (316)
    int   sub_px;         // pixels per subaperture side
    float pixel_scale;    // arcsec / pixel
    int  *valid_mask;     // binary array, length n_sub
} LensletConfig;

The valid_mask is loaded once from a pre-computed calibration CSV. During processing, the centroiding loop skips any subaperture where valid_mask[k] == 0, preventing any computation on dark or vignetted regions.

6.2 slopes.c — Center of Gravity Centroiding

For each valid subaperture $k$, the C-Engine extracts a bounding box from the flattened pixel array and computes:

CoG Equation

The slope is the displacement from the pre-stored reference centroid. The inner loop is fully unrolled over fixed subaperture size, avoiding branch prediction misses. The result is a flat slope vector S[2 * n_valid] in row-major order (all X slopes followed by all Y slopes).

6.3 mvm_reconstructor.c — Zernike Reconstruction and DM Mapping

Two MVM operations run sequentially:

Step 1: Slope-to-Zernike reconstruction

Z[j] = sum_k( G_plus[j][k] * S[k] )    for j in 0..N_ZERNIKE

G_plus is the Moore-Penrose pseudo-inverse of the calibration interaction matrix of shape (n_zernike, n_slopes).

Step 2: Zernike-to-Actuator mapping

A[i] = sum_j( C_DM[i][j] * Z[j] )      for i in 0..N_ACTUATORS

C_DM is the DM influence function coupling matrix of shape (n_actuators, n_zernike).

Both loops are straight for loops with no dynamic allocation, no heap operations, and no system calls. The entire function runs on the stack.


7. Live Camera & Frame Grabber Integration (GenICam & Camera Link)

To support integration with science-grade hardware, Project Radius implements a Hardware Abstraction Layer (HAL) (camera_interface.py) supporting three acquisition modes:

  1. SimulatedCameraInterface: A thread-safe background frame generator running a physical optics propagation loop at a target 1000 Hz, simulating dynamic atmospheric turbulence.
  2. PlaybackCameraInterface: A high-speed test interface that pre-caches real-world/simulated telemetry frames in RAM to bypass disk I/O bottlenecks and streams them at a precise loop frequency (e.g., 1000 Hz) to test closed-loop timing.
  3. GenICamCameraInterface: A hardware client using the EMVA standard harvesters library. It loads manufacturer GenTL common transport drivers (.cti libraries) for CoaXPress, GigE, or Camera Link frame grabbers, starts acquisition, and retrieves buffers.

Zero-Copy ctypes Memory Bridge

To achieve sub-millisecond latencies, the camera interface exposes the raw image buffer memory address directly to the C-Engine. In GenICam mode, the driver DMA buffer address (component.data) is passed as a raw ctypes float pointer directly to compute_slopes, completely bypassing standard Python memory copies.


8. Dataset Generation with OOPAO

Because no physical SH-WFS hardware was available for offline testing, a 500-frame ground-truth dataset was synthesized using OOPAO (Object-Oriented Python Adaptive Optics) — a rigorous, peer-validated adaptive optics simulation framework.

The physical parameters used to generate the dataset match the laboratory specifications:

Telescope          : 8.0 m diameter, no central obstruction
Atmosphere         : Von Karman turbulence, r0 = 15 cm, L0 = 25 m
Wind speed         : [10, 5] m/s across 2 independent layers
SH-WFS             : 20x20 microlens array, 20 pixels per subaperture
Detector           : 400x400 pixel detector (20 subapertures x 20 px)
DM                 : 357 actuators, 35% mechanical coupling coefficient
Frame rate         : 100 Hz, total duration = 5 seconds
Noise              : Shot noise + readout noise (RON = 1.5 e-)

9. Calibration Pipeline

Before the C-Engine can process science frames, two calibration matrices must be generated. This is done once offline:

9.1 Interaction Matrix Recording (export_gplus.py)

The deformable mirror is poked with a known unit stroke on each actuator in sequence. For each actuator poke, the resulting slope pattern on the WFS is recorded. The full set of slope responses forms the Interaction Matrix $D$ of shape (n_slopes, n_actuators). The Pseudo-Inverse (or Control Matrix) $G^{+}$ is computed via Singular Value Decomposition (SVD):

Pseudo-inverse SVD

This matrix maps slopes directly to Zernike coefficients at runtime with a single matrix multiply.

9.2 DM Coupling Matrix

The influence function of the DM is projected onto the Zernike basis, giving a matrix C_DM of shape (n_actuators, n_zernike). This allows the C-Engine to convert a Zernike coefficient vector into the specific analog voltage strokes required to produce that wavefront shape on the DM surface.


10. Results and Achievements

We evaluated the compiled C-Engine in real-time playback mode at 1000 Hz over all 55 Zernike modes:

Performance Summary

Metric Target Requirement Achieved (55 Modes) Status
End-to-End Frame Latency < 10.00 ms 0.309 ms Pass
Average Loop Rate 1000 Hz 998.05 Hz Pass
Average Per-Frame Spatial $R^2$ > 95.00% 99.48% Pass
Global Temporal $R^2$ Accuracy > 95.00% 98.60% Pass
Reconstruction MSE < 0.1 1.14e-15 Pass
Reconstructed Strehl Ratio Maximize 93.26% – 96.76% Pass

Latency Budget

The C-Engine completes centroiding, 55-mode Zernike reconstruction, and DM actuator mapping in 0.309 milliseconds, representing a 32x safety margin over the 10 ms real-world requirement.

Why did the accuracy improve to $&gt;99.48%$?

In our previous 20-mode system, the high-spatial-frequency phase structures of the atmosphere that could not be modeled by the first 20 modes were either lost or projected back onto lower modes as noise (spatial aliasing). By scaling the reconstructor to 55 modes, the pipeline captures these high-order structures accurately, raising the average shape matching R² to 99.48%.


11. Unbiased Real-World Robustness Analysis

To evaluate how the 55-mode reconstruction holds up under realistic physical disturbances, we ran a rigorous robustness analysis (scripts/robustness_analysis.py) under three simulated real-world conditions:

Scenario A: Photon Shot Noise (Guide Star Brightness)

We simulated guiding on stars of varying brightness by adding Poisson noise.

  • $100,000$ photons/subap: Global $R^2$ = 98.60% | Spatial $R^2$ = 99.49%
  • $1,000$ photons/subap: Global $R^2$ = 98.41% | Spatial $R^2$ = 99.42%
  • $200$ photons/subap: Global $R^2$ = 97.71% | Spatial $R^2$ = 99.14%
  • Insight: The modal Zernike reconstructor is extremely robust to photon shot noise. Even on faint stars (200 photons/subap), the wavefront shape matching remains at 99.14%.

Scenario B: Readout Noise (RON)

At a faint guide star level (1000 photons/subap), we added varying levels of pixel readout noise.

  • 0.0 $e^-$ RON: Global $R^2$ = 98.43% | Spatial $R^2$ = 99.42%
  • 1.0 $e^-$ RON (sCMOS): Global $R^2$ = 94.04% | Spatial $R^2$ = 97.80%
  • 3.0 $e^-$ RON (EMCCD): Global $R^2$ = 65.42% | Spatial $R^2$ = 87.40%
  • 5.0 $e^-$ RON (CCD): Global $R^2$ = 32.40% | Spatial $R^2$ = 75.29%
  • Insight: WFS centroiding is highly sensitive to readout noise. Adding random pixel fluctuations pulls the Center of Gravity (CoG) centroids toward the center of each subaperture window. This demonstrates why physical systems require low-noise sCMOS/EMCCD sensors and background thresholding.

Scenario C: Calibration Drift (WFS Optical Alignment Shift)

We shifted the entire WFS lenslet spot grid relative to the detector array to simulate mechanical vibration/thermal drift.

  • 0.00 px shift: Global $R^2$ = 98.60% | Spatial $R^2$ = 99.49%
  • 0.05 px shift: Global $R^2$ = -6.45% | Spatial $R^2$ = 59.65%
  • 0.10 px shift: Global $R^2$ = -314.51% | Spatial $R^2$ = -57.99% (Failed)
  • Insight: The modal reconstructor is exceedingly sensitive to alignment drift. Shifting the image by just 0.05 pixels degrades accuracy to 59.65%. This is because a uniform subaperture shift acts as a massive artificial Tip/Tilt error. This highlights the absolute necessity of active optical stabilization or real-time reference slope updating.

12. Visualizations

3D Wavefront Phase Reconstruction

A live playback of the 55-mode Zernike reconstructor translating Shack-Hartmann spot displacements into a continuous 3D phase surface over the telescope pupil.

3D Wavefront Reconstruction

Deformable Mirror Actuator Surface

The corresponding physical actuator strokes on the 357-actuator continuous facesheet Deformable Mirror, computed directly from the Zernike coefficients via the DM influence coupling matrix.

DM Actuator Surface

Shack-Hartmann Wavefront Sensor Spot Field

The focal-plane image produced by the microlens array. Each bright spot corresponds to one valid subaperture. Displaced spots indicate local wavefront tilt due to turbulence. The C-Engine processes this raw image and extracts 316 spot positions via Center of Gravity.

SH-WFS Spot Field

Zernike Tracking Comparison Plot

The comparison tracking chart below shows the C-Engine live output (dashed lines) overlaying the ground-truth coefficients (solid black lines) for the Tip (Z2) and Tilt (Z3) modes over a 100-frame sequence:

Zernike Tracking Comparison

Robustness Analysis Plot

The performance degradation curves for photon noise, readout noise, and sub-pixel alignment shift:

Robustness Analysis curves

Zernike Polynomial Reference Library

This visual reference library contains all 55 Zernike modes reconstructed by the C-Engine (radial orders $n = 0$ to $9$ in Noll indexing). Each cell shows the localized phase aberration oscillating in amplitude ($\pm 1.0$ normalized) over a circular telescope pupil boundary (shown in dark gray).

Z1
Z00

Piston
Z2
Z1+1

Tip X (horizontal)
Z3
Z1-1

Tilt Y (vertical)
Z4
Z20

Defocus
Z5
Z2-2

Astigmatism 45°
Z6
Z2+2

Astigmatism 0°
Z7
Z3-1

Coma Y (vertical)
Z8
Z3+1

Coma X (horizontal)
Z9
Z3-3

Trefoil Y (vertical)
Z10
Z3+3

Trefoil X (horizontal)
Z11
Z40

Spherical Aberration
Z12
Z4+2

Secondary Astigmatism 0°
Z13
Z4-2

Secondary Astigmatism 45°
Z14
Z4+4

Tetrafoil Y (vertical)
Z15
Z4-4

Tetrafoil X (horizontal)
Z16
Z5+1

Secondary Coma Horizontal
Z17
Z5-1

Secondary Coma Vertical
Z18
Z5+3

Secondary Trefoil Horizontal
Z19
Z5-3

Secondary Trefoil Vertical
Z20
Z5+5

Pentafoil Horizontal
Z21
Z5-5

Pentafoil Vertical
Z22
Z60

Secondary Spherical
Z23
Z6-2

Tertiary Astigmatism Y
Z24
Z6+2

Tertiary Astigmatism X
Z25
Z6-4

Secondary Tetrafoil Y
Z26
Z6+4

Secondary Tetrafoil X
Z27
Z6-6

Hexafoil Y
Z28
Z6+6

Hexafoil X
Z29
Z7-1

Quaternary Coma (Sine)
Z30
Z7+1

Quaternary Coma (Cosine)
Z31
Z7-3

Tertiary Trefoil (Sine)
Z32
Z7+3

Tertiary Trefoil (Cosine)
Z33
Z7-5

Secondary Pentafoil (Sine)
Z34
Z7+5

Secondary Pentafoil (Cosine)
Z35
Z7-7

Heptafoil (Sine)
Z36
Z7+7

Heptafoil (Cosine)
Z37
Z80

Tertiary Spherical
Z38
Z8+2

Quaternary Astigmatism (Cosine)
Z39
Z8-2

Quaternary Astigmatism (Sine)
Z40
Z8+4

Tertiary Tetrafoil (Cosine)
Z41
Z8-4

Tertiary Tetrafoil (Sine)
Z42
Z8+6

Secondary Hexafoil (Cosine)
Z43
Z8-6

Secondary Hexafoil (Sine)
Z44
Z8+8

Octafoil (Cosine)
Z45
Z8-8

Octafoil (Sine)
Z46
Z9+1

Quinary Coma (Cosine)
Z47
Z9-1

Quinary Coma (Sine)
Z48
Z9+3

Quaternary Trefoil (Cosine)
Z49
Z9-3

Quaternary Trefoil (Sine)
Z50
Z9+5

Tertiary Pentafoil (Cosine)
Z51
Z9-5

Tertiary Pentafoil (Sine)
Z52
Z9+7

Secondary Heptafoil (Cosine)
Z53
Z9-7

Secondary Heptafoil (Sine)
Z54
Z9+9

Nonafoil (Cosine)
Z55
Z9-9

Nonafoil (Sine)

13. Installation and Setup

Prerequisites

  • Python 3.9+
  • gcc (any version supporting C99)
  • Unix-like OS (Linux, macOS)

Step 1: Clone the Repository

Clone this repository with its submodules (required for OOPAO and MSHWFS dependencies):

git clone --recurse-submodules https://github.com/Deeven-Seru/project-radius.git
cd project-radius

Step 2: Set Up the Python Environment

We recommend creating an isolated virtual environment.

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

(Note: If testing physical camera hardware, you must also install the GenICam wrapper: pip install harvesters)

Step 3: Compile the C-Engine

The C-Engine must be compiled locally to create the zero-copy shared library. The Makefile automatically detects your system architecture (Apple Silicon ARM64 vs Intel x86_64). On x86_64 systems, it will automatically enable AVX2/FMA vectorization for sub-millisecond latency.

cd src/c_engine
make
cd ../..

This produces build/c_engine.so.

Step 4: Generate Calibration Matrices & Dataset

Because large arrays and datasets are excluded from version control, you must synthesize the ground-truth OOPAO dataset and calibration matrices.

python scripts/export_gplus.py        # generates 55-mode g_plus.csv + dm_coupling.csv
python scripts/generate_dataset.py    # generates 500 400x400 .bmp frames + ground_truth.csv

Step 5: Run the Benchmarks and Tests

Live Playback Benchmark (1000 Hz real data test):

python scripts/live_camera_test.py --mode playback --frames 500 --fps 1000.0

Live Physical Simulation:

python scripts/live_camera_test.py --mode sim --frames 200

Robustness Analysis & Verification:

python scripts/robustness_analysis.py  # Evaluates noise/drift resilience
python scripts/compare_outputs.py      # Computes spatial/temporal R² metrics

14. Project Structure

.
├── data/
│   ├── dataset/
│   │   ├── frame_0000.bmp ... frame_0499.bmp   # 500 400x400 SH-WFS detector frames
│   │   ├── ground_truth.csv                    # OOPAO Zernike coefficients (500 x 55)
│   │   ├── valid_mask.csv                      # Binary subaperture validity mask (20x20)
│   │   ├── ref_slopes.csv                      # Flat wavefront reference slopes
│   │   ├── g_plus.csv                          # Pre-inverted interaction matrix (55 x 632)
│   │   └── dm_coupling.csv                     # DM influence function matrix (357 x 55)
│   └── comparisons/
│       ├── zernike_comparison.png              # Tracking comparison chart
│       └── robustness_analysis.png             # Noise/drift performance charts
│
├── src/
│   ├── core/
│   │   └── camera_interface.py                 # Simulated, Playback, and GenICam HAL
│   └── c_engine/
│       ├── Makefile                            # gcc build rules: produces build/c_engine.so
│       ├── geometry.h                          # LensletConfig struct definition
│       ├── slopes.c                            # Center of Gravity centroiding algorithm
│       └── mvm_reconstructor.c                 # Zernike MVM and DM actuator MVM
│
├── scripts/
│   ├── live_camera_test.py                     # Real-time console test harness (sim/playback/hardware)
│   ├── compare_outputs.py                      # Unbiased side-by-side accuracy report
│   ├── robustness_analysis.py                  # Noise/drift simulation sweep script
│   ├── generate_dataset.py                     # OOPAO physics simulation and BMP export
│   ├── export_gplus.py                         # Interaction matrix calibration and export
│   └── inspect_eris.py                         # Real FITS telemetry data inspector
│
├── tests/
│   └── test_genicam_interface.py               # Unit tests verifying GenICam wrapper API interactions
│
├── build/
│   └── c_engine.so                             # Compiled shared library
│
└── README.md

15. Future Work

The following extensions are identified for subsequent phases:

  1. Closed-Loop DM Control: Integrate the actuator stroke output into a real-time closed-loop DM driver. Implement an integrator gain controller to drive the residual wavefront error to zero over successive frames.
  2. Background subtraction thresholding: Add a configurable threshold filter in slopes.c to reject background pixels, mitigating readout noise degradation.
  3. Multi-core BLAS/OpenMP Acceleration: Link the C-Engine MVM loops to OpenMP or optimized BLAS (like OpenBLAS/MKL) to handle larger configurations ($80 \times 80$ subapertures) under a sub-millisecond budget.

16. Academic References & Literature

The mathematical and physical models implemented in the C-Engine are drawn from the foundational literature in adaptive optics:

  1. Fried, D. L. (1966). "Optical Resolution Through a Randomly Inhomogeneous Medium for Very Long and Very Short Exposures." Journal of the Optical Society of America, 56(10), 1372-1379. (Derivation of the atmospheric coherence length $r_0$).
  2. Noll, R. J. (1976). "Zernike polynomials and atmospheric turbulence." Journal of the Optical Society of America, 66(3), 207-211. (Theoretical variances of Zernike coefficients over Kolmogorov turbulence).
  3. Hardy, J. W. (1998). Adaptive Optics for Astronomical Telescopes. Oxford University Press. (Comprehensive review of Shack-Hartmann WFS and control matrix generation).
  4. Roddier, F. (1999). Adaptive Optics in Astronomy. Cambridge University Press. (SVD truncation strategies for interaction matrices).
  5. Taylor, G. I. (1938). "The Spectrum of Turbulence." Proceedings of the Royal Society of London. Series A, 164(919), 476-490. (Frozen-flow hypothesis used in estimating the coherence time $\tau_0$).

About

High-Performance Adaptive Optics C-Engine for Shack-Hartmann Wavefront Sensing - ISRO Compliant

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors