An index organised by what you want to do, not by operator name.
One entry is one file under docs/capabilities/, and every entry is tied
to operators that exist and to an example that actually runs —
tests/test_capabilities.py checks each operator name against all four
public tiers and each example against the files on disk, so a capability
claim with nothing behind it cannot survive.
To add one: write docs/capabilities/<id>.md and run
py -3.11 tools/gen_capabilities_index.py (this index is generated —
do not edit it by hand).
Currently 97 capabilities
Every operator exists in the registry and the types connect from one step to the next (tests/test_capabilities.py checks both; only four sort names are treated as synonyms: image2d=image, mask=region, measurement=feature=scalar). Values passed as arguments are outside the type chain. Alternatives, limits and calibration are in each entry.
| Task | Recommended pipeline (in order) | Runnable |
|---|---|---|
| Align and stack | align_frames → drizzle_resample → frame_quality |
poc_astro_photometry |
| Beamform for direction, separate range from velocity | beamform_doa → range_doppler_map → range_doppler_peaks |
poc_multibeam_bathymetry |
| Segment regions, select them, and count | auto_threshold → blob_label → blob_select → blob_features |
poc_cell_counting |
| Chromatic confocal displacement sensor (glass dispersion, calibration table, return spectrum, height and thickness) | chromatic_confocal_probe → chromatic_confocal_spectrum → chromatic_confocal_peaks → chromatic_confocal_readout |
poc_chromatic_confocal |
| Measure colour (XYZ / Lab / colour difference) | rgb_to_lab → delta_e_2000 |
poc_white_balance |
| Run inter-reflections, multiple scattering and iterations to convergence — return the evidence and the remaining error, and no value when it did not converge | iterate_fixed_point → conv_gci |
converge_tour |
| Separating crop from weeds in field RGB by colour and texture, and grading weed cover at declared edges (no learned network) | superpixel_color_texture_features → fisher_lda_fit → fisher_lda_score → cover_ratio_grade |
poc_weed_rice_ratio |
| Separate thickness from material with two X-ray energies (dual-energy and photon-counting X-ray: spectrum, energy windows, basis decomposition, effective Z) | xray_tube_spectrum → photon_counting_channels → basis_decomposition_crlb → basis_material_decompose → effective_z_map |
poc_dual_energy_xray |
| Turn results into figures people can read | annotate_figure_grid → annotate_panel_label → annotate_scale_bar → annotate_colorbar |
poc_colormap_readability |
| Fourier ptychography (oblique LED illumination, phase retrieval to a high-NA amplitude and phase, refused unless it converges) | fp_design → fp_stack_from_images → fp_reconstruct → fp_element_contrast |
poc_fourier_ptychography |
| Put measurements on the Earth (ECEF, height frames, local ENU) | dem_geodetic_to_ecef → dem_ecef_to_geodetic |
poc_geodetic_height_frames |
| Flag what differs from aligned good samples (a per-pixel variation model with a declared false-alarm rate) | varmodel_alignment → varmodel_fit → varmodel_calibrate → varmodel_score |
poc_good_sample_variation_model |
| Grating interferometry (Talbot / Talbot-Lau): transmission, differential phase and dark field from one phase-stepping scan | talbot_grating_design → talbot_source_visibility → grating_step_period_estimate → grating_three_image_retrieve → darkfield_scatter_relation → dpc_integrate |
poc_grating_interferometry |
| Grating spectrometer and microscope illumination (bandwidth, smile and keystone, Koehler and critical illumination, coaxial half mirror) | czerny_turner_design → spectrometer_bandpass → spectrometer_spectrum |
poc_spectrometer_illumination |
| Illumination cone versus imaging NA on specular parts (cap intersection, slope bands, dents, scratches and satin) | solid_angle_light → solid_angle_boundaries → solid_angle_sweep → solid_angle_brightness → solid_angle_render |
poc_illumination_cone_vs_na |
| Industrial OCT (spectral interferogram, k-linearisation, dispersion compensation, A/B-scans, layer thickness via the group index) | oct_design → oct_from_spectra → oct_bscan → oct_bscan_boundaries → oct_bscan_flatten → oct_layer_thickness |
poc_industrial_oct |
| Inner diameter of a round part, all the way to millimetres | gaussian → otsu → area_center → create_metrology_model → add_metrology_object_circle_measure → apply_metrology_model → mm_per_px_from_reference → pixel_to_world |
example_inner_diameter_mm |
| Count interreflection in concave parts to convergence without losing the photometric truth (3-D view factors, progressive radiosity, an inspection render with bounces) | radiosity_patches → form_factor_matrix |
poc_pocket_interreflection |
| Draw lines and regions without knowing the background colour | annotate_invert_visibility → annotate_invert → annotate_invert_path |
annotate_paper_tour |
| Indirect time-of-flight (phase-based): multi-frequency unwrapping and how it breaks (wrapping, multipath, flying pixels, harmonics, ambient light) | itof_noise_budget → itof_capture → itof_phase_amplitude → itof_unwrap_multifreq |
poc_itof_multifreq |
| Lens design files (read, write and triage sequential .zmx prescriptions) | lens_file_read → lens_file_system → paraxial_trace → spot_stats → lens_file_write |
poc_lens_file_roundtrip |
| Budget lens manufacturing tolerances by MTF and yield | tolerance_table → tolerance_criteria → tolerance_sensitivity → tolerance_monte_carlo → tolerance_report |
poc_lens_tolerancing |
| Per-pixel lock-in demodulation (time-correlation imaging: amplitude, phase and DC; ring-light normals, coded-light separation, thermal waves) | lockin_ring_synthesize → lockin_demodulate → lockin_ring_normals |
poc_lockin_imaging |
| Moiré alignment (two gratings of slightly different pitch, fringe phase, nanometre shift, differential pairs and the Talbot gap) | moire_magnification → moire_mark_read → moire_phase_crlb |
poc_moire_alignment |
| Sorting look-alike foreign matter with NIR hyperspectral imaging (material absorption bands, scattering-layer reflectance, InGaAs band electrons) | material_nir_absorption → kubelka_munk_reflectance → hyperspectral_capture |
poc_hyperspectral_foreign_matter |
| Non-coaxial optics (fold mirrors, beamsplitters, tilted plates, Scheimpflug and ghosts) | noncoaxial_system → noncoaxial_trace → image_orientation → ghost_analysis → noncoaxial_drawing |
poc_noncoaxial_optics |
| OCR pre-processing (deskew, local binarisation, line extraction) | median → rotate_image → sk_sauvola → invert_region → remove_small → select_shape → dilation_rectangle1 |
gallery2d_segmentation |
| Compute reflection, refraction and interference | fresnel_dielectric → thin_film_reflectance → thin_film_rgb |
glass_and_mirror_optics |
| Optical drawings (lens layouts, vision-setup drawings and ISO 10110 element drawings as SVG / DXF) | lens_section_drawing → drawing_svg → drawing_dxf → svg_entities → dxf_entities |
poc_optics_drawings |
| Flag patches that leave what good samples look like (classical features, a normal distribution per position or a memory bank, and a recall-guaranteeing operating point) | patchbank_fit → patchbank_score |
poc_patch_anomaly |
| Periodic defects in a 1-D signal | smooth_funct_1d_gauss → bandpass → spectrum → find_peaks → peak_subbin → envelope → local_min_max_funct_1d |
poc_web_roll_periodicity |
| Find micrometre dents on glossy surfaces from the mirror image of a fringe screen (phase-measuring deflectometry) | deflectometry_rig → deflectometry_sensitivity → wrapped_phase → absolute_phase → deflectometry_phase_to_slope → slope_to_curvature |
poc_phase_measuring_deflectometry |
| Measure stress by photoelasticity (stress field, fringes, polarisation images, retardation and axis) | polarization_demosaic → photoelastic_phase_estimate |
poc_photoelasticity |
| Photographing a 3-D scene through the actual lens prescription (depth of field, cat’s-eye bokeh, corner illumination, colour fringes, ghosts) | lens_system → lens_scene → render_scene_through_lens → render_compare_prescriptions |
poc_photograph_through_prescription |
| Pixel-shift imaging (full colour from 1-pixel shifts, no aliasing from half-pixel shifts, and where it breaks) | pixel_shift_resolution_budget → pixel_shift_pattern → pixel_shift_capture → pixel_shift_motion_mask → pixel_shift_merge → false_color_metric |
poc_pixel_shift |
| Flatness of a surface from a 3-D point cloud | statistical_outlier_removal → ransac_plane → fit_plane_3d → distance_point_plane |
geometry_metrology |
| Prescription-based plenoptic camera | mla_surface → plenoptic_system → plenoptic_capture → plenoptic_mla_calibrate → plenoptic_decode → plenoptic_refocus_depth |
poc_plenoptic_camera |
| Draw a point cloud as a colour picture | points_render |
points_render_basics |
| Find small point-like targets and locate them below the pixel | noise_sigma → star_detect → find_peaks → peak_subbin |
poc_search_sweep_width |
| Remove specular reflection from a four-angle polariser sweep (dielectrics vs metals) | polarization_dolp_map → polarization_separate → polarization_stokes → stokes_analyze → specular_diffuse_split |
example_polarization_metal |
| Reuse validation, neighbourhoods and transform kernels | polarization_separate |
perf_pointcloud_descriptors |
| Template matching that survives uneven light, highlights and occlusion (compare the direction of brightness change as codes, and refuse templates that cannot fix a position) | isc_match → ocm_match |
poc_code_matching_breakdown |
| A mean line that deep scratches and spikes cannot drag (robust Gaussian-regression and spline filters, for profiles and surfaces) | robust_gaussian_profile → profile_params |
poc_robust_profile_filter |
| Detect fine scratches and measure their width | gaussian → lines_gauss → select_contours → fit_line_contours → gen_measure_rectangle2 → measure_pairs → table_px_to_mm |
example_scratch_width |
| Measure the same particles in scanning and transmission images and compare both size biases | sem_render → tem_power_spectrum |
poc_sem_tem_same_particle |
| Sequential lens-design metrics (ideal lens surface, encircled energy, tangential / sagittal MTF, through-focus MTF) | lens_system → psf_from_opd → encircled_energy → energy_radii → mtf_tangential_sagittal → through_focus_mtf |
optical_design_metrics |
| Fit a physical model’s coefficients to real images (sim-to-real calibration) — no number for a coefficient the images do not determine, the determined combination and the reason instead | simcal_model → simcal_observe → simcal_fit → simcal_identifiability → simcal_report |
simcal_tour |
| Measure dimensions from an image, below the pixel | gen_measure_rectangle2 → measure_pos → measure_pairs → table_px_to_mm |
poc_dimensional_inspection |
| Surface relief defects, from lighting design to detection | illumination_design → lighting_sweep → light_source → defect_contrast → irradiance_map → illumination_uniformity → photometric_stereo → integrate_normals → surface_form_error → bothat → auto_threshold → remove_small |
illumination_design_demo |
| TDI line-scan cameras and line-scan lenses (stages and SNR, synchronisation MTF, illumination and MTF across the image height) | tdi_snr → tdi_sync_mtf → linescan_lens_example → lens_field_profile → linescan_lens_columns → linescan_acquire |
poc_tdi_linescan |
| Telecentric lenses for dimensional metrology (chief-ray angle, magnification versus height, vignetting and blur) | telecentric_lens → chief_ray_angle → telecentricity_error → magnification_vs_depth → defocus_spot_vs_depth → vignetting_vs_field |
poc_telecentric_metrology |
| A virtual transmission electron microscope (electron wavelength, CTF, phase-contrast images, defocus from Thon rings, correction) | tem_power_spectrum → tem_ctf_estimate → tem_ctf_correct |
poc_tem_ctf_thon_rings |
| Locate a part by template matching and move the measurement model with it | gaussian → ncc_locate → shape_locate → create_metrology_model → add_metrology_object_circle_measure → align_metrology_model → apply_metrology_model |
poc_template_tracking |
| Slope, flow and line of sight on a terrain | dem_fill_sinks → dem_slope → dem_aspect → dem_flow_direction → dem_viewshed |
poc_dem_terrain |
| Put text and tables exactly where you want them on an image | measure_text → annotate_text_path_layout → annotate_text_path → annotate_table_layout → annotate_table |
annotate_paper_tour |
| Thin-film thickness by spectral reflectometry (transfer matrix, interference colour, FFT, model fit, thickness maps) | multilayer_reflectance → film_thickness_fft → film_thickness_fit → film_thickness_map |
poc_thin_film_reflectometry |
| Measuring one 3-D scene with indirect and direct time of flight | itof_capture → itof_phase_amplitude → itof_unwrap_multifreq → bilateral_filter_depth → depth_to_points |
poc_tof_camera |
| Reconstruct slices from projections (CT) | radon_transform → ring_artifact_remove → beam_hardening_correct → fbp_volume → vol_rle_components → vol_rle_volume |
poc_ct_fidelity |
| Diagnose faults from vibration and sound | bandpass → envelope → envelope_spectrum → find_peaks → bearing_defect_frequencies |
poc_bearing_diagnosis |
| A virtual SEM — solve the electron-solid interaction by Monte Carlo and see, scored against measured data, how voltage, detector and charging change the image and the measured line width | material_electron_properties → sem_electron_mc → sem_line_profile → sem_cd_measure → sem_image |
poc_virtual_sem_kv_cd_bse |
| Carve a solid out of silhouettes (visual hull) | synthesize_silhouette → visual_hull → vol_rle_components → vol_rle_volume |
space_carving |
| Turn a 3-D scan into a volume | vol_rle_components → vol_rle_volume → mesh_volume |
poc_stockpile_volume |
| How water looks in inspection images (caustics on a pool floor, a bottle seen from the side with its fill line, a wet surface, a hull seen through water) | caustic_irradiance → caustic_floor_segmentation |
poc_water_inspection_images |
| Water and transparent media (ocean waves, Fresnel and refraction at the surface, colour and scattering under water, a bottle as a lens) | ocean_height_field → refracted_view → water_attenuation → underwater_image |
poc_water_transparent_media |
33 entries do not have the recipe fields (pipeline / alternatives / limits / calibration) yet — see each entry below; they are named in gen_capabilities_index.NO_RECIPE_YET.
camera_calibration(object_points, image_points_list) estimates the intrinsic matrix K (fx, fy, cx, cy, skew) from several views of a planar target seen at different tilts, by Zhang’s method (two constraints per view collected from the plane homographies). object_points are (x, y) on the plane; image_points_list are the (row, col) correspondences per view. It returns K plus the per-view homographies, per-view reprojection RMS, and orientation_rank_ratio — how strongly the view orientations constrain K. The recovered K feeds estimate_distortion, undistort_image, PnP and triangulation. Two honest caveats it carries: the plane must be tilted between views or the intrinsics are unconstrained (a degeneracy the code detects and refuses), and reprojection error does not reveal a bad view geometry — focal length and target distance trade off almost invisibly in the image (the poc_camera_calibration example quantifies this). fail-closed on fewer than three views, mismatched point counts, degenerate orientation, or a non-finite / non-positive K.
Operators: camera_calibration, estimate_distortion, intrinsic_matrix, decompose_intrinsics
Runnable: camera_intrinsics_calibration
Draw complex analysis as an area rather than a curve: the value field of a rational function, its domain colouring, Newton’s basins, escape time, and potential flow past a Joukowski aerofoil. None of the pictures is judged by eye. The winding of the field is counted by this family’s existing cplx_winding_number (+3, +1, -2 as the zeros and poles say); the hue winding in the rendered image recovers the order of a zero from pixels alone; Cayley’s 1879 theorem gives the degree-2 basins in closed form and all 262,144 pixels agree; the main cardioid and period-2 bulb prove interiority without iterating (zero counterexamples, and honestly only 90.1 % of what actually stays); the flow field is holomorphic so cplx_cr_residual reads 2.06e-04; and the lift exceeds thin-aerofoil theory by exactly the thickness ratio a/b.
Operators: cplx_plane_grid, cplx_rational_field, cplx_domain_colour, cplx_newton_basins, cplx_escape_time, mandelbrot_interior, potential_flow_joukowski, joukowski_circulation
Runnable: poc_complex_plane_fields
sampling_alias_distance gives the closed-form distance beyond which a period P aliases on a lattice of pitch Δφ (P cos²θ/(√3 Δφ) for hexagonal, 2Δφ for square) and the contrast left at Nyquist — the working-distance rule of an inspection camera once Δφ is read as the pixel IFOV. fly_view_plane_texture integrates a periodic frontal surface analytically under the hexagonal ommatidial lattice and a Gaussian acceptance function (no resampling); fed to the HR correlator it shows where the sign flips. fly_expansion_readout reads τ from the flow over the whole eye and shows the aperture effect of vertical stripes returns exactly 2τ. traj_tau_dot gives distance, closing speed, τ and τ̇ along a measured 3-D trajectory. fly_vogel_lattice and lattice_moire_peak compare a Fibonacci (Vogel-spiral) eye with the hexagonal one at the same count and mean spacing: sharp moire versus diffuse noise, best sub-Nyquist resolution for the hexagon, and false flow set by pair spacing rather than by lattice regularity.
Operators: sampling_alias_distance, fly_view_plane_texture, fly_expansion_readout, fly_vogel_lattice, lattice_moire_peak, traj_tau_dot, fly_t4t5_field, fly_tau_from_expansion
Runnable: poc_zebra_stripes_fly_eye
The PoC’s lead figure places 640 x 480 dark, flat and saturated frames at native scale, making the 1 DN row, 1.5 DN column and 4 DN pixel fixed pattern—and nine planted defective pixels—visible before reporting aggregate metrics.
Operators: emva_pair_statistics, emva_photon_transfer, emva_quantum_efficiency, emva_spatial_nonuniformity, emva_highpass, emva_spectrogram, emva_ptc_linearity_check, emva_bspline_regression, emva_noise_whiteness, emva_filter_distortion, emva_general_sensitivity, emva_general_nonuniformity, emva_general_relative_qe
Runnable: poc_emva1288_sensor, poc_emva1288_in_camera_processing
The upstream of undistort_image: it measures the Brown–Conrady coefficients instead of taking them as given. From point lists sampled along features that are straight in the world (lines, each (N_i, 2) in (x=col, y=row)) plus the intrinsics K, estimate_distortion returns dist = [k1, k2, p1, p2, k3] ready for undistort_image / undistort_points. It is the plumb-line method (Brown 1971; Devernay–Faugeras 2001): minimize, over the coefficients, the summed perpendicular scatter of the undistorted lines, so lines that are straight in the world become straight once distortion is removed. No correspondences, no calibration board, no known spacing — only that each line is straight (the line-pattern idea Discorpy uses). The principal point of K is the distortion centre and is held fixed (the method cannot separate it from p1, p2). radial in {1, 2, 3} frees k1; k1, k2; or k1, k2, k3; tangential frees p1, p2. On clean synthetic lines the coefficients come back to machine precision; with pixel noise they degrade gracefully. Requires SciPy. fail-closed on fewer than two lines or a line with fewer than three points.
Operators: estimate_distortion, undistort_image, distort_points, undistort_points
Runnable: estimate_lens_distortion
Six ops in fourierptycho for Fourier ptychographic microscopy: closed-form design numbers before measuring (synthetic NA, coherent cut-off period, overlap ratio of neighbouring pupils against the published 35 % minimum, LED count, camera sampling Δx ≤ λ/(2 NA_obj) and LEDs sitting on the bright-/dark-field boundary), a simulator of the image set under oblique LED illumination (LED fall-off, dark-field exposure, shot and read noise, pupil aberrations, LED array misalignment, reflective height to round-trip phase), an entry point for measured image sets, a sequential phase retrieval with joint pupil recovery (EPRY form, projected on low-order polynomials by default) and LED position correction, and a USAF 1951 target with an element-by-element read-out. The reconstruction returns its convergence history, the reason it stopped and the synthetic NA, and refuses (raises a MetricContractError carrying the record) unless the residual has stalled and two different starting points agree.
Operators: fp_design, fp_usaf_target, fp_capture, fp_stack_from_images, fp_reconstruct, fp_element_contrast
Pipeline: fp_design → fp_stack_from_images → fp_reconstruct → fp_element_contrast
Alternatives: fp_capture, fp_usaf_target, coherent_image
Runnable: poc_fourier_ptychography
Convert geodetic coordinates to Earth-centred Cartesian (ECEF), to a local ENU frame, and between datums; convert between the two kinds of height (ellipsoidal h from GNSS and orthometric H used by maps) through a published geoid grid, and measure the residual h - H - N that exposes a height-frame mix-up. Checked against 523 published NGS survey marks: ECEF agrees with the published Cartesian coordinates to 0.5 mm rms, bilinear interpolation of a 0.25-degree GEOID18 grid lands within 11.1 cm rms of the published point values, and using h as if it were H shifts the answer by 16.75 m (median) in that region.
Operators: dem_geodetic_to_ecef, dem_ecef_to_geodetic, dem_geoid_height, dem_height_frame_convert, dem_height_frame_residual, dem_datum_shift_3param, dem_enu_from_geodetic, dem_geodetic_from_enu
Pipeline: dem_geodetic_to_ecef → dem_ecef_to_geodetic
Alternatives: dem_geoid_height, dem_height_frame_convert, dem_height_frame_residual, dem_enu_from_geodetic, dem_geodetic_from_enu, dem_datum_shift_3param, dem_geodetic_slope
Runnable: poc_geodetic_height_frames, poc_geodetic_benchmarks_real, dem_geodesy_tour
Eight ops in gratinginterf for grating-based phase-contrast and dark-field imaging: closed-form geometry (fractional Talbot distances for π, π/2 and absorption gratings, cone-beam distance and analyser period, the Lau source-grating period), the Talbot carpet behind a binary grating as a sum over diffraction orders, the visibility loss from source size and source gratings, a forward model of phase-stepping stacks with Poisson noise, estimation of the number of steps per period from the sine-fit residual, retrieval of transmission, differential phase and dark field from sample and reference stacks, conversion of dark field to a Gaussian scattering width, and integration of the differential phase into the wavefront phase and projected thickness (refusing wrapped input). The PoC finds a 2 µm crack in a short-fibre composite plate in the dark field (CNR 13.5 against 1.34 in absorption), recovers fibre orientation from four grating directions, and separates the three images of a public CC BY 4.0 Talbot-Lau dataset.
Operators: talbot_grating_design, talbot_carpet, talbot_source_visibility, grating_stepping_simulate, grating_step_period_estimate, grating_three_image_retrieve, darkfield_scatter_relation, dpc_integrate
Pipeline: talbot_grating_design → talbot_source_visibility → grating_step_period_estimate → grating_three_image_retrieve → darkfield_scatter_relation → dpc_integrate
Alternatives: talbot_carpet, grating_stepping_simulate, wrapped_phase, moire_talbot_gap, angular_spectrum_propagate
Runnable: poc_grating_interferometry
Thirteen ops in octscan for optical coherence tomography of coatings, conformal coats, adhesive layers and multilayer films: closed-form design numbers before measuring (axial resolution, depth range, sensitivity roll-off, shot-noise-limited SNR, lateral resolution and depth of focus), a simulator of spectral interferograms from a layer stack whose indices and dispersion come from the material table (field sum, so cross-correlation, autocorrelation and DC terms are all present; spectrometer or swept source), k-linearisation, numerical dispersion compensation with closed-form or estimated coefficients, A-scans with windowing, DC removal and full-range quadrature, B-scans, and measurement: interface peaks to optical and physical thickness through the group index (refusing layers that cannot be separated or seen), dynamic-programming boundary tracing on cross-section images, surface flattening, and an entry point for raw spectra from instruments and public data. The PoC processes public raw spectra of automotive paint panels (CC BY 4.0) and compares the layer thicknesses with the paper’s ultrasonic and microscope values.
Operators: oct_design, oct_dispersion_broadening, oct_interferogram, oct_bscan_simulate, oct_from_spectra, oct_k_linearize, oct_dispersion_estimate, oct_dispersion_compensate, oct_ascan, oct_bscan, oct_layer_thickness, oct_bscan_boundaries, oct_bscan_flatten
Pipeline: oct_design → oct_from_spectra → oct_bscan → oct_bscan_boundaries → oct_bscan_flatten → oct_layer_thickness
Alternatives: oct_interferogram, oct_bscan_simulate, oct_ascan, oct_dispersion_estimate, material_group_index, csi_design
Runnable: poc_industrial_oct
Bore, ring and pin diameters end to end: a coarse centre, a sub-pixel circle fit on radial measurement lines, a calibration from a reference of known size, and the result in millimetres. The last two steps exist as typed operators because an assistant working from the notes alone stopped at pixels.
Operators: add_metrology_object_circle_measure, apply_metrology_model, mm_per_px_from_reference, pixel_to_world
Pipeline: gaussian → otsu → area_center → create_metrology_model → add_metrology_object_circle_measure → apply_metrology_model → mm_per_px_from_reference → pixel_to_world
Alternatives: gen_measure_arc, measure_pos, hx_fit_circle_contour, cv_hough_circles, hough_circle_trans, table_px_to_mm
Runnable: example_inner_diameter_mm, poc_dimensional_inspection, poc_real_coin_metrology
Eight ops in itof (category itof of opsoptics) take continuous-wave indirect time of flight from raw phase-step buckets to depth and into its failure modes: a capture model with shot and read noise, sine or square modulation, extra light paths and pixel-aperture mixing; K-step phase, amplitude and offset with a per-pixel noise estimate; the closed-form depth noise; multi-frequency unwrapping by exhaustive maximum-likelihood hypotheses, by residue.residue_crt or by the two-frequency beat, plus an upper bound on the wrong-order probability; two-path separation from equally spaced frequencies (matrix pencil); a flying-pixel mask; and correction of the square-wave cyclic error. The PoC scores noise, unwrapping, aliasing beyond the unambiguous range, a translucent film over a box, a room corner (matching lighttransport), flying pixels, the cyclic error and sunlight against closed forms and existing ops, compares the same scene with direct ToF from photoncount, and, when the public raw multi-frequency data (CC BY 4.0) is present, checks the unwrapping against its ground truth.
Operators: itof_capture, itof_phase_amplitude, itof_noise_budget, itof_unwrap_multifreq, itof_unwrap_error_rate, itof_multipath_separate, itof_flying_pixel_mask, itof_wiggling_correct
Pipeline: itof_noise_budget → itof_capture → itof_phase_amplitude → itof_unwrap_multifreq
Alternatives: dtof_cube_simulate, dtof_cube_depth, tof_transport_depth, residue_crt
Runnable: poc_itof_multifreq
Coherent imaging of rough surfaces under laser light: an amplitude/phase object through the coherent transfer function (verified against Bessel closed forms to 1e-12), laser speckle from a random phase screen with finite roughness, polarisation and pattern diversity and pixel integration, speckle statistics (contrast, Kolmogorov–Smirnov against the exponential and gamma laws, autocorrelation width compared with the Airy pattern), a speckled sheet-of-light laser line, and the speckle-limited height uncertainty of triangulation, δz = C·λ/(2π sin u sin θ). The exponents (+1 in wavelength, −1 in the observation aperture and the triangulation angle) are gated against centroids measured on rendered lines; the constant is disclosed (measured / formula = 0.84–0.91), because the primary paper’s text was not available to check its 2π factor. Static speckle does not average away over frames; a moving part does, as 1/√N.
Operators: coherent_image, speckle_field, speckle_statistics, laser_line_coherent, triangulation_speckle_limit, speckle_reduction
Runnable: poc_laser_line_speckle_floor
Global light transport for concave Lambertian parts and its effect on active 3-D: an explicit light-transport matrix for an extruded concave cross-section (Hottel’s crossed-strings form factors, checked against the V-groove closed form 1 − sin(θ/2) and against quadrature of the 2-D kernel to 1e-14; radiosity T = (I − diag(ρ)F)^-1 diag(ρ), or its Neumann partial sum by bounce count); shifted high-frequency patterns and the Nayar et al. (2006) L_max / L_min separation into direct and global images (general fill α, black level b, pattern-plus-complement); the fringe phase as the argument of the direct-plus-global phasor sum, predicted per pixel from the transport matrix and matching the phase decoded from rendered fringes by fringe.wrapped_phase to 1e-15 rad; a micro phase-shifting decoder (Gupta & Nayar 2012) that orders narrow-band high-frequency fringes by their beat; and AMCW time-of-flight multipath, both as a phasor sum and as complex radiosity with per-bounce path delay. On a white 1 mm, 0.5 mm deep 90° V-groove, one fringe across a 4 mm field misreads height by 282 µm RMS; the micro set brings it to 0.76 µm.
Operators: groove_profile, form_factors_2d, transport_matrix_radiosity, high_frequency_patterns, render_transport, separate_direct_global, fringe_multipath_phase_error, predict_fringe_phase_error, micro_phase_decode, tof_multipath_phase, tof_transport_depth
Runnable: poc_interreflection_fringe_error
Nine ops in lockin (category lockin of opsoptics): per-pixel quadrature demodulation of an image sequence against a sinusoidal reference, returning amplitude, phase, DC, in-phase, quadrature and the window leakage; the window is declared (rectangular only for a whole number of periods, otherwise refused; hann reports its leakage). Closed-form amplitude and phase noise from the SNR (Rice phase distribution), a multipole-modulated ring of sources on a Lambertian relief and the normals recovered from its first-harmonic response with the albedo cancelled, Walsh codes and a least-squares separation of coded lights from daylight, and the exact surface temperature of a periodically heated plate for lock-in thermography.
Operators: lockin_demodulate, lockin_amplitude, lockin_phase, lockin_noise_floor, lockin_walsh_codes, lockin_separate, lockin_ring_synthesize, lockin_ring_normals, lockin_thermal_wave
Pipeline: lockin_ring_synthesize → lockin_demodulate → lockin_ring_normals
Alternatives: lockin_amplitude, lockin_phase, lockin_separate, lockin_walsh_codes, lockin_noise_floor, lockin_thermal_wave
Runnable: poc_lockin_imaging
Separate how much of a number comes from the parts and how much from the act of measuring, then combine the components of a single measurement into a reportable uncertainty. Every operator is a closed-form standards model with an exact identity to check it against. The analysis-of-variance decomposition closes algebraically (SS_total = SS_part + SS_operator + SS_interaction + SS_error, relative difference 1e-16); repeatability equals the mean of the per-cell np.var(ddof=1) that numpy computes independently; the published worked example (10 parts x 3 operators x 3 trials) is reproduced to 1.5e-06 on EV/AV/GRR/PV with contribution percentages 3.4/4.4/7.8/92.2 exactly. Whether the interaction is kept or pooled into error moves EV by 7.3 %, so the model actually used is reported (interaction_pooled, interaction_p), and a negative variance component — which happens in 31 of 40 synthetic runs when the true component is zero — is clamped to zero but declared rather than hidden. On the uncertainty side: the divisors that turn a distribution shape into a standard uncertainty are exact (a/sqrt(3), a/sqrt(6), a/sqrt(2)); ignoring correlation errs in both directions on the same data (u_c of resistance 0.0702 -> 0.1945, a 2.8x overestimate, while reactance goes the other way); the effective degrees of freedom are truncated immediately before the t lookup as the standard requires (16.64 -> 16 gives k = 2.1199, matching the published 2.12); and the propagation law’s breakdown at a stationary point is returned as structure (guf_valid, invalid_reasons) rather than as a silent u_c = 0. A sum of four rectangular distributions has an exact coverage interval via Irwin-Hall, sqrt(3)(2 x 0.6^(1/4) - 4) = -3.879407, against which the propagation law is structurally 0.040521 too wide.
Operators: msa_anova_table, msa_gauge_rr, msa_bias_linearity, msa_attribute_agreement, gum_standard_uncertainty, gum_propagate, gum_expanded, gum_monte_carlo, gum_validate, spc_capability, spc_xbar_r
Runnable: poc_measurement_system_analysis
Eight ops in moirealign (category moire_align of opsoptics) for alignment by moiré: two gratings with slightly different pitches (mask p_m, wafer p_w) form fringes of period p_m p_w / |
Δp | that move M = p_m / | Δp | times further than the wafer (p_w / | Δp | if the mask moves). Design (magnification, capture range, the Talbot effect of a proximity gap), a closed-form camera image of single, differential and four-quadrant marks, fringe phase by lock-in or Takeda’s FFT method, phase to shift with order resolution, differential pairs that cancel drift, illumination and camera-scale errors, and the white-noise lower bound. The PoC measures both magnifications from images, reads 1 nm steps with 0.08 nm RMS, matches the lower bound with a ratio of 1.00, and breaks the gain over a cross-correlation baseline into its bias and random parts. |
Operators: moire_magnification, moire_talbot_gap, moire_overlay_image, moire_phase, moire_phase_to_shift, moire_differential_shift, moire_mark_read, moire_phase_crlb
Pipeline: moire_magnification → moire_mark_read → moire_phase_crlb
Alternatives: moire_phase, moire_phase_to_shift, moire_differential_shift, moire_overlay_image, moire_talbot_gap, absolute_phase
Runnable: poc_moire_alignment
Phase-measuring deflectometry for glossy surfaces: a rig table, the screen patterns, a forward renderer from a height field to the camera’s image of the screen’s mirror reflection (diffuse fraction, specular-lobe scatter, the back reflection of a transparent plate, thin-lens focus by aperture integration, noise and quantisation), absolute screen phases to a normal map on the surface grid, slopes to mean or Gaussian curvature without integrating, and the closed-form sensitivity before measuring (slope noise σ_u/(2d), the height-slope coupling sin θ / d, focus blur). The PoC finds 3 µm and 1 µm dents on a painted panel that a lit photograph cannot show and scores every number against the analytic surface.
Operators: deflectometry_rig, deflectometry_screen_pattern, deflectometry_render, deflectometry_phase_to_slope, slope_to_curvature, deflectometry_sensitivity
Pipeline: deflectometry_rig → deflectometry_sensitivity → wrapped_phase → absolute_phase → deflectometry_phase_to_slope → slope_to_curvature
Alternatives: deflectometry_render, deflectometry_screen_pattern, sfp_height, integrate_normals
Runnable: poc_phase_measuring_deflectometry
A photoelasticity family: closed-form stress fields with known truth (a diametrically compressed disc, Kirsch’s plate with a hole), principal stresses, the stress-optic law for isotropic materials and for cubic crystals cut on a {100} plane (silicon coefficients with their published source), plane and circular polariscope intensities, the four-direction polarisation-camera and six-intensity polarimeter images of a specimen under circular light, their closed-form inversion to retardation and principal axis, and multi-wavelength order resolution. Retardation is always returned in rad, nm and fringe order together; lengths are metres, stresses Pa, coefficients Pa⁻¹, and unit slips (mm as m, nm as m, a table value in ×10⁻⁷ MPa⁻¹ as Pa⁻¹) raise ValueError.
Operators: brazilian_disc_stress, kirsch_plate_stress, principal_stress, photoelastic_retardation, retardation_from_birefringence, retardation_convert, cubic_photoelastic_birefringence, silicon_piezo_optic_coefficients, polariscope_intensity, photoelastic_polarization_images, photoelastic_phase_estimate, retardation_unwrap_multiwavelength, polarization_demosaic
Pipeline: polarization_demosaic → photoelastic_phase_estimate
Alternatives: polarization_stokes, mueller_from_intensities, unwrap_phase_2d
Runnable: poc_photoelasticity
From the point cloud of a nominally flat surface: remove outliers, fit a plane robustly, and read flatness (peak-to-valley and RMS) from the signed point-to-plane distances — so warp (low order) and local relief (high order) can be told apart.
Operators: ransac_plane, fit_plane_3d, distance_point_plane, statistical_outlier_removal
Pipeline: statistical_outlier_removal → ransac_plane → fit_plane_3d → distance_point_plane
Alternatives: fit_plane3, plane_segmentation, radius_outlier_removal, estimate_normals, surface_form_error
Runnable: geometry_metrology, poc_bump_coplanarity, poc_scan_to_bim_asbuilt
Probability of detection per MIL-HDBK-1823A: â-vs-a regression with left and right censoring (a Tobit-type maximum likelihood, concave in Olsen’s coordinates, reducing exactly to least squares when nothing is censored), the POD(a) curve with a50 / a90 / a90/95 by the delta method, the hit/miss generalised linear model with both Wald and likelihood-ratio a90/95, false-call probability from unflawed sites (binomial one-sided bounds that reproduce the handbook’s PFP table to 7.2e-05), and the decision-threshold trade-off. Estimates agree with an independently written likelihood minimised by a different algorithm to 6.6e-08. The delta-method a90/95 covers the true a90 in 94.3 % of large-sample replicates but only 89.2 % at n=60 — reported, not hidden. A slope that cannot be told from zero is refused rather than turned into an absurd a90, and an a90/95 beyond the largest size tested carries a flag.
Operators: pod_ahat_fit, pod_from_ahat, pod_hitmiss_fit, pod_false_call, pod_decision_tradeoff, light_source, detectability_limit
Runnable: poc_pod_lighting
Three ops in the roughness ledger (category prepare). robust_gaussian_profile is a Gaussian-weighted local regression (order 0 or 1) iterated with Tukey’s biweight at c · median|r|; its transmission is exactly 50 % at λc (closed form exp(-π(αλc/λ)²), α² = ln2/π), measured to 3e-8. robust_spline_profile solves a second-difference penalised least squares (a discrete cubic smoothing spline) with the same reweighting; its transfer function 1/(1+(sin(π dx/λ)/sin(π dx/λc))⁴) is matched to 1e-11. robust_gaussian_surface is the areal version. On a synthetic profile with a known waviness, scratches covering up to 20 % of the samples drag the robust mean line 0.06 times as far as the linear one; at 40 % it breaks down, and a non-converging iteration is refused rather than returned.
Operators: robust_gaussian_profile, robust_spline_profile, robust_gaussian_surface, surface_filter
Pipeline: robust_gaussian_profile → profile_params
Alternatives: robust_spline_profile, surface_filter, robust_gaussian_surface
Runnable: poc_robust_profile_filter, example_robust_profile_filter
Two stages: where (ridge response lines_gauss, or the black-top-hat bothat that lifts only dark fine detail) and how wide (a measurement line across the detected line, measure_pairs for the two sub-pixel edges, table_px_to_mm for millimetres).
Operators: lines_gauss, bothat, measure_pairs, table_px_to_mm
Pipeline: gaussian → lines_gauss → select_contours → fit_line_contours → gen_measure_rectangle2 → measure_pairs → table_px_to_mm
Alternatives: bothat, tophat, sk_frangi, laplace_of_gauss, fuzzy_measure_pairing, mm_per_px_from_reference
Runnable: example_scratch_width, poc_crack_width, poc_solar_el_inspection
Render a ground-truth SEM image from a height field with sem_render (secondary-electron edge effect sec θ + Gaussian beam PSF + Poisson shot noise), then segment it with the classic chain and show that the bright edge inflates the measured area by about perimeter × PSF width — and that subtracting the known beam PSF width removes the bias. Score against expert masks with seg_dice_jaccard / seg_boundary_f, and fit the probability of detection (a90/95) of embedded defects with pod_hitmiss_fit.
Operators: sem_render, blob_label, blob_features, seg_dice_jaccard, seg_boundary_f, pod_hitmiss_fit
Runnable: poc_sem_wafer_defect_edge_bias
One truth ledger of fourteen 20–80 nm spherical and faceted particles drives both scanning and transmission images. Area-equivalent diameter, maximum-slope edges, distance-transform watershed splitting, stereo height and limited-angle reconstruction are compared against that shared truth.
Operators: sem_render, sem_image, tem_projected_potential, tem_image_weak_phase, tem_multislice, tem_power_spectrum, watersheds_marker, radon_transform, filtered_backprojection
Pipeline: sem_render → tem_power_spectrum
Alternatives: sem_image, tem_image_weak_phase, watersheds_marker, radon_transform, filtered_backprojection
Runnable: poc_sem_tem_same_particle
.zmx prescriptions (2026-10-20)Operators: lens_system, encircled_energy, ensquared_energy, energy_radii, mtf_tangential_sagittal, through_focus_mtf, with_aiming, ray_aiming, set_vignetting, lens_configurations, lens_with_configuration, lens_configuration_table, lens_configuration_metrics, lens_add_configuration, glass_nearest, lens_substitute_glasses, lens_global_search, merit_operands_list, merit_evaluate, merit_default, merit_boundary_operands, optimize_lens_operands, merit_contributions, lens_apply_solves, lens_solve_set, lens_solve_clear, lens_solves_list, afocal_system, lens_afocal_report, lens_image_surface, lens_petzval_radius, lens_zmx_solves_roundtrip
Pipeline: lens_system → psf_from_opd → encircled_energy → energy_radii → mtf_tangential_sagittal → through_focus_mtf
Alternatives: psf_to_mtf, mtf_diffraction, spot_stats, opd_map, wavefront_from_opd, lens_section_drawing
Runnable: optical_design_metrics, poc_zoom_configurations, poc_lens_global_search, poc_lens_merit_operands, poc_lens_solves_afocal
Shape from polarisation for a 4-direction on-chip polariser sensor: the Fresnel DoLP of specular reflection (exactly 1 at Brewster’s angle, two zenith solutions straddling it) and of diffuse emission (monotone, one solution), checked against the s/p reflectances of glassmirror written in a different form to 1e-14; AoLP to the two candidate azimuths (diffuse and specular 90° apart, the π ambiguity kept); the explicit candidate set of normals per pixel; disambiguation by a stated prior (convexity with Brewster-ridge segmentation, or a coarse depth / normal map); refractive-index estimation from DoLP at known zenith angles; and integration to height with a mirror-extended Frankot–Chellappa. Round trips through an independent Mueller-matrix forward path (optics.mueller_element / mueller_apply) recover analytic spheres, cylinders and rotated ellipsoids to 1e-9° (diffuse) and to 0.1° on the discrete Brewster ridge (specular). Where it breaks is measured: a wrong index, noise concentrated on the Brewster ring and at the apex, and a diffuse component mixed into a specular pixel.
Operators: sfp_dolp_model, dolp_to_zenith, aolp_to_azimuth, sfp_render, sfp_normals, sfp_disambiguate, sfp_estimate_index, sfp_height
Runnable: poc_shape_from_polarization
Ten ops (simcal / simcalcheck) fit the physical coefficients of a forward model built from fullseye ops (knobs with units, ranges and linear/log scales) to real images by noise-weighted least squares, and refuse to give a number for a coefficient the images do not determine: confounded knobs (illumination x gain, n x d at one wavelength) are reported as the determined combination, knobs without influence or pinned to a range end are refused, a profile likelihood that closes on one side only withdraws the estimate. Over-fitting gates on held-out images reject an 8th-order vignetting polynomial, and residual PCA against the Tracy-Widom edge of white noise detects a model discrepancy (a decentred lens).
Operators: simcal_model, simcal_simulate, simcal_observe, simcal_screen, simcal_fit, simcal_identifiability, simcal_uncertainty, simcal_validate, simcal_discrepancy, simcal_report
Pipeline: simcal_model → simcal_observe → simcal_fit → simcal_identifiability → simcal_report
Alternatives: simcal_screen, simcal_uncertainty, simcal_validate, simcal_discrepancy, simcal_simulate, mv_confounding, mv_residual_pca, sens_morris
Runnable: simcal_tour, simcal_checks_tour
Locate edges along a measurement line from the intensity gradient, at sub-pixel resolution, and read a dimension as the distance between paired edges. Unlike counting thresholded pixels, the answer does not move when the threshold does.
Operators: measure_pos, measure_pairs, blob_label, blob_select
Pipeline: gen_measure_rectangle2 → measure_pos → measure_pairs → table_px_to_mm
Alternatives: fuzzy_measure_pairing, gen_measure_arc, create_metrology_model, blob_label, blob_select, mm_per_px_from_reference
Runnable: poc_dimensional_inspection, poc_screw_thread_metrology, poc_calipers_under_illusion
Seven ops in telecentric (category telecentric of opsoptics) on top of the raytrace prescriptions: a generator of the same singlet with the stop moved (entocentric, object-side telecentric, bi-telecentric, plus a stop shift that spoils telecentricity), the real chief ray found by aiming at the stop itself rather than at the entrance pupil (so it works with the pupil at infinity), the magnification versus object height on a fixed image plane, the dimensional error across a step, the RMS defocus blur from a brute-force pupil bundle, the vignetting set by the front lens, and a pinhole camera at the entrance pupil for render3d. The PoC gates the magnification against L/(L − Δz), the stop shift against Newton’s equation, the blur slope against |
m | ·NA/√2, and measurements taken from rendered images against circle-overlap closed forms. The lead chapter measures the paper’s raw telecentric images (Stark et al., Sci. Rep. 15, 28690, 2025, CC BY 4.0) with Fullseye’s metrology ops and checks them against the paper: a family of ellipses sharing one centre and shape, fitted to the eight rings of an alignment plate (1 mm spacing) tilted by 29.5°, gives 252.13 ± 0.04 px/mm along the major axis, +0.05 % from the paper’s K1 = 252.0 px/mm (the paper’s own K1 and K2 spread by ±0.25 %, so the match is not read as finer than that). The telecentric signature: the centres of the concentric rings on the tilted plate do not drift with r² (β = 0.0035 ± 0.0034 px/mm², where a 25 mm entocentric lens would give 1.40 and move the outer centre by 101 px), so the entrance pupil lies beyond 10.5 m. Fitting a free ellipse to each ring instead fails on the outer rings whose arcs are shadowed down to 36–180°. A 3D-printed resin sphere (nominal radius 2.5 mm) is not a usable reference: its outline radius moves 8 % with the threshold. |
Operators: telecentric_lens, chief_ray_angle, magnification_vs_depth, telecentricity_error, defocus_spot_vs_depth, vignetting_vs_field, lens_equivalent_pinhole
Pipeline: telecentric_lens → chief_ray_angle → telecentricity_error → magnification_vs_depth → defocus_spot_vs_depth → vignetting_vs_field
Alternatives: lens_system, paraxial_trace, lens_equivalent_pinhole, relative_illumination
Runnable: poc_telecentric_metrology
Eleven ops in temsim (category tem of opsoptics): relativistic electron wavelength and interaction constant, Scherzer defocus and point resolution, the 2-D CTF with astigmatism and spatial/temporal envelopes, the 1-D CTF with closed-form zeros, projected potentials from atom positions (electron scattering factors from the X-ray factors of pxrd via Mott–Bethe), an amorphous film, weak-phase or nonlinear (coherent_image) bright-field images with dose noise, a simple multislice, the tiled power spectrum, defocus and astigmatism estimation from Thon rings (with a jackknife uncertainty and an explicit refusal when the rings are not visible), and phase-flip or Wiener correction. Conventions follow CTFFIND4/RELION (Å, positive defocus = underfocus). The PoC grades against published wavelengths, closed-form CTF zeros, the Scherzer point resolution, Raman–Nath diffraction, synthetic ground truth, and three EMPIAR-10028 micrographs whose defocus it reproduces within 0.2 % of the authors’ CTFFIND3 values.
Operators: tem_wavelength, tem_scherzer, tem_ctf, tem_ctf_profile, tem_projected_potential, tem_amorphous_film, tem_image_weak_phase, tem_multislice, tem_power_spectrum, tem_ctf_estimate, tem_ctf_correct
Pipeline: tem_power_spectrum → tem_ctf_estimate → tem_ctf_correct
Alternatives: tem_ctf_profile, tem_scherzer, tem_image_weak_phase, tem_amorphous_film, tem_multislice
Runnable: poc_tem_ctf_thon_rings
From a height grid: slope, aspect, viewshed and flow direction. Each has a closed form to check against, so an implementation error shows up as a number.
Operators: dem_slope, dem_aspect, dem_viewshed, dem_flow_direction
Pipeline: dem_fill_sinks → dem_slope → dem_aspect → dem_flow_direction → dem_viewshed
Alternatives: dem_hillshade, dem_flow_accumulation, dem_geodetic_slope
Runnable: poc_dem_terrain, dem_terrain_analysis_tour
The runnable example compares phase-based continuous-wave ranging and photon-arrival histograms on one analytic inspection scene. It scores ambiguity, noise, harmonic wiggling, multipath, mixed edge pixels, time-bin resolution, pile-up, reflectivity and box-volume errors against closed forms.
Operators: itof_capture, itof_phase_amplitude, itof_noise_budget, itof_unwrap_multifreq, itof_unwrap_error_rate, itof_multipath_separate, itof_flying_pixel_mask, itof_wiggling_correct, tof_multipath_phase, dtof_cube_simulate, dtof_cube_depth, spad_deadtime_apply, bilateral_filter_depth, depth_to_points
Pipeline: itof_capture → itof_phase_amplitude → itof_unwrap_multifreq → bilateral_filter_depth → depth_to_points
Alternatives: dtof_cube_simulate, dtof_cube_depth
Runnable: poc_tof_camera
A Monte Carlo that tracks primary electrons one by one in the solid (Joy’s single-scattering model with Browning’s 1994 Mott-fit elastic cross-section and the Joy-Luo stopping power). sem_electron_mc returns the backscatter coefficient, the secondary-electron yield and the penetration depth; sem_yield_curve sweeps the voltage. Material Z, A, density and secondary-electron constants come from the same material table the optics use (material_electron_properties). sem_line_profile scans a line with a trapezoidal cross-section (buried rectangles allowed) and sem_cd_measure measures its width by threshold or maximum slope. sem_image fires electrons into every pixel of a height field with a material map (in-lens SE, side SE, backscatter detector) and sem_charging_series steps insulator charging frame by frame. Four external-truth gates: backscatter coefficients inside measured bands, Arnal’s tilt law, the Kanaya-Okayama range, and the Lin & Joy 2005 universal yield curve and Emax.
Operators: sem_electron_mc, sem_yield_curve, sem_se_universal_curve, sem_line_profile, sem_cd_measure, sem_image, sem_charging_series, sem_se_escape_fraction, material_electron_properties
Pipeline: material_electron_properties → sem_electron_mc → sem_line_profile → sem_cd_measure → sem_image
Alternatives: sem_render, sem_yield_curve, sem_charging_series
Runnable: poc_virtual_sem_kv_cd_bse
Compute a signed volume from a closed mesh, a voxel count from a labelled region, or the material between two surfaces from a height grid. Gaps can be filled by interpolation, and how far that interpolation reached is reported separately.
Operators: mesh_volume, vol_rle_volume, interp_scattered, dem_slope
Pipeline: vol_rle_components → vol_rle_volume → mesh_volume
Alternatives: interp_scattered, dem_slope, dem_fill_sinks, marching_cubes
Runnable: poc_stockpile_volume, poc_lidar_terrain_change
Integrate named dynamical systems (Lorenz, Rossler, harmonic, arbitrary linear A), sample their fields, take Poincare sections, compute Lyapunov spectra, bifurcation maps and correlation dimensions; build minimal surfaces (catenoid, helicoid, Enneper, Scherk, gyroid) and sweep a curve into a tube mesh — and score all of it with identities and definitions rather than by eye, because a Lorenz plot looks the same whether the integrator is 1st or 4th order and a surface looks smooth whether or not its mean curvature vanishes. RK4’s error falls by exactly 16 per halving against expm(At)x0 (Euler, the control, falls by 2); the sum of the Lyapunov exponents equals the trace identity -(sigma+1+beta) to 2.6e-06, independently of the tangent-flow/QR procedure that produced them; the logistic period-doubling points are the exact 3 and 1+sqrt(6), and the residual is attributed — the gate is not “the error is small” but “lengthening the burn-in shrinks it by 10.9x”, because convergence at a bifurcation is algebraic; the correlation-dimension bias on a bounded set is traced to the radius window, not the sample count (400 to 3,000 points does not move it; narrowing r_lo/r_hi moves 1.887 to 2.050); the field’s divergence equals tr(A) and its vorticity A10 - A01 as measured by the existing PIV ops, which know nothing about this family; a tube swept along a circle is a torus whose analytic volume 2*pi^2*R*r^2 and area 4*pi^2*R*r the existing mesh_volume / mesh_area confirm to 0.3 %; and the minimal surfaces have |H| medians of 1e-4 against controls of 1.00004 (unit sphere) and 0.50000 (unit cylinder), with the gyroid’s nodal-approximation residual reported rather than hidden.
Operators: ode_flow_states, ode_vector_field_grid, dynsys_poincare_section, dynsys_lyapunov_spectrum, dynsys_bifurcation_map, dynsys_correlation_dimension, minimal_surface, minimal_surface_bend, gyroid_isosurface, gyroid_solid_mask, curve3d_tube_mesh
Runnable: poc_what_a_picture_cannot_check
Label connected components, select them by area, shape or position, and count them. Touching objects can be separated with a watershed.
Operators: blob_label, blob_select, blob_count, watersheds, blob_count_interval
Pipeline: auto_threshold → blob_label → blob_select → blob_features
Alternatives: watersheds, blob_seeds, blob_count, blob_count_interval, remove_small, select_shape, otsu
Runnable: poc_cell_counting, poc_particle_sizing, poc_real_coin_metrology, poc_dense_bubble_count
Five ops for field RGB: six visible-band plant colour indices (ExG, ExR, ExGR, CIVE, NGRDI, VEG; dark pixels are left undefined rather than set to zero), ten colour and texture features per region of a label image (including structure-tensor orientation coherence, which separates aligned crop leaves from isotropic weed patches), a closed-form two-class Fisher discriminant (fit and score), and a grader that splits a cover fraction at edges declared before evaluation (default 5 / 25 / 50 %, the Braun-Blanquet cover classes). The PoC scores them on a public UAV dataset of weedy rice with pixel masks (CC BY 4.0): grade agreement kappa 0.424 on the held-out test split (permutation p = 0.0005), cover correlation 0.826, and an honest leave-one-date-out check where one late-season flight drops to r = 0.14.
Operators: plant_color_index, superpixel_color_texture_features, fisher_lda_fit, fisher_lda_score, cover_ratio_grade
Pipeline: superpixel_color_texture_features → fisher_lda_fit → fisher_lda_score → cover_ratio_grade
Alternatives: plant_color_index, snic_superpixels, class_ndim_norm
Runnable: poc_weed_rice_ratio
Dual-energy and photon-counting X-ray material discrimination. The material table gains an X-ray column: mass attenuation coefficients from a bundled subset of NIST SRD 126 (Hubbell and Seltzer; 51 elements, 21 materials, 1 keV to 1 MeV) and the mixture rule for anything with a known composition, under the same names as the optical column. On top of it: a tungsten-anode tube spectrum and its half-value layer, photon-counting energy windows (absorption efficiency, energy resolution, charge-sharing tail) and dual-kVp channels, a noisy channel projection, a per-pixel polychromatic basis-material decomposition that rejects pixels it cannot solve, its Cramér-Rao bound, the R value, an effective-Z map and the closed-form separability of two materials. Seven inorganic scintillators (CsI:Tl, NaI:Tl, Bi4Ge3O12, Lu2SiO5:Ce, Lu1.8Y0.2SiO5:Ce, CdWO4, Gd2O2S:Tb) carry an emission column with a source for every value, and a scintillator-coupled sensor model follows one X-ray photon through absorption, light yield and the overlap of the emission with a photodetector’s quantum efficiency. The PoC finds bone and glass fragments that a single X-ray image buries under the thickness variation of meat.
Operators: material_xray_table, material_xray_attenuation, material_xray_constants, material_effective_z, xray_tube_spectrum, xray_beam_quality, photon_counting_channels, dual_kvp_channels, xray_channel_projection, basis_material_decompose, basis_decomposition_crlb, r_value_map, effective_z_map, dual_energy_separability, scintillator_sensor_qe
Pipeline: xray_tube_spectrum → photon_counting_channels → basis_decomposition_crlb → basis_material_decompose → effective_z_map
Alternatives: dual_kvp_channels, r_value_map, dual_energy_separability, xray_channel_projection, material_xray_attenuation
Runnable: poc_dual_energy_xray
Fix the text inside an image against the string it should read, without regenerating the image: pass {"items": [{"text": "...", "bbox": [x, y, w, h]}]} to glyph_correct_spec (Python) or fullseye_fix_text (MCP). Nothing is recognised — the intended string is given, so each cell is verified one-to-one against one character, and the threshold comes from the typeface noise floor measured on the fonts of the environment. repair_flagged replaces only the glyphs above the floor and rolls back any replacement that does not verify; rewrite_line redraws the whole line in one typeface. The report carries a per-line status, a machine-readable reason_code for refusals, and mismatch (typo / unrelated) so that a caller notices when the original text has nothing to do with the intended one.
Operators: glyph_correct_spec, glyph_make_spec, glyph_find_text_lines, glyph_rewrite_line, glyph_find_plate, glyph_typeface_noise_floor, glyph_rendering_noise_floor, glyph_distance, glyph_replace, glyph_split_cells, glyph_fonts
Runnable: fix_text_in_image, poc_glyph_typo_detection
A per-pixel variation model learned from aligned good samples, with the band half-width derived from a declared per-pixel false-alarm rate rather than tuned by hand: a t prediction interval for mean/std, an empirical-Bayes moderated t (Smyth 2004) for few samples, and a Monte-Carlo pivot for the robust median/MAD variant. Measured false-alarm rates on synthetic normal good samples fall inside the binomial 4-sigma band for all four estimators. The stack’s alignment is measured to 1/20 px and a misaligned stack is refused (or registered by an all-pass Fourier shift); forcing a 1-2 px misaligned stack fattens the band on edges 22-fold and misses every edge defect. Held-out calibration re-derives k from good images when real data break the model, and every out-of-band region is explained by area, sign and peak sigma. Method-independent metrics (pixel AUROC, AUPRO to FPR 0.3, image AUROC, per-region overlap) compare it with RPCA and golden comparison.
Operators: varmodel_alignment, varmodel_band_k, varmodel_fit, varmodel_calibrate, varmodel_score, anomaly_pixel_auroc, anomaly_pro, anomaly_image_auroc, anomaly_region_overlap, compare_to_golden
Pipeline: varmodel_alignment → varmodel_fit → varmodel_calibrate → varmodel_score
Alternatives: compare_to_golden, dc_rpca_sparse, anomaly_pro
Runnable: poc_good_sample_variation_model, anomaly_eval_metrics
Everything before the recogniser: deskew, local (Sauvola) binarisation, speck removal and merging characters into lines, all from registry operators. Recognition itself is out of scope.
Operators: sk_sauvola, rotate_image, remove_small, dilation_rectangle1
Pipeline: median → rotate_image → sk_sauvola → invert_region → remove_small → select_shape → dilation_rectangle1
Alternatives: sk_niblack, adaptive_gauss_thresh, otsu, gray_bothat, unsharp, zoom_image_factor, affine_trans_image
Runnable: gallery2d_segmentation, poc_matrix_code_reading, gallery2d_region
Anomaly detection from good samples only, with classical, deterministic patch features instead of a pretrained network. patchdist_* fits a multivariate normal per grid position and scores by Mahalanobis distance; since n good images give a singular covariance when n <= D, the shrinkage is declared (Ledoit–Wolf analytic intensity, or a number) and shrinkage="none" is refused for a singular covariance. pool="global" fits one distribution to all patches for stationary textures. patchbank_* keeps a memory bank thinned by greedy k-centre covering, reports the covering radius, and optionally appends the grid position to find a correct pattern in the wrong place. Evaluation uses the method-independent anomeval family (pixel / image AUROC, AUPRO, F1 max) and anomaly_operating_point, which picks the highest threshold whose defect recall is guaranteed at a stated confidence with an exact Clopper–Pearson limit and refuses when there are too few defective images. On a stochastic texture the per-position normal distribution loses to the pooled distribution and the memory bank at 5, 20 and 80 good images; a memory bank at 10 % keeps its accuracy at about a tenth of the scoring time; the guaranteed operating point keeps its declared confidence in 95.7 % of 300 repetitions against 50.3 % for the unguaranteed quantile.
Operators: patch_features, patchdist_fit, patchdist_score, patchbank_fit, patchbank_score, anomaly_pixel_auroc, anomaly_pro, anomaly_image_auroc, anomaly_pixel_f1_max, anomaly_image_f1_max, anomaly_operating_point, anomaly_region_overlap
Pipeline: patchbank_fit → patchbank_score
Alternatives: varmodel_fit, compare_to_golden, dc_rpca_sparse
Runnable: poc_patch_anomaly, anomaly_eval_metrics
A PL image glows only after the excess carriers have diffused, so a second PSF — the 2-D Green function K₀(r/L)/2πL², L = √(Dτ) — sits on top of the optical one. pl_diffusion_psf returns that kernel (sum 1); pl_image_simulate solves the steady-state diffusion equation exactly on the grid from an excitation map and an extra-recombination map (optional optical PSF and noise); pl_groove_visibility gives the closed-form contrast, CNR and visibility boundary L* of a shadow groove (missing excitation, 1 − e^{−w/2L}) and a sink groove (a recombination line, Donolato’s SL/(SL+2D)). The two move in opposite directions with L: a longer diffusion length hides shadows and reveals sinks. Embedded-groove detection feeds pod_hitmiss_fit for a90/95.
Operators: pl_diffusion_psf, pl_image_simulate, pl_groove_visibility, pod_hitmiss_fit
Runnable: poc_si_wafer_pl_defect_visibility
Pick local maxima above a robustly estimated background plus k sigma, and return sub-pixel centroids. The name is astronomical but the method is domain-neutral: drifting objects, small defects, fluorescent puncta, particles.
Operators: star_detect, peak_subbin, find_peaks, noise_sigma
Pipeline: noise_sigma → star_detect → find_peaks → peak_subbin
Alternatives: xsk3_peak_local_max, blob_seeds, blob_label
Runnable: poc_search_sweep_width, poc_astro_photometry
Six ops (codematch) match on the direction of brightness change instead of its value: orientation code matching (OCM), increment sign correlation (ISC, exactly invariant to any strictly monotone brightness map), the selective correlation coefficient (SCC, with the extended mask) and the Radial Reach Filter for background comparison. Templates whose codes cannot fix a position are refused with ValueError, where NCC still returns a confident wrong answer. On real CC0 photographs with 40 templates per level, NCC drops below half its hits at 10 % occlusion and 6 % saturated highlight; OCM and ISC hold until 63-67 % occlusion and 44-53 % highlight. None of the four is rotation invariant (half the hits are lost at 7-9 degrees).
Operators: ocm_match, isc_match, scc_match, orientation_code, increment_sign, radial_reach_filter
Pipeline: isc_match → ocm_match
Alternatives: scc_match, ncc_locate, radial_reach_filter
Runnable: poc_code_matching_breakdown
Pulse-echo ultrasound in layered stacks and scanning-acoustic-microscope C-scans, built from first principles: a material table that carries a source and a verified flag per value (unverified placeholders are refused unless asked for), interface coefficients with the energy check R² + (Z1/Z2)T² = 1 and the sign flip exactly where Z drops, a normal-incidence longitudinal transfer-matrix A-scan with water path and power-law attenuation (checked against a bottom-up Airy recursion, a time-domain ray sum and the optical thin-film formula to 1e-12), and a focused C-scan with a per-frequency Gaussian lateral PSF (FWHM 1.02 λ_water F#) that returns amplitude, phase, in-phase and single-sample-polarity images. Phase is read at the expected time of the bond plane relative to the front-surface echo: thin Cu and SiO2 layers give quadrature echoes, voids are inverted, so a small void adds at right angles to the background and barely changes the amplitude. A closed-form optimal frequency balances lateral resolution against water attenuation, with the front-echo time floor and the critical-angle F-number floor alongside; C-scan statistics feed the existing POD operators.
Operators: acoustic_material_table, acoustic_layer_stack, acoustic_interface_coefficients, pulse_echo_ascan, sam_cscan, echo_phase_polarity, sam_frequency_tradeoff
Runnable: poc_sam_hybrid_bonding_voids
Relief defects (dents, bumps, grinding marks) show as surface slope, not colour. Design the light first (which ring elevation gives the most contrast for that slope), recover normals from several lights (photometric stereo), integrate to height, then segment the defects — one chain.
Operators: illumination_design, lighting_sweep, photometric_stereo, integrate_normals, bothat
Pipeline: illumination_design → lighting_sweep → light_source → defect_contrast → irradiance_map → illumination_uniformity → photometric_stereo → integrate_normals → surface_form_error → bothat → auto_threshold → remove_small
Alternatives: photometric_stereo_robust, normals_from_depth, background_flatten, tophat, laplace_of_gauss, dem_slope
Runnable: illumination_design_demo, photometric_stereo, poc_bump_coplanarity
Find the part with template matching (translation, or rotation in 30° steps), then shift the measurement model by that offset before applying it — so the same feature is measured wherever the part landed.
Operators: ncc_locate, shape_locate, align_metrology_model, translate_measure
Pipeline: gaussian → ncc_locate → shape_locate → create_metrology_model → add_metrology_object_circle_measure → align_metrology_model → apply_metrology_model
Alternatives: edges_sub_pix, fit_line_contours, translate_measure, gen_measure_rectangle2, rotate_image, affine_trans_image
Runnable: poc_template_tracking, gallery2d_contour_measure, poc_search_sweep_width
Whole-image Brown–Conrady undistortion and its inverse, built as a backward map over this repo’s own point model plus a bilinear, edge-clamped remap — so a corrected image is hole-free and a synthetic distorted image is exact to the resampling. dist is [k1, k2, p1, p2(, k3)] (OpenCV order); K’s principal point is the distortion centre. Grey or colour, in [0, 1]. On a smooth scene the round trip distort_image → undistort_image recovers the interior to a few times 1e-4 (only the double bilinear blur remains); the remap field equals distort_points to machine precision.
Operators: undistort_image, distort_image, distort_points, undistort_points
Runnable: lens_undistort
Forward parallel-beam projection to a sinogram, filtered back-projection to a slice or a volume, and the injection and correction of ring artefacts and beam hardening. The reconstructed volume can be turned straight into a mesh.
Operators: radon_transform, fbp_volume, ring_artifact_remove, marching_cubes
Pipeline: radon_transform → ring_artifact_remove → beam_hardening_correct → fbp_volume → vol_rle_components → vol_rle_volume
Alternatives: marching_cubes, radon_volume, sinogram_center_of_rotation, ring_artifact_apply
Runnable: poc_ct_fidelity, poc_ct_void_morphology
From the foreground masks of several calibrated cameras, carve out a voxel volume that always contains the object. No learned model, no depth sensor.
Operators: synthesize_silhouette, carve, visual_hull, carve_look_at
Pipeline: synthesize_silhouette → visual_hull → vol_rle_components → vol_rle_volume
Alternatives: carve, carve_look_at, mesh_volume
Runnable: space_carving, poc_livestock_body_volume
Six ops in chromconf (category confocal): the probe calibration from a lens prescription and the glass dispersion of the material table (paraxial focus, image-side NA and longitudinal spherical aberration per wavelength, and the mirror-peak calibration), the confocal axial response (mirror and point, with spherical aberration), the return spectrum of a surface and a layer stack (Fresnel reflectance from the material table, tilt, roughness, source, spectrometer, noise), peak picking with white-reference correction, readout of heights and transparent-plate thickness with an NA correction, and closed-form limits (range, resolution, tilt, minimum film). Gates: thick-lens focus, sinc² width ∝ λ/NA², pupil-overlap Monte Carlo for tilt, plate thickness to 0.1 %, and the gold bias predicted by the reflectance slope over the response curvature.
Operators: chromatic_confocal_probe, confocal_axial_response, chromatic_confocal_spectrum, chromatic_confocal_peaks, chromatic_confocal_readout, chromatic_confocal_limits
Pipeline: chromatic_confocal_probe → chromatic_confocal_spectrum → chromatic_confocal_peaks → chromatic_confocal_readout
Alternatives: confocal_axial_response, chromatic_confocal_limits
Runnable: poc_chromatic_confocal
From spectral reflectance or RGB, compute CIE XYZ and Lab, then colour differences under CIE76 or CIEDE2000. The difference can also be returned as a per-pixel map.
Operators: rgb_to_lab, xyz_to_lab, delta_e_2000, cie_xyz_from_wavelength
Pipeline: rgb_to_lab → delta_e_2000
Alternatives: rgb_to_xyz, xyz_to_lab, delta_e_76, delta_e_map, cie_xyz_from_wavelength, srgb_to_linear
Runnable: poc_white_balance, poc_pigment_unmixing
Six ops (converge) run a forward model to convergence and return the evidence: a fixed-point driver with Aitken and Anderson acceleration (Walker & Ni 2011 eq. 3.1; it reproduces GMRES on linear maps, checked) that refuses divergent or oscillating runs; the observed order and grid convergence index of Celik et al. 2008 (Table 1 reproduced); sequential Monte Carlo to a tolerance; MCML-type photon transport in layered turbid slabs with confidence intervals that contain the MCML manual’s Table 6.1 / 6.2 values; and Richardson-Lucy stopped by the Poisson discrepancy principle (tau = 1) or Morozov’s, refusing data outside the model’s range.
Operators: iterate_fixed_point, conv_observed_order, conv_gci, mc_sequential_mean, mc_photon_slab, iv_richardson_lucy_until
Pipeline: iterate_fixed_point → conv_gci
Alternatives: conv_observed_order, mc_sequential_mean, mc_photon_slab, iv_richardson_lucy_until, iv_richardson_lucy
Runnable: converge_tour
Seven ops in fiberoptics (category fiber): group index and material dispersion D(λ) from the material table, numerical aperture, V number and cutoff wavelength, LP_lm modes by solving the weakly guiding characteristic equation, the mode field diameter of LP01 (best-overlap Gaussian, with the Marcuse fit and the second-moment definition alongside), and the efficiency of a light guide (packing fraction, end-face Fresnel, NA acceptance, attenuation). Gates: Bessel-zero cutoffs, V²/2 mode count, the Rudolph–Neumann b(V) and Marcuse MFD fits, the 1.27 µm zero of silica’s material dispersion, and the ITU-T G.652 MFD range.
Operators: material_group_index, material_gvd, fiber_numerical_aperture, fiber_v_number, fiber_lp_modes, fiber_mode_field_diameter, fiber_bundle_coupling
Runnable: poc_fiber_light_guide
Five ops in gratingspec (category spectrometer): the grating equation with angular and reciprocal linear dispersion, resolving power mN, free spectral range and overlapping orders; a first-order Czerny-Turner design with Shafer’s coma condition; the bandpass as the FWHM of the slit image, pixel and diffraction convolved, with the etendue; smile and keystone of a long slit from the 3-D grating equation; and the detector reading of an input spectrum including higher-order overlap and a long-pass filter. Three in illumdesign: Koehler and critical illumination trains with their conjugates, the specimen irradiance by paraxial backward tracing to a source radiance map, and the coaxial half mirror (round trip R·T, ghost, the image of a mirror-like or matte part).
Operators: grating_dispersion, czerny_turner_design, spectrometer_bandpass, spectrometer_slit_image, spectrometer_spectrum, illumination_train, illumination_field, coaxial_illumination
Pipeline: czerny_turner_design → spectrometer_bandpass → spectrometer_spectrum
Alternatives: grating_dispersion, spectrometer_slit_image, illumination_train, illumination_field, coaxial_illumination
Runnable: poc_spectrometer_illumination
Five ops in illumdesign (category illumination) for lights defined by the cone of directions they deliver to every point (the far-field / Koehler limit), against a camera of object-side NA. On a specular facet the reflection moves the cone by 2θ without changing it, so the brightness is the intersection of two spherical caps, a closed form: slopes below |
α − β | /2 do not show, slopes beyond (α + β)/2 go dark. The ops return the light, the closed-form slope thresholds, the brightness per slope (closed form and a projected-solid-angle pupil integral, with Gaussian micro-facet roughness), the contrast versus the cone half-angle, and an image of a normal map under the light. The PoC checks the closed form against the pupil integral (0.002) and against contrasts measured from rendered images (0.0004), chooses a cone that hides hairline marks while blackening a 4° scratch, reads the slope sign with a tilted cone, and shows waviness and roughness defeating the design. |
Operators: solid_angle_light, solid_angle_boundaries, solid_angle_brightness, solid_angle_sweep, solid_angle_render
Pipeline: solid_angle_light → solid_angle_boundaries → solid_angle_sweep → solid_angle_brightness → solid_angle_render
Alternatives: light_source, defect_contrast, lighting_sweep, illumination_design, micro_normals, blast_normals
Runnable: poc_illumination_cone_vs_na
Seven ops in radiosity3d (category radiosity of opsoptics). render_optscene_gi takes the scene, camera and lights of render_optscene, keeps its direct photometry exactly (zero bounces reproduce render_optscene), and adds Lambertian interreflection — k bounces as a Neumann partial sum or the converged sum by progressive radiosity (Cohen et al. 1988) — returning the image, the direct image, their difference (the interreflection map), the convergence evidence (residual unshot energy, shots, converged) and a bounce study (observed ratio of successive increments, a GCI-style estimate trusted in the asymptotic range, the bounce count that brings the remainder under a tolerance). The building blocks: Howell’s closed forms C-11 and C-14, numerical view factors between flat convex polygons, patch sets from a scene or from polygons, the all-pairs view-factor matrix with occlusion, and the progressive solver whose stopping rule (residual energy below tol of the initial) is stated as our choice.
Operators: form_factor_parallel_rects, form_factor_perpendicular_rects, form_factor_polygons, radiosity_patches, form_factor_matrix, radiosity_progressive_3d, render_optscene_gi
Pipeline: radiosity_patches → form_factor_matrix
Alternatives: render_optscene_gi, radiosity_progressive_3d, render_optscene, render_studio, transport_matrix_radiosity, form_factors_2d
Runnable: poc_pocket_interreflection
lens_file_read turns the plain-text sequential prescription that commercial lens-design programs save (.zmx) into a raytrace.lens_system (or, when the file has COORDBRK coordinate breaks — tilts, decentres, fold mirrors — into a raytrace3d.noncoaxial_system, with the order flag, the frame flip at mirrors, returns and PPAR pickups handled), so every Fullseye optics op (real rays, Seidel sums, OPD / PSF / MTF, colour, tolerances, DLS optimisation, section drawings) runs on it unchanged. Fields and wavelengths are kept as listed in the file; lens_file_system picks one. lens_file_write writes a prescription (optionally the geometry of an edited system) back, and lens_file_report classifies every keyword as read, ignored (with a reason) or unsupported without importing. Glasses come from the material table or your own .agf catalogues, matched by exact name. The PoC checks first-order data, Seidel sums and real rays against what two independent readers (ray-optics, optiland) computed from the same files.
Operators: lens_file_read, lens_file_system, lens_file_write, lens_file_report
Pipeline: lens_file_read → lens_file_system → paraxial_trace → spot_stats → lens_file_write
Alternatives: lens_file_report, read_glass_catalog_agf, lens_system, optimize_lens, lens_section_drawing
Runnable: poc_lens_file_roundtrip
Sixteen ops in the new matprop category of opsoptics, backed by one record per material in materials_data.py (generated from the refractiveindex.info database, CC0: primary-literature coefficients and tables with their citation on every wavelength segment). 46 catalogue glasses from four makers, 12 crystals and IR materials, 6 semiconductors (Si with Green 2008 n,k and the Salzberg IR Sellmeier), 4 films, 10 metals, water and 4 plastics. Every curve comes back as pairs (λ nm, value) so sources, optics, targets and sensor QE share one shape. read_glass_catalog_agf reads the user’s own .agf catalogues (all 13 .agf dispersion formulas, k from internal-transmittance lines); vendor catalogues are not bundled. Gates: catalogue n_d / V_d of all 46 glasses within 4e-6 / 0.005, the published Green 2008 and Johnson & Christy points, slab transmittance against the closed form, and optiland 0.6.3 as a second implementation at 23 points.
Operators: material_table, material_record, material_optical_constants, material_dispersion, material_extinction, material_absorption, material_transmittance, material_reflectance, abbe_number, glass_map, thermo_optic_coefficient, plate_focus_shift, silicon_free_carrier_absorption, material_from_sellmeier, material_from_curves, read_glass_catalog_agf
Runnable: poc_material_optical_library
Eight ops build the NIR sorting chain with the object and the optics reading the same material table: absorption bands for polymers, lipids, proteins, carbohydrates and lignin (and nut kernels, shells and wood as mixtures; water from the table’s n,k), carbon black, the Kubelka–Munk reflectance of a scattering layer, reflectance from a material name with grain-size scattering and the Saunderson surface correction, an InGaAs QE from the direct-gap absorption edges, and the linear map from reflectance to electrons per band through a halogen lamp, the lens glass, the band filters and the QE. Gates: the Kubelka–Munk limits and inverse, measured polymer trough positions within 5 nm, water absorption within 10 % of Kou 1993, linearity and the EMVA variance of the captured cube, and the Fisher ratio’s two-class closed form.
Operators: material_nir_absorption, carbon_black_absorption, nir_model_info, ingaas_photodiode_qe, kubelka_munk_reflectance, spectral_reflectance_from_material, hyperspectral_band_weights, hyperspectral_capture
Pipeline: material_nir_absorption → kubelka_munk_reflectance → hyperspectral_capture
Alternatives: spectral_reflectance_from_material, hyperspectral_band_weights, ingaas_photodiode_qe, carbon_black_absorption
Runnable: poc_hyperspectral_foreign_matter
Thirteen ops in raytrace3d (category noncoaxial of opsoptics) give every surface of a sequential system a 3-D pose: coordinate breaks (decenter, then rotate about x, the new y, the new z; undo reverses one), returns to an earlier frame, fold mirrors, tilted or wedged plates and plate beamsplitters with a transmit and a reflect branch. Surfaces and the refraction / reflection law are raytrace’s own, so a coaxial prescription traces identically (1e-12). Ops report image orientation (reflections, handedness), both beamsplitter branches, closed-form tilted-plate shift and astigmatism, the Scheimpflug image tilt with a real-ray check, residual surface reflectance from the material table and thin-film stacks, and every two-reflection ghost (focus, size on the sensor, energy and irradiance ratios) as a table and an image. optdraw.noncoaxial_drawing draws folded systems to scale.
Operators: noncoaxial_system, noncoaxial_example, noncoaxial_layout, noncoaxial_trace, noncoaxial_spot, image_orientation, beamsplitter_branches, tilted_plate_shift, scheimpflug_tilt, surface_reflectance, ghost_analysis, ghost_image, ghost_path, noncoaxial_drawing
Pipeline: noncoaxial_system → noncoaxial_trace → image_orientation → ghost_analysis → noncoaxial_drawing
Alternatives: lens_system, spot_stats, tilted_plate_shift, scheimpflug_tilt, surface_reflectance, lens_section_drawing
Runnable: poc_noncoaxial_optics
Fresnel reflectance, thin-film interference colour, grating colour, and vector-form refraction with a per-ray total-internal-reflection mask — with the dispersion of real glasses.
Operators: fresnel_dielectric, thin_film_reflectance, grating_rgb, refract_rays
Pipeline: fresnel_dielectric → thin_film_reflectance → thin_film_rgb
Alternatives: fresnel_conductor, brewster_angle_deg, grating_rgb, refract_rays, fresnel_reflectance
Runnable: glass_and_mirror_optics, appearance_structural_colour
Six ops in pixelshift (category pixelshift of opsoptics): nominal shift sequences with actuator error, an exact box-aperture capture of a finely drawn scene through a shifted Bayer or monochrome sensor (optionally a different scene per frame for moving objects), a grid merge with the nominal shifts that refuses sequences that cannot fill the grid, a motion mask from disagreeing green samples with fallback to a single-frame demosaic, a false-colour metric, and the closed-form resolution budget (pixel-aperture sinc times diffraction MTF, Nyquist, Q = λN/p). The PoC shows false colour vanishing with 1-pixel shifts, aliasing vanishing with half-pixel shifts while the slanted-edge MTF50 stays put, the lens-limited regime where nothing is gained, and the failure modes: shift error, moving parts and stacking more frames. The lead chapter runs on real raw data (four pixel-shift frames from a 35 mm full-frame mirrorless camera with sensor shift, PixelShift200 by Qian et al., ICCP 2022, CC BY 4.0, a crop of a resolution chart): the camera cycles (0,0)→(1,0)→(1,−1)→(0,−1), and passing the op’s default order instead flags 23.2 % of a static scene as moving (0.09 % with the right order); the merge matches the authors’ own merged RGGB to a correlation of 0.99999996; false colour on the achromatic chart drops from 0.054 (single frame, bilinear) to 0.025; and a good demosaic (AHD in rawpy) comes within 1 % of the four-frame contrast on this chart, whose finest bars stop at 0.31 cyc/px.
Operators: pixel_shift_pattern, pixel_shift_capture, pixel_shift_merge, pixel_shift_motion_mask, false_color_metric, pixel_shift_resolution_budget
Pipeline: pixel_shift_resolution_budget → pixel_shift_pattern → pixel_shift_capture → pixel_shift_motion_mask → pixel_shift_merge → false_color_metric
Alternatives: drizzle_resample, align_frames, raw_demosaic_bilinear
Runnable: poc_pixel_shift
Fit Malus’s law per pixel to a 0/45/90/135° polariser sweep and split the radiance into its unpolarised part (2·I_min) and its linearly polarised part (I_max − I_min). Calling those “diffuse” and “specular” is a physical assumption that holds for dielectrics near Brewster’s angle and fails for metals; this entry keeps the two cases apart.
Operators: polarization_dolp_map, polarization_separate, polarization_stokes, specular_diffuse_split
Pipeline: polarization_dolp_map → polarization_separate → polarization_stokes → stokes_analyze → specular_diffuse_split
Alternatives: fresnel_conductor, fresnel_dielectric, brewster_angle_deg, specular_free_transform, specular_coefficient_map
Runnable: example_polarization_metal, poc_polarization_specular, specular_photometric
Turn a polarisation camera’s mosaic (a 2×2 block of 0/45/90/135° analysers, as on commercial on-chip polarisation sensors) into four full-resolution images with polarization_demosaic (bilinear, exact on affine fields, phase-preserving mirrored border) that chain straight into polarization_stokes / polarization_dolp_map. Recover a sample’s Mueller matrix from intensities measured through known generator/analyser states with mueller_from_intensities (linear least squares on outer(a_i, g_i); refuses rank-deficient designs with the rank instead of returning a pseudo-inverse guess). Check any 4×4 matrix with mueller_checks: Cloude coherency eigenvalues (physical), purity, the Gil–Bernabeu depolarisation index and passivity.
Operators: polarization_demosaic, polarization_demosaic_color, polarization_stokes, polarization_dolp_map, polarization_separate, stokes_analyze, mueller_from_intensities, mueller_checks, mueller_element, mueller_apply
Runnable: polarization_camera_pipeline, poc_polarization_specular
The classic ISP stages, each a closed form you can state: black level, dead-pixel detection/correction (a pixel that departs from all eight same-colour neighbours in the same direction), lens-shading gain from a flat field (per colour channel), white-balance gains (gray-world / white-patch) applied on the mosaic or on RGB, a NumPy-only bilinear demosaic (exact on affine fields, phase-preserving mirrored border), a row-normalised colour-correction matrix (white stays white), hue/saturation in BT.601 YCbCr, and brightness/contrast about mid-grey. For inspection work, explainability and repeatability matter more than the polish of a learned ISP.
Operators: raw_black_level, raw_dead_pixel_mask, raw_dead_pixel_correct, lens_shading_gain, lens_shading_correct, awb_gains, raw_apply_gains, rgb_apply_gains, raw_demosaic_bilinear, color_correction_matrix, hue_saturation, brightness_contrast, cfa_to_rgb, gamma
Runnable: raw_to_display_isp
Nine ops in spectralrad complete the spectral chain image = source × optics/object × sensor QE, all as pairs (λ nm, value) like the material curves: Planck blackbody (SI 2019 constants), CIE illuminant A (the defining formula), LED spectra (Ohno 2005 or Gaussian, width solved to the requested FWHM), a super-Gaussian band-pass filter, the Si photodiode QE from the material table’s Si n,k, the energy-to-photon conversion, and curve product, integral and summary. Gates: the CIE A table, Wien and Stefan–Boltzmann, the QE closed form and its thick-detector limit, and Poisson statistics in the rendered images.
Operators: blackbody_spectrum, cie_illuminant_a, led_spectrum, bandpass_spectrum, silicon_photodiode_qe, energy_to_photons, spectral_product, spectral_integral, spectral_stats
Runnable: poc_nir_silicon_transmission
Six ops in linescan: the SNR of an N-stage TDI sensor from the EMVA 1288 linear model (charge-domain and digital-domain summation), the closed-form MTF of a synchronisation error and of a yawed web, an acquisition that transports a reflectance map past a TDI line sensor (speed error, yaw, weave, encoder sync, per-column lens illumination and blur, EMVA 1288 noise), and a ray-traced profile of a finite-conjugate lens across the image height whose relative illumination splits exactly into cos⁴ × pupil × distortion, with sagittal and tangential MTF. Two example lenses (the same triplet optimised for a 57 mm line and for a 2/3-inch format) show why a C-mount lens on a long line sensor goes dark and soft at the ends, and that flat-field correction restores the brightness but not the MTF.
Operators: tdi_snr, tdi_sync_mtf, linescan_acquire, lens_field_profile, linescan_lens_columns, linescan_lens_example
Pipeline: tdi_snr → tdi_sync_mtf → linescan_lens_example → lens_field_profile → linescan_lens_columns → linescan_acquire
Alternatives: lens_system, emva_snr_curve, relative_illumination
Runnable: poc_tdi_linescan
Five ops in filmoptics (category film), with every film and substrate given by its key in the material table: the transfer-matrix reflectance, transmittance and absorptance of a multilayer stack (oblique incidence, s/p, the angular average of a focusing NA, conformal roughness), the interference colour against thickness (the wafer colour chart, in sRGB and CIELAB under D65 or any illuminant), thickness from the fringe period by FFT (dispersion-corrected, with the closed-form lower limit 2/Δx), thickness by a non-linear least-squares fit of the transfer-matrix model (global grid then golden-section refinement, all local candidates returned), and per-pixel thickness maps from a spectral or an RGB image together with a map of how many thicknesses fit equally well.
Operators: multilayer_reflectance, film_color, film_thickness_fft, film_thickness_fit, film_thickness_map
Pipeline: multilayer_reflectance → film_thickness_fft → film_thickness_fit → film_thickness_map
Alternatives: thin_film_reflectance, film_color
Runnable: poc_thin_film_reflectometry
Seven ops in watervision (category watervision of opsoptics) turn the water physics of watermedia into the pictures an inspection camera records. caustic_irradiance gives the irradiance a collimated light leaves on a floor below a wavy surface by a photon count (vector Snell refraction, bilinear splatting, energy conserved) or by the Jacobian of the surface-to-floor map (inf and a flag at the folds); caustic_floor_segmentation cuts the bright web out of it so that a crack detector is not fooled. bottle_image ray-casts the horizontal section of every image row of a bottle (glass wall, liquid with a meniscus, bubbles; Snell, Fresnel, total internal reflection) backlit or frontlit, and fill_level_from_image reads the fill line back. wet_surface_appearance is the Lekner and Dorf (1988) model of why a wet surface is darker (trapped light: a (1 - R_s)(1 - r) / (1 - a r)) and glossier; wet_dry_inspection_pair renders one textured plate dry and wet and returns the defect contrast; underwater_inspection_image is a lamp-at-the-camera hull view with the backscatter veil and the per-pixel SNR.
Operators: caustic_irradiance, bottle_image, fill_level_from_image, wet_surface_appearance, wet_dry_inspection_pair, underwater_inspection_image, caustic_floor_segmentation
Pipeline: caustic_irradiance → caustic_floor_segmentation
Alternatives: bottle_image, fill_level_from_image, wet_surface_appearance, wet_dry_inspection_pair, underwater_inspection_image
Runnable: poc_water_inspection_images
Ten ops in watermedia (category watermedia of opsoptics): the wave spectrum of a wind sea (Pierson-Moskowitz, JONSWAP) and a Tessendorf FFT sea with slopes, normals, choppiness and finite depth; Fresnel reflectance and transmittance of the air-water interface with the dispersive index of the material table; Snell’s window and the apparent depth; the apparent position of an underwater point as a stationary point of the optical path (bisection on a flat surface, Newton iteration with the vector Snell law verified on a wavy one); pure-water absorption (Pope & Fry 1997), scattering (Smith & Baker 1981) and the diffuse attenuation of the Jerlov water types (Solonenko & Mobley 2015); underwater image formation (Akkaynak & Treibitz 2018); the Henyey-Greenstein and Petzold phase functions; and the paraxial focus and real-ray caustic of a cylinder. Inputs outside a table, unknown water types, |
g | >= 1 and n <= 1 are refused; a path that does not satisfy Snell’s law is returned as NaN. |
Operators: ocean_spectrum, ocean_height_field, fresnel_water_air, snell_window, refracted_view, water_attenuation, underwater_image, phase_function_hg, scattering_phase_petzold, cylinder_lens_caustic
Pipeline: ocean_height_field → refracted_view → water_attenuation → underwater_image
Alternatives: ocean_spectrum, fresnel_water_air, snell_window, phase_function_hg, scattering_phase_petzold, cylinder_lens_caustic
Runnable: poc_water_transparent_media
Form beams from an array snapshot to get directions of arrival, and build a range-Doppler map from an FMCW return, mapping detections back to metres and metres per second.
Operators: beamform_delay_sum, beamform_doa, range_doppler_map, range_doppler_peaks
Pipeline: beamform_doa → range_doppler_map → range_doppler_peaks
Alternatives: beamform_delay_sum
Runnable: poc_multibeam_bathymetry, poc_bev_sensor_fusion
Build membrane eigenmodes and nodal lines, two-slit fringes, grating orders, and the printing side (halftone screens, moire, engraving lines, structure-following hatching, mosaic tiles) — and score every one of them against a truth that lives outside the picture. The thesis: a two-slit fringe and the moire of two superposed halftone screens are the same beat, the difference of two frequency vectors, so one formula is checked from both ends. Rectangular membrane eigenvalues match pi^2 (m^2/a^2 + n^2/b^2) to 0.00e+00 including the degeneracies (the widely quoted mn*pi is a product and is a different sequence); circular nodal circles sit at the zeros of J0 (the zeros of J'0 are the antinodes); the fringe period lambda*D/d is measured back by a different op (ratio 0.998-1.003); grating orders round-trip through the existing grating_wavelengths to 550.000000 nm and agree with the existing fraunhofer_pattern, where a 50 % duty grating drops the even orders and the 3rd/1st intensity ratio is sinc(m/2)^2 = 1/9; the moire period is predicted before drawing and confirmed by FFT (0.948-0.986); halftoning discards tone but preserves local mean density (0.0517 mean absolute error through a 4-period window); engraving ink coverage matches the closed form w/d to 0.0000; hatch direction comes from the existing structure_tensor_orientation and lands within 0.3 degrees of a grating whose angle is known by construction; and Lloyd’s energy, measured by the existing stipple_energy, decreases monotonically with the cell mean being the exact L2 optimum.
Operators: wave_membrane_mode, wave_mode_frequencies, wave_nodal_lines, wave_two_slit, wave_fringe_period, wave_grating_orders, halftone_screen, halftone_moire_period, engrave_lines, hatch_field, mosaic_tiles_sites, mosaic_tiles_render
Runnable: poc_beats_fringes_and_screens
Twelve ops in two ledgers. Optics (opsoptics, category cavity): fabry_perot_response (FSR, finesse, linewidth, pole and power gain from mirror transmittances; the public aLIGO design values give F ≈ 445 and a 42 Hz pole), cavity_strain_transfer (single pole times the round-trip sinc), michelson_dc_readout (DC-readout power, strain slope and the shot-noise limit (1/2L)√(ħcλ/πP)), pdh_error_signal (Pound-Drever-Hall, antisymmetric, slope of Black 2001 eq. 15) and quantum_noise_budget (Kimble et al. 2001: shot, radiation pressure and the SQL, with the identity shot × rp = SQL²/2). Signals (ops1d, category matched): psd_welch, whiten_by_psd, matched_filter_snr, optimal_snr, chirp_newtonian, chirp_mass_from_track, coincidence_delay. The PoC runs the pipeline on the public GW150914 data and reproduces the published figure (correlation 0.96 / 0.94), the SNRs 19.0 / 13.1 against ≈ 20 / 13 and the 7 ms arrival delay; the second implementation gwinc agrees within 4–12 %.
Operators: fabry_perot_response, cavity_strain_transfer, michelson_dc_readout, pdh_error_signal, quantum_noise_budget, psd_welch, whiten_by_psd, chirp_newtonian, chirp_mass_from_track, matched_filter_snr, optimal_snr, coincidence_delay
Runnable: poc_gw_detector_pseudo_simulation
Roll-driven periodic marks, rail corrugation, bearing faults: defects that repeat at a fixed interval in a 1-D series. spectrum says whether there is a period, peak_subbin refines which, and the extrema of envelope say where.
Operators: spectrum, find_peaks, peak_subbin, envelope, cepstrum
Pipeline: smooth_funct_1d_gauss → bandpass → spectrum → find_peaks → peak_subbin → envelope → local_min_max_funct_1d
Alternatives: cepstrum, envelope_spectrum, order_spectrum, signal_features, zero_crossings_funct_1d, point_spectrum
Runnable: poc_web_roll_periodicity, poc_rail_corrugation, poc_bearing_diagnosis
Envelope spectra, cepstra, octave bands and the characteristic frequencies of a rolling-element bearing. The frequencies follow from the geometry, so which peak to look at is decided before measuring, not after.
Operators: signal_features, envelope_spectrum, bearing_defect_frequencies, octave_spectrum, spectrum
Pipeline: bandpass → envelope → envelope_spectrum → find_peaks → bearing_defect_frequencies
Alternatives: signal_features, octave_spectrum, spectrum, cepstrum, order_spectrum, rms
Runnable: poc_bearing_diagnosis, poc_rail_corrugation
Align a sequence by voting for the translation, resample sub-pixel, and stack. Point clouds are aligned with ICP.
Operators: frame_align, drizzle_resample, icp_point2point_3d, interp_scattered
Pipeline: align_frames → drizzle_resample → frame_quality
Alternatives: frame_align, icp_point2point_3d, register_cross, interp_scattered
Runnable: poc_astro_photometry, poc_registration_basin
compare_to_golden(image, golden) turns “find what differs from a known-good part” into one call: estimate the integer translation by phase correlation (estimates beyond max_shift are not applied and flagged align_ok=0), optionally Gaussian-smooth both images, take |image − golden|, threshold it inside the inspection mask, label the connected components and drop those under min_area. It returns a measurement dict (shift_row, shift_col, align_ok, ssim, psnr, max_diff, mean_diff, defect_area, defect_count, defect_area_max, valid_fraction) plus the pictures (diff, defect_mask, labels, valid). Border pixels wrapped in by the alignment are excluded from every count. golden_measure(golden, ...) makes the measure callable for inspect_batch and golden_spec(...) the matching judge spec, so pointing at a folder inspects the whole lot against the golden. Mismatched shapes, non-2-D or non-finite images, a mask of the wrong shape and min_area < 1 raise ValueError — never a silent zero-defect result.
Operators: compare_to_golden, golden_measure, golden_spec, inspect_batch, judge, ssim, psnr
Runnable: golden_compare
inspection_fixture(good, bad, recipe, measure=..., spec=...) runs the known-good and known-bad sets through inspect_batch and returns passed=True only when every good part is ok and every bad part is ng. It lists the confusion counts, the escaped bad parts (escapes), the falsely rejected good parts (false_rejects) and unreadable rows (errors), and spec_margins reports per spec key how close the good measurements come to the limits (min_margin in spec units, negative when exceeded; min_margin_norm normalised by the tolerance or half the min–max width, so 1.0 means one limit-width of headroom). An empty set raises ValueError, an unreadable file becomes an error that fails the fixture, and a misspelled spec raises. With report_path the two sets are written to separate _good / _bad reports.
Operators: inspection_fixture, spec_margins, inspect_batch, judge
Runnable: inspection_fixture
inspect_batch(folder, recipe, measure=..., spec=...) is the one call a line operator reaches for first: every image in the folder (or path list, in deterministic order) is loaded, run through the recipe (the same stages run_pipeline takes), measured by your measure callable (any bundle of measurement ops returning a dict) and judged against spec. Each row carries the input file’s sha256, the measurements, an evidence-carrying Verdict and the elapsed time; numeric columns become series and, with two or more points, an EWMA control-chart summary; report_path writes .xlsx / .md / .jsonl by extension and audit_path appends one JSON line per row. judge(measurements, spec) is the entry that turns measurements into the PLC vocabulary (ok / ng / error) with the list of violations and a one-line reason — rules are min/max, nominal±tol (inclusive), eq and in. It never passes silently: missing keys, NaN/inf and non-numeric values are error, a misspelled rule is a ValueError, a broken image becomes an error row without stopping the batch, and an empty batch is refused.
Operators: inspect_batch, judge, as_verdict, run_pipeline, spc_ewma, save_xlsx_report, report, to_json_lines
Runnable: inspection_workflow
It turns per-surface and group manufacturing errors into sensitivity, compensated Monte Carlo, yield, histograms, and assembly travel.
Operators: tolerance_table, tolerance_criteria, tolerance_compensators, tolerance_monte_carlo, tolerance_sensitivity, tolerance_report, tolerance_table_zmx, tolerance_table_from_zmx
Pipeline: tolerance_table → tolerance_criteria → tolerance_sensitivity → tolerance_monte_carlo → tolerance_report
Alternatives: tolerance_analysis, through_focus_mtf, spot_stats
Runnable: poc_lens_tolerancing
Avoid repeated work when several results share validation, fitting, neighbourhood search, interpolation coefficients, or a transform kernel. Composite calls return numerically equivalent results from one shared pass; prepared objects reuse immutable state; streaming and low-memory variants bound temporary allocations.
Operators: curvature_descriptors, HankelPlan, piv_outlier_mask_stream, monogenic_metrics, grid_axes, polarization_analyze, PreparedVolProbe, prepare_vol_probe, unpack_lsb
Pipeline: polarization_separate
Alternatives: curvature_descriptors, HankelPlan, piv_outlier_mask_stream, monogenic_metrics, grid_axes, polarization_analyze, prepare_vol_probe, unpack_lsb
Runnable: perf_pointcloud_descriptors, perf_monogenic_metrics, perf_prepared_volume_probe, perf_polarization_analyze, perf_hankel_plan_and_piv_stream
One JSON form per sort and one way back: a self-describing envelope, float arrays as base64 little-endian float64 (bit-exact round trips, tested with the same probes the op gates use), run-length regions, contours as shape plus point lists, tables as plain JSON. Thin conveniences ride along — save_json / load_json for a file, to_json_lines / from_json_lines for a growing ledger as JSON Lines. Unknown sorts, shapes that do not fit the sort and wrong envelope versions are refused — nothing is guessed from an array’s shape.
Operators: to_json, from_json, to_jsonable, from_jsonable, save_json, load_json, to_json_lines, from_json_lines, as_value, apply_json, is_envelope
Runnable: typed_results_json
The Markdown companion of jsonio. to_markdown renders a typed value as GFM — real tables for tabular and small numeric sorts (capped, with a truncation note), a one-line summary for things that are not text (an image is its shape and range). json_block wraps the exact JSON envelope in a ```json fence so a value survives inside prose and round-trips bit-for-bit through extract_json, which pulls every fullseye envelope out of a Markdown string and ignores foreign fences. report folds a list of sections into one document that is both readable and, with with_json=True, machine-recoverable. Fail-closed on an unknown sort, exact wherever a machine reads it back.
Operators: to_markdown, json_block, extract_json, report
Runnable: typed_results_markdown
save_xlsx_report(sections, path) writes the same (heading, value, sort) sections that mdio.report renders as Markdown, but as a real Excel workbook: tabular sorts (table, points, matrix, signal, vector, keypoints, counts) become spreadsheet cells, feature / scalar a single cell, and image-like sorts (image, color, region …) an embedded thumbnail. jsonio is the machine-exact JSON, mdio the human-readable Markdown, and xlsxio the shop-floor Excel — the same one sections list feeds all three, only the destination differs. It uses openpyxl (the optional xlsx extra) and raises a clear ImportError when it is missing rather than silently degrading; an image that cannot be embedded falls back to a one-line shape/range cell so a thumbnail never breaks the report (fail-soft). Unknown sorts raise ValueError.
Operators: save_xlsx_report, report, to_markdown, save_json
Runnable: xlsx_report
Panel grids, dimension and pointer annotations, height pseudo-colour, and a full SDF renderer — all from Fullseye operators, so a result becomes a figure without a plotting library in between.
Operators: annotate_figure_grid, colorize_height, render_beauty
Pipeline: annotate_figure_grid → annotate_panel_label → annotate_scale_bar → annotate_colorbar
Alternatives: colorize_height, render_beauty, annotate_legend, annotate_inset
Runnable: poc_colormap_readability, poc_dem_terrain
write_viewer(spec, path, lang=...) writes one self-contained HTML page (dark theme, plain WebGL and 2-D canvas, no libraries, no external loads; works from file:// and on iPhone Safari). Tabs hold the same task attempted by different methods; each carries an honest badge (passed / limit / null), a short text and measured numbers. Payloads: a triangle mesh with per-vertex scalar colour and a colour bar; a point cloud (scalar or RGB colour, optional grey ghost cloud); a 2-D frame sequence with overlaid boxes and a thresholded time-series plot; a before/after pair with a draggable split; and moving 3-D (viewer_anim3d_tab): each rigid body’s mesh is stored once and only its per-frame pose (position + quaternion, quantised to uint16 / int16) is stored per frame, with fading trails, point-cloud snapshots, stage markers you can jump to, time series and 2-D image panes (embedded as lossless PNG) played on the same clock, frame stepping, 0.25-4x speed, loop and a smoothed follow camera; a body may carry "alpha" (0 < alpha <= 1) to be drawn translucent after trails and point clouds, so rays passing through a lens or glass plate stay visible. lang is a code or a list (first is the default) from ja, en, zh, tw, ko, de, hi, fr; every requested language must be present for every string or ValueError names the missing keys (no silent fallback). Data is quantised, never decimated: positions as per-axis uint16, values as uint16 over the colour-bar range, images and indices lossless. Standard library and NumPy only. The same call is available as the MCP tool fullseye_write_viewer.
Operators: write_viewer, viewer_spec, viewer_points_tab, viewer_mesh_tab, viewer_frames_tab, viewer_split_tab, viewer_anim3d_tab
Runnable: interactive_poc_viewer, interactive_anim3d_viewer
Draw a polyline or a region in the inverse of whatever is underneath, so the overlay stays visible without knowing the background. draw="margin" outlines instead of filling. The one real failure mode — mid-grey, where the complement equals the original — is measured rather than assumed: annotate_invert_visibility reports the per-pixel WCAG contrast, and the drawing ops warn (or refuse) when the mark would be invisible.
Operators: annotate_invert, annotate_invert_path, annotate_invert_visibility
Pipeline: annotate_invert_visibility → annotate_invert → annotate_invert_path
Alternatives: annotate_legend, text_box
Runnable: annotate_paper_tour
Draws a point cloud that has no surface — cell positions, LiDAR returns, sparse SfM points, particles — as an RGB image. Each point drops a sub-pixel footprint (gaussian / disc / point) that is alpha-composited in depth order (over) or added with the total light conserved (add, a density map). The camera follows the OpenCV convention of project_points / render_point_depth; an orthographic render fits the cloud to the image when K is omitted.
Operators: points_render, render_point_depth, project_points
Pipeline: points_render
Alternatives: render_point_depth, points_activity_video, gs_render, render_mesh
Runnable: points_render_basics, poc_flybrain_pointcloud
Place text on an image where you actually want it: nine-way anchors, translucent plates, wrapping, and — along a polyline — slanted, vertical (upright=True), multi-line (\n), start/centre/end alignment and a perpendicular offset. Colour, plus synthetic bold and italic. annotate_table turns a tab-separated string into a table whose column widths are measured with the real font at the requested size, with a font-size-proportional column gap, automatic right-alignment for numeric columns and a translucent plate. Every one has a *_layout twin that returns the geometry so you can check the placement before drawing.
Operators: text_box, annotate_text_path, annotate_text_path_layout, annotate_table, annotate_table_layout, measure_text
Pipeline: measure_text → annotate_text_path_layout → annotate_text_path → annotate_table_layout → annotate_table
Alternatives: text_box, annotate_panel_label
Runnable: annotate_paper_tour
Turn the tone of a picture into a single closed line a pen could draw without lifting: points are placed by darkness (weighted Lloyd), ordered into a closed tour, resampled at equal arc length, and rewritten as a chain of rotating circles via the complex Fourier series. Nothing is judged by eye. The stipple is checked against a ramp (correlation 0.9946) with a flat image as the control — and the exponent is measured too, because a centroidal Voronoi tessellation puts density at sqrt(rho), not rho (Gersho): 0.61 measured, 0.77 with the weight squared. The tour is checked against the minimum spanning tree, which no closed tour can beat (1.146, against 41.4 for coordinate order); the tone is measured (0.984, against +0.013 for random points); the pen width that reproduces the mean tone is solved in closed form and falls 11 % short, which is the stroke overlap; the resampling is checked against Nyquist (the error falls as 1/N: 6.5, 3.3, 1.6 % of the stroke length); and Parseval turns the number of circles into a prediction made before the drawing exists.
Operators: stipple_points_from_image, stipple_energy, stroke_tour_closed, mst_length, stroke_resample_closed, stroke_tone_error, contour_fourier_complex, contour_epicycle_chain, contour_fourier_truncation_energy
Runnable: poc_one_stroke_epicycles
Eight ops in optdraw (category drawing of opsoptics) that draw what the optics ops compute: a meridional lens layout from a raytrace prescription (conic + aspheric sags, edges, stop, image plane, real rays aimed at the stop and coloured by field, EFL / BFL / track / image-height dimensions, a prescription table), a side + top view of a machine-vision setup from vision_layout (field-of-view cone, working distance, depth-of-field band, five light families with positions and elevation angles), and an ISO 10110-style element drawing whose tolerances come from the tolerance_analysis dictionary. Writers for SVG and DXF R12 use only the standard library; readers bring coordinates and text back so the gates score the written file, not the picture.
Operators: lens_section_drawing, vision_setup_drawing, lens_element_drawing, drawing_svg, drawing_dxf, drawing_raster, svg_entities, dxf_entities
Pipeline: lens_section_drawing → drawing_svg → drawing_dxf → svg_entities → dxf_entities
Alternatives: vision_setup_drawing, lens_element_drawing, drawing_raster, paraxial_trace, tolerance_analysis
Runnable: poc_optics_drawings
Eight ops in lensrender (category lensrender of opsoptics) photograph a 3-D scene through a raytrace.lens_system prescription by sensor-side ray tracing (Kolb, Mitchell & Hanrahan 1995): the exit pupil is sampled for every sensor point, each ray is traced backwards through every surface (Snell’s law with dispersion, conics and aspheres, mirrors, semi-diameters as stops, total internal reflection) into object space, the scene is shaded there (textured planes, spheres, triangle meshes, Lambertian plus a Blinn-Phong lobe, shadows, point sources splatted by forward tracing) and the radiance is summed with the weight cos^2(theta)/d^2 of the pupil sample. The irradiance becomes electrons (E dlambda A t (lambda/hc) QE) and goes through shot noise, dark electrons, read noise and the quantiser. bokeh_shape gives the out-of-focus footprint (the cat’s eye), render_ghost_overlay adds the two-reflection ghosts of a bright point and render_compare_prescriptions renders one scene through several prescriptions and tabulates RMS spots, corner illumination, distortion, lateral colour and the edge rise and MTF50. Geometric optics only: no diffraction.
Operators: lens_scene, exit_pupil_samples, trace_sensor_rays, scene_radiance, render_scene_through_lens, bokeh_shape, render_ghost_overlay, render_compare_prescriptions
Pipeline: lens_system → lens_scene → render_scene_through_lens → render_compare_prescriptions
Alternatives: exit_pupil_samples, trace_sensor_rays, scene_radiance, bokeh_shape, render_ghost_overlay, render_through_lens, ghost_analysis
Runnable: poc_photograph_through_prescription
Generates pictures that ship with their own ground truth: optical illusions whose denied invariant is exact (parallel, equal-length, identical-valued), endless generative systems whose correctness is an identity rather than an appearance, and seamless loops where the seam is absent by construction rather than removed by editing.
Operators: illusion_cafe_wall, illusion_muller_lyer, illusion_checker_shadow, illusion_kanizsa, illusion_fraser_spiral, illusion_ground_truth, perpetual_elementary_ca, perpetual_langtons_ant, perpetual_apollonian, perpetual_flow_field, perpetual_identities, perpetual_state, perpetual_step, perpetual_render, perpetual_loop, perpetual_loop_seam
Runnable: poc_illusions_and_perpetual_drawing
It traces a prescription, microlens array and sensor, then decodes the raw frame to the repository’s (V,U,H,W) light-field array for direct refocus and depth processing.
Operators: mla_surface, plenoptic_system, plenoptic_capture, plenoptic_mla_calibrate, plenoptic_decode, plenoptic_refocus_depth
Pipeline: mla_surface → plenoptic_system → plenoptic_capture → plenoptic_mla_calibrate → plenoptic_decode → plenoptic_refocus_depth
Alternatives: lf_from_mla, lf_refocus, lf_depth_from_focus, trace_sensor_rays
Runnable: poc_plenoptic_camera
Draw mathematically beautiful figures whose correctness is asserted by a theorem rather than by eye: an Apollonian gasket (every tangent quadruple satisfies Descartes’ circle theorem to 1e-13, and an integral seed stays integral for ever), Ford circles (tangency agrees with |ps - qr| = 1 on all 1,081 pairs, and the count matches 1 + sum of Euler's totient), a geodesic dome (exactly 12 degree-5 vertices at every subdivision — counted by the existing graph_degree_table, not by this module), Vogel’s phyllotactic spiral (neighbour index gaps land on Fibonacci numbers only at the golden angle: 7/7 against 2/7 for the controls), IFS attractors (Moran’s closed-form dimension agrees with the existing box-counting fractal_dimension, and non-similarity maps are refused), and space-filling curves (a permutation of 4^n cells with unit steps; locality reported as a table, not a slogan).
Operators: circle_packing_apollonian, ford_circles, phyllotaxis_pattern, neighbour_index_gaps, ifs_fractal, ifs_similarity_dimension, space_filling_curve, curve_locality, geodesic_dome
Runnable: poc_theorems_as_pictures