Skip to content

Upgraded pyOpticfilm backend to use version 1.3.1 (from 1.3.0) which fixes some critical bugs and uncaught regression issues introduced in 1.3.0) - #1007

Merged
marcinz606 merged 2 commits into
marcinz606:mainfrom
jboneng:feat/upgrade_pyOpticfilm_backend_to_v1.3.1
Aug 29, 2026
Merged

Conversation

@jboneng

@jboneng jboneng commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This update introduces important bug fixes, and fixes uncaught regression issues introduced in 1.3.0:

[1.3.1] - 2026-08-29

Added

  • Manual exposure overrides (GL128): Scanner.scan(single_pass_exposure=..., me_short_exposure=..., me_long_exposure=...) send an exact REG_EXPOSURE for the retained single-pass, ME short, or ME long pass, bypassing adaptive selection, PPI clamp, and me_hardware_max_exposure. me_long_exposure takes precedence over me_exposure_mode. Values are validated for the 24-bit register range (1–0xFFFFFF); out-of-range values raise ValueError. All three default to None (unchanged behavior) and never apply to the discarded GL128 priming pass. Scan Lab exposes matching Manual exposure overrides fields.
  • GL128 priming-pass override: Scanner.scan(gl128_prime=False) skips the discarded first-scan AGOHOME-park pass for that call (debug/testing only — expect ~30 px of first-scan position drift). Skipping does not mark the scanner as primed, so a later call without the override still primes normally. ScanStatus / on_status gains "prime_skipped". Defaults to True (unchanged behavior). Scan Lab Disable priming pass (debug) applies to Prescan and Scan.

Fixed

  • Cropped 8200i SE ENDPIXEL dummy suffix: STR/END are computed in native 7200 dpi clocks (session 03 origin STR 242 / END 10610; same crop keeps STR/END at 1800 and 3600). The last ~24 output columns at 1800 (96 native clocks; image left after mirror_x) are a per-line USB dummy suffix plus the invert-white transition — shrinking ENDPIXEL does not remove them. Decode drops that fixed width after shading; USB line_bytes stays locked to the programmed span. Heuristic post-decode edge trim is not used (pcap 7200 URB-wider-than-span trim stays). IR column flatten still uses inset edge levels and a gain cap so residual edge samples cannot blow up to ~56k. Pass registration fills shift borders from interior columns instead of replicating padding (which widened the IR bright band and caused NegPy ICE over-repaint). Scan Lab surfaces IR align shift in the status bar / IR caption.
  • OpticFilm 8100 (V2) geometry/timing: five constants inherited from the 8200i SE without V2 capture proof are now V2-specific — feed_to_scan_steps 13128 (was 13704; fixes ~1 mm clipped at the top of full-frame scans), 7200 dpi LPERIOD 16035 (was 15963), 7200 white-shading strip dummy clock 0x10 (was 0x17), max_image_lincnt_by_feed2 {13128: 29012} (was SE preview entry 4836), and ladder_feed2_steps 13128 (was SE 13560).
  • GL128 consecutive-scan AFE strip timeout: after an image pass, stationary AFE START could hang for 5s at status 0xcd (home, buffer empty, lamp on, motor still enabled). Scan Lab reported AFE strip: no stationary data ready within 5s (last status=0xcd) — including 1800→3600 with the same crop (DPI cache miss remesures calib). Stationary acquires now abort START, confirm SCAN/motor-off from hardware (park leaves 0x02 armed), program session-03 dark-strip clocks, write SCAN absolutely, and retry START once. Colour shading remesure reuses existing AFE codes when the last search was colour.

Changed

  • GL128 AFE zero-collapse recovery logs now name which offset/gain components collapsed, which fallback was used, and warn when image colour may be degraded.

Contributors

  • @TobbyTravel for OpticFilm 8100 (V2) capture-derived geometry/timing fixes and for GL128 manual exposure overrides, priming-pass skip, and improved AFE zero-collapse diagnostics.

@jboneng
jboneng marked this pull request as ready for review August 29, 2026 18:56
@marcinz606
marcinz606 merged commit 8850149 into marcinz606:main Aug 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants