summaryrefslogtreecommitdiff
path: root/tutorials/module_4/schlieren/schlieren.py
blob: 45eda4ef87b289b6f96f29e38114f592e4a251e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 17 11:56:51 2025

Title: Schlieren Imagery Animation
@author: christian
"""



import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colormaps


# Load data
frames = np.arange(1,11)
density = []

for f in frames:
    file = f"data/density{f:04d}.txt"
    data = np.loadtxt(file)
    print("loaded:", file, np.shape(data))
    density.append(data)

mdm = np.stack(density)

print(mdm)


"""
frame = np.loadtxt("density*.txt")
print(frame.shape)

for i in frame:
    np.loadtxt(

x = np.linspace(0,10*np.pi,1000)
y = np.sin(x)

plt.pcolormesh(x,y)
plt.show()
"""