From ab6ecd9fafdcdb04e70f0b7b8cde7a1fc4ec55a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Huwyler?= Date: Mon, 17 Jun 2019 15:43:01 +0200 Subject: [PATCH] Only printout if verbosity_level >= 1 --- irisreader/utils/animate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irisreader/utils/animate.py b/irisreader/utils/animate.py index bd59e72..088228d 100644 --- a/irisreader/utils/animate.py +++ b/irisreader/utils/animate.py @@ -4,6 +4,7 @@ import matplotlib.pyplot as plt import numpy as np from IPython.display import HTML +import irisreader as ir def animate( data_cube, raster_pos=None, index_start=None, index_stop=None, interval_ms=50, gamma=0.4, figsize=(7,7), cutoff_percentile=99.9, save_path=None ): """ @@ -57,7 +58,7 @@ def animate( data_cube, raster_pos=None, index_start=None, index_stop=None, inte raise Exception("Please make sure that index_start < index_stop < n_steps") # release a duration warning - if index_stop-index_start > 100: + if index_stop-index_start > 100 and ir.config.verbosity_level >= 1: print( "Creating animation with {} frames (this may take while)".format(index_stop-index_start) ) # initialize plot