From 0f29d7c6144210348f73a620d979ac9ba5b2cb3f Mon Sep 17 00:00:00 2001 From: Scott Lawson Date: Wed, 4 Jan 2017 23:21:09 -0800 Subject: [PATCH] Minor PEP8 formatting change --- python/visualization.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/visualization.py b/python/visualization.py index 84a06ac..0912acf 100644 --- a/python/visualization.py +++ b/python/visualization.py @@ -132,14 +132,17 @@ def visualize_energy(y): # Set the new pixel value return np.concatenate((p[:, ::-1], p), axis=1) -prev_spectrum = np.tile(0.01, config.N_PIXELS // 2) + +_prev_spectrum = np.tile(0.01, config.N_PIXELS // 2) + + def visualize_spectrum(y): """Effect that maps the Mel filterbank frequencies onto the LED strip""" global prev_spectrum y = np.copy(interpolate(y, config.N_PIXELS // 2)) common_mode.update(gaussian_filter1d(y, sigma=2.0)) diff = y - prev_spectrum - prev_spectrum = np.copy(y) + _prev_spectrum = np.copy(y) r = gaussian_filter1d(y, sigma=0.5) - common_mode.value # g = gaussian_filter1d(y, sigma=0.5) - common_mode.value b = gaussian_filter1d(y, sigma=0.0) - common_mode.value