Skip to content

Example custom tuning files

This MR ships our own tuning files and rearranges the tuning file utils to not need to import picamera2 (allowing more testing). It also shifts logic for processing data for tuning files from the main picamera Thing into the tuning file utils files

Closes #427 #565

This MR contains the following

  • Adds a README explaining the sections of default tuning files, what we do to modify them, and why
  • Provides custom tuning files for the sensors on the HQ and v2 cameras with:
    • The bare minimum parameters for adaptive algorithms we turn off
    • Base lens shading tables that are flat in luminance, but approximately correct in colour
    • CCMs linearly interpolated from the default files to be at 5000k (in the future these will be calculated from colour calibration slides.
  • Fixes typos
  • Makes reset CCM, reset from the default tuning file we ship
  • Loads custom tuning file, using our own method not tied to picamera2
  • Add a large number of tests for the tuning file modifications
  • Rename (s|g)et_static_(lst|ccm) to just (s|g)et_(lst|ccm) as all CCMs/LST are static now.
  • Check if PiCamera is calibrated based on the colour temperature of the lens shading tables. 5000k (our illumination colour temperature) is used to show it is calibrated, 1234k is used for uncalibrated lens shading tables.

Before Merge

  • Test on a microscope with a HQ camera

Merge checklist:

  • All new/changed functions have up to date typehints and docstrings
  • Any UI updates have a before and after screenshot in the MR description
  • Unit testing of new functionality has similar or better coverage than similar existing code
  • This code has been tested on a microscope
    • Webapp has been recompiled, with aesthetic changes checked in light and dark mode (if changed)
    • With updated settings JSON (if changed)
    • SmartScan and live stitching work
Edited by Julian Stirling

Merge request reports

Loading