Repository navigation
makewfs 1.2.0
-
Fixed: phase input was reported as metres. With
input.quantity = "phase",OpticalResult.opd_mand the
wfs_input_opd_rms_mframe metadata held the raw phase in radians, so a
13 nm wavefront was recorded as 0.083 m. Both now carry the input converted
to OPD metres atinput.reference_wavelength_m. Images were never affected,
and OPD input is unchanged. -
Changed: generic optics helpers now come from
aocore.aocore>=0.1.2,<0.2moves
from thedevextra to a core dependency. Under CONVENTIONS.md §9, makewfs
now imports these primitives instead of keeping its own copies:
centered_coordinatesfor the pupil, field-stop and DFT detector grids;
ARCSEC_TO_RAD/RAD_TO_ARCSECfor source angles and the Shack-Hartmann
plate scale;opd_to_phase/phase_to_opdfor phase input and the sensor
phasors; andblock_sumfor pixel integration. No public name changes.
makewfs.sampling.block_sumkeeps its signature, error messages and
factor-two fast path, and delegates other factors to aocore. The behaviour
already followed the conventions. Float32 renders of the example
configurations are bit-for-bit unchanged, and float64 renders differ only by
floating-point rounding (at most about 6e-16 relative), from the changed
operation order in the angle and phase conversions and, for oversampling
factors above two, in pixel binning. The pupil masks, the
ArrayBackendand itsfftshift-convention centred FFTs stay local
because aocore has no equivalent for them; the module docstrings say why. -
Tests: conformance with the AO stack conventions.
tests/test_conformance.py
runs aocore's checks against both
sensors. Shack-Hartmann spots centre between pixels for a flat wavefront and
move towards +x for a +x OPD ramp, and pyramid images are centred
(CONVENTIONS.md 1.3 and 3.1).aocorejoins thedevextra. -
Fixed: magnitude-normalized photon rates ignored spiders, segment gaps and
custom masks. The rate came from the analytic annulus area
pi / 4 D^2 (1 - eps^2)and was then distributed over the sampled pupil's own
flux, so obstructions inside the annulus never removed photons. Both sensors
now scale a magnitude-normalized rate by the sampled pupil's clear fraction
of the annulus, exposed asengine.clear_aperture_fraction: about 0.96 for
four 2 % wedge spiders, and exactly 1 for a plain annulus, so such
configurations are unchanged. Directdetector_photon_ratesources are never
rescaled; the Keck HAKA example already computes its rate from the masked
area and is unaffected. -
Fixed: Shack-Hartmann flux creation and ghost spots for wide subaperture
windows (#4). A lenslet
field sampled atspoints per lenslet has a far field that repeats every
slensletlambda/d; when the detector window
pixels_per_subaperture / spot_sampling_pixels_per_lambda_over_dexceeded
s, the sampled DFT summed the replicas as light. A 20x20 sensor with 4
pixels at 0.25 pixel perlambda/dand 6 pupil samples per lenslet returned
8.6 times the configured photon rate (79 times for 16 pixels at 0.32), and
tilts beyond+-s/2 lambda/daliased to the wrong side. Each lenslet field is
now propagated on the smallest integer refinement of the configured pupil
grid that is at least as fine as the widest window, evaluated at the shortest
configured wavelength and bounded by any field stop. The configured grid,
custom masks, and lenslet illumination are unchanged; the OPD is interpolated
linearly onto the refined grid. Configurations that already satisfied the
rule are bit-for-bit unchanged, and the CPU reference path and the compiled
CUDA executor share the fix. The engine reportspupil_samples_per_lenslet,
field_upsampling,samples_per_lenslet, and
detector_window_lambda_over_d; see the new "Lenslet-field sampling"
section of the Shack-Hartmann guide.The Keck HAKA example changes. Its 4 samples per lenslet were below the
4.4lambda/dwindow at 673 nm and the 7.2lambda/dwindow at its 411 nm
quadrature node, which captured 1.56 times the light at that node and 1.06
times the configured rate overall at zero OPD. It now propagates at 8 samples
per lenslet and captures 0.93 (about 12% less signal; warm optical render
1.29 to 1.66 ms on GPU, 671 to 751 ms on CPU). The checked-in HAKA
real-versus-simulation and LUT artifacts were produced before this fix and
have not been regenerated.