From 7126f325ab48dac7e013462a64de57df1b3f205a Mon Sep 17 00:00:00 2001 From: "edward.safford" Date: Wed, 20 Sep 2023 19:51:43 +0000 Subject: [PATCH] Ref #156 Fix no plots for datasets with no channels. --- src/eva/plotting/emcpy/plot_tools/figure_driver.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/eva/plotting/emcpy/plot_tools/figure_driver.py b/src/eva/plotting/emcpy/plot_tools/figure_driver.py index 1a5e27ef..33ef2d26 100644 --- a/src/eva/plotting/emcpy/plot_tools/figure_driver.py +++ b/src/eva/plotting/emcpy/plot_tools/figure_driver.py @@ -66,14 +66,15 @@ def figure_driver(config, data_collections, timing, logger): # Get potential variables variables = batch_conf.get('variables', []) - # Get list of channels + # Get list of channels and load step variables channels_str_or_list = batch_conf.get('channels', []) channels = parse_channel_list(channels_str_or_list, logger) - step_vars = channels + + step_vars = channels if channels else ['none'] step_var_name = 'channel' title_fill = ' Ch. ' - # Get list of levels + # Get list of levels, conditionally override step variables levels_str_or_list = batch_conf.get('levels', []) levels = parse_channel_list(levels_str_or_list, logger) if levels: @@ -84,8 +85,6 @@ def figure_driver(config, data_collections, timing, logger): # Set some fake values to ensure the loops are entered if not variables: logger.abort("Batch Figure must provide variables, even if with channels") - if not channels: - channels = ['none'] # Loop over variables and channels for variable in variables: