From 159738eafd7dbaf940f0bb2e6ea156f28a6fc8d5 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Tue, 2 Apr 2019 22:00:33 +0200
Subject: [PATCH] Add some log messages to apply_model()

---
 src/imcflibs/imagej/shading.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/imcflibs/imagej/shading.py b/src/imcflibs/imagej/shading.py
index 6f71332..6eda795 100644
--- a/src/imcflibs/imagej/shading.py
+++ b/src/imcflibs/imagej/shading.py
@@ -38,14 +38,16 @@ def apply_model(imps, model, merge=True):
         The merged ImagePlus with all channels, or the original list of stacks
         with the shading-corrected image planes.
     """
+    log.debug("Applying shading correction...")
     calc = ij.plugin.ImageCalculator()
-    for stack in imps:
-        # log.debug("Processing channel...")
+    for i, stack in enumerate(imps):
+        log.debug("Processing channel %i...", i)
         calc.run("Divide stack", stack, model)
 
     if not merge:
         return imps
 
+    log.debug("Merging shading-corrected channels...")
     merger = ij.plugin.RGBStackMerge()
     merged_imp = merger.mergeChannels(imps, False)
     return merged_imp
-- 
GitLab