From cac09045547019d0e5ac249118e7ada39a27b3d1 Mon Sep 17 00:00:00 2001
From: David Robert Verelst <dave@dtu.dk>
Date: Tue, 4 Apr 2017 19:13:28 +0200
Subject: [PATCH] prepost.dlcplots: only apply check if more than one run_dir
 present

---
 wetb/prepost/dlcplots.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/wetb/prepost/dlcplots.py b/wetb/prepost/dlcplots.py
index 4c689434..97cf0bf8 100644
--- a/wetb/prepost/dlcplots.py
+++ b/wetb/prepost/dlcplots.py
@@ -502,7 +502,9 @@ def plot_dlc_stats(df_stats, plot_chans, fig_dir_base, labels=None,
             # when only one of the channels was present, but the set is still
             # complete.
             # FIXME: what if both channels are present?
-            if len(ch_names) > 1 and (lens[0] < 1) or (lens[1] < 1):
+            if len(ch_names) > 1 and (lens[0] < 1):
+                continue
+            elif len(ch_names) > 1 and len(lens)==2 and lens[1] < 1:
                 continue
 
             print('start plotting:  %s %s' % (str(dlc_name).ljust(7), ch_dscr))
-- 
GitLab