From 170e17b9d509add37cae7ac277125c3ddfec04c7 Mon Sep 17 00:00:00 2001 From: Jakub Both Date: Fri, 22 Nov 2024 11:38:24 +0100 Subject: [PATCH] MAINT: Add logging to multichromatic tracer analysis. --- src/darsia/presets/analysis/multichromatictracer.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/darsia/presets/analysis/multichromatictracer.py b/src/darsia/presets/analysis/multichromatictracer.py index c234d77d..8e3ba144 100644 --- a/src/darsia/presets/analysis/multichromatictracer.py +++ b/src/darsia/presets/analysis/multichromatictracer.py @@ -3,12 +3,15 @@ """ +import logging from typing import Optional import numpy as np import darsia +logger = logging.getLogger(__name__) + class MultichromaticTracerAnalysis(darsia.ConcentrationAnalysis): """Multichomratic concentration analysis tailored to labeled media. @@ -108,8 +111,14 @@ def __call__(self, image: darsia.Image) -> darsia.Image: Image: concentration map """ + from time import time + + tic = time() concentration = super().__call__(image) + logger.debug(f"concentration call: {time() - tic}") + tic = time() self.expert_knowledge(concentration) + logger.debug(f"expert knowledge - concentration: {time() - tic}") return concentration # ! ---- SAVE AND LOAD ----