Skip to content

Commit

Permalink
Only printout if verbosity_level >= 1
Browse files Browse the repository at this point in the history
  • Loading branch information
chuwyler committed Jun 17, 2019
1 parent 458bdf5 commit ab6ecd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion irisreader/utils/animate.py
Expand Up @@ -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 ):
"""
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ab6ecd9

Please sign in to comment.