Skip to content

Commit

Permalink
minor: trailing output #24
Browse files Browse the repository at this point in the history
  • Loading branch information
anwarnunez committed Jul 7, 2020
1 parent 476f463 commit 228a33b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions examples/introduction/demo_show_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
animation = pyramid.show_filter(1337)

# %%
# The animation should look like this:
# The animation should look something like this:
#
# .. raw:: html
#
Expand All @@ -26,22 +26,18 @@
pprint(pyramid.filters[1337])



# %%
# (*Ignore. This code is needed to convert animation to MP4 and adding it to the gallery*)
# (*Ignore this code block. It is needed to display the animation as a video on this website*)
output = '../../docs/build/html/_downloads/example_moten_filter.mp4'
fig = animation._fig
title = 'Example filter:\ndirection of motion=180, spatial fq=16cpi, temporal fq=4Hz'
fig.suptitle(title)
animation.save(output)
fig.clf()
del(fig)


# sphinx_gallery_thumbnail_number = 2
import matplotlib.pyplot as plt
spatial_component = pyramid.get_filter_spatial_quadrature(1337)[1]
fig, ax = plt.subplots()
ax.matshow(spatial_component, vmin=-1, vmax=1, cmap='coolwarm')
ax.set_xticks([])
ax.set_yticks([])
__ = ax.set_xticks([])
__ = ax.set_yticks([])

0 comments on commit 228a33b

Please sign in to comment.