Skip to content

Document i1Display3 per-unit spectral correction limitation#2

Merged
HarperZ9 merged 4 commits into
mainfrom
fix/i1d3-spectral-docs
Mar 29, 2026
Merged

Document i1Display3 per-unit spectral correction limitation#2
HarperZ9 merged 4 commits into
mainfrom
fix/i1d3-spectral-docs

Conversation

@HarperZ9
Copy link
Copy Markdown
Owner

Summary

  • Documented that the native i1Display3 driver uses hardcoded correction matrices instead of per-unit EEPROM data
  • Marked matrices as approximate in source code
  • Updated README to disclose limitation and recommend ArgyllCMS for measured calibration
  • Created issue i1Display3: Read per-unit spectral sensitivity curves from EEPROM #1 to track the proper fix (EEPROM reading)

Sensorless mode is unaffected.

Thanks to dogelition for identifying this via community feedback.

Test plan

Zain Dana Harper and others added 4 commits March 29, 2026 01:04
The native i1Display3 driver uses hardcoded correction matrices instead
of reading per-unit spectral sensitivity curves from the device EEPROM.
Unit-to-unit variance is significant and the hardcoded matrices can
produce incorrect measurements, especially on OLED and wide-gamut displays.

Changes:
- Added detailed comment in i1display.py explaining the issue and fix path
- Marked correction matrices as approximate, per-unit EEPROM needed
- Updated README to disclose the limitation and recommend ArgyllCMS backend
- Created issue #1 to track the proper fix

The sensorless calibration mode is unaffected.
Thanks to dogelition for identifying this issue.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Native fix for issue #1: i1Display3 per-unit spectral correction.

The driver now reads calibration matrices from the connected device's
EEPROM instead of using hardcoded constants. Each i1Display3 unit stores
unique calibration data for 9 display technologies.

New implementation:
- _read_eeprom(offset, length): Reads raw bytes via USB HID CMD_RD_EE (0x0800)
  with chunked reads for requests > 58 bytes
- _parse_cal_matrix(raw): Parses 3x3 big-endian IEEE 754 double matrix (72 bytes)
- _read_calibration(): Reads OLED matrix from device EEPROM at offset 0x199C,
  validates values, falls back to approximate constants only if read fails
- set_display_type(type): Loads any of the 9 calibration matrices from this
  device (OLED, WhiteLED, CCFL, WideGamutCCFL, RGBLED, etc.)
- _cal_source field tracks provenance: "device_eeprom" vs "fallback_approximate"

CAL_OFFSETS maps all 9 stored calibration blocks:
  Ambient (0x0058), CCFL (0x04D8), WideGamutCCFL (0x0958),
  WhiteLED (0x0DD8), RGBLED (0x1258), OLED (0x191C),
  RGPhosphorBlueLED (0x1B58), WideGamutLEDPA2 (0x1FD8), Last (0x2458)

The fallback matrix (from NEC MDSVSENSOR3) is preserved for devices where
EEPROM reading fails, but is now clearly marked as approximate.

297 tests pass. No regressions.
Addresses #1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
set_display_correction() now attempts to read per-unit calibration from
the native i1Display3 EEPROM driver before falling back to hardcoded
approximate matrices.

Flow:
1. Open native i1D3 driver
2. Read per-unit EEPROM matrix for the requested display type
3. Use the device-specific matrix for correction
4. If native driver unavailable or EEPROM read fails, fall back to
   approximate constants (with clear provenance)

This replaces the workaround (hardcoded matrices for all units) with
the native fix (per-unit EEPROM data from each specific device).

297 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced limitation notice with description of the actual capability:
native USB HID driver reads per-unit calibration from each device's EEPROM.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@HarperZ9 HarperZ9 merged commit e928c71 into main Mar 29, 2026
0 of 9 checks passed
@HarperZ9 HarperZ9 deleted the fix/i1d3-spectral-docs branch March 31, 2026 03:46
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.

1 participant