Skip to content

Commit

Permalink
Ref #156
Browse files Browse the repository at this point in the history
Fix no plots for datasets with no channels.
  • Loading branch information
EdwardSafford-NOAA committed Sep 20, 2023
1 parent a768642 commit 7126f32
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/eva/plotting/emcpy/plot_tools/figure_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 7126f32

Please sign in to comment.