Skip to content

Commit 2e074bc

Browse files
committed
Adding example
1 parent 3b76ee1 commit 2e074bc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,26 @@ from seismic_bedload import log_raised_cosine_pdf
2828

2929
f = np.linspace(0.001, 20, 100)
3030
D = 0.3
31-
D50 = 0.4
3231
H = 4.0
3332
W = 50
3433
theta = np.tan(1.4*np.pi/180)
3534
r0 = 600
3635
qb = 1e-3
37-
model = SaltationModel()
3836

37+
model = SaltationModel()
3938
# Forward modeling of PSD
40-
psd = model.forward_psd(f, D, H, W, theta, r0, qb, D50 = D50, pdf = pD)
41-
39+
psd = model.forward_psd(f, D, H, W, theta, r0, qb)
4240
# Reproduce Tsai results
4341
plt.plot(f, psd)
4442
plt.show()
4543

46-
# Inverting bedload flux
44+
# Inverting bedload flux using Pinos dataset
4745
PSD_obs = np.loadtxt("data/pinos/PSD.txt")
4846
H = np.loadtxt("data/pinos/flowdepth.txt")
4947
# Need to make sure PSD_obs and H have the same length
5048
idx = np.arange(49, (49+317))
5149
PSD_obs = PSD_obs[idx]
52-
H = H/100 # to meter
50+
H = H/100 # depth to meter
5351

5452
# Data for Pinos
5553
f = np.linspace(30, 80, 10)

0 commit comments

Comments
 (0)