# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: pivpy
#     language: python
#     name: pivpy
# ---

# +
from pivpy import io, graphics, pivpy
import pkg_resources as pkg
import matplotlib.pyplot as plt


import os

filename = pkg.resource_filename('pivpy','data/openpiv/exp1_001_b.txt')
data = io.load_vec(filename,variables='x,y,u,v')
data = data.piv.vec2scal('vorticity')
# -

graphics.contour_plot(data.isel(t=0))

data.piv.vec2scal('ke');

graphics.contour_plot(data.isel(t=0))

data.piv.quiver()

d = data.isel(t=0)
plt.quiver(d.x,d.y,d.u.T,-d.v.T,scale=200)
plt.gca().invert_yaxis()



StarcoderdataJupyterScriptsDedupFiltered