Skip to content

Commit 91be7f9

Browse files
committed
Create test_animate.py
1 parent d141449 commit 91be7f9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

tests/artists/test_animate.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import WrightTools as wt
2+
from WrightTools import datasets
3+
from matplotlib import pyplot as plt
4+
5+
6+
def test_animate2D():
7+
"""
8+
smokescren test: just ensure the ani object initializes
9+
10+
if you are running this locally, you can view the animation
11+
by running this script
12+
"""
13+
d = wt.open(datasets.wt5.v1p0p1_MoS2_TrEE_movie)
14+
d.channels[0].signed = True
15+
from matplotlib.colors import CenteredNorm
16+
from functools import partial
17+
ani = wt.artists.animate2D(d, interval=1, norm=partial(CenteredNorm, vcenter=0))
18+
return ani
19+
20+
21+
if __name__ == "__main__":
22+
ani = test_animate2D()
23+
plt.show()

0 commit comments

Comments
 (0)