@@ -17,7 +17,6 @@ class LSC(Module):
out_name = 'GenericLSC'
def __init__(self, *,
- debug: list,
sector_shape: tuple,
sector_x_gradient: lt.Gradient,
sector_y_gradient: lt.Gradient,
@@ -25,8 +24,6 @@ class LSC(Module):
smoothing_function: lt.Smoothing):
super().__init__()
- self.debug = debug
-
self.sector_shape = sector_shape
self.sector_x_gradient = sector_x_gradient
self.sector_y_gradient = sector_y_gradient
@@ -4,6 +4,8 @@
#
# module.py - Base class for algorithm-specific tuning modules
+from pathlib import Path
+
# @var type Type of the module. Defined in the base module.
# @var out_name The key that will be used for the algorithm in the algorithms
@@ -15,8 +17,12 @@ class Module(object):
out_name = 'GenericAlgorithm'
def __init__(self):
+ self.debug = None
pass
+ def enable_debug(self, output_dir: Path):
+ self.debug = output_dir
+
def validate_config(self, config: dict) -> bool:
raise NotImplementedError
@@ -10,7 +10,6 @@ from libtuning.modules.lsc import ALSCRaspberryPi
ALSC = \
ALSCRaspberryPi(do_color=lt.Param('do_alsc_colour', lt.Param.Mode.Optional, True),
luminance_strength=lt.Param('luminance_strength', lt.Param.Mode.Optional, 0.5),
- debug=[lt.Debug.Plot],
sector_shape=(16, 12),
sector_x_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront),
sector_y_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront),
@@ -14,7 +14,6 @@ from libtuning.modules.lsc import LSCRkISP1
tuner = lt.Tuner('RkISP1')
tuner.add(LSCRkISP1(
- debug=[lt.Debug.Plot],
# This is for the actual LSC tuning, and is part of the base LSC
# module. rkisp1's table sector sizes (16x16 programmed as mirrored
# 8x8) are separate, and is hardcoded in its specific LSC tuning
Prepare for per-module debugging infrastructure in the base Module class. The debug parameter will be provided from a command line argument as opposed to from the tuning script as was originally planned. Remove the debug parameter from the LSC constructor (it is the only module that we have so far). As the debug parameter currently does not do anything, no regression is introduced. Update the tuning scripts accordingly. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- utils/tuning/libtuning/modules/lsc/lsc.py | 3 --- utils/tuning/libtuning/modules/module.py | 6 ++++++ utils/tuning/raspberrypi/alsc.py | 1 - utils/tuning/rkisp1.py | 1 - 4 files changed, 6 insertions(+), 5 deletions(-)