-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathGRwave.py
More file actions
executable file
·41 lines (33 loc) · 810 Bytes
/
Copy pathGRwave.py
File metadata and controls
executable file
·41 lines (33 loc) · 810 Bytes
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
#!/usr/bin/env python
"""Simple groundwave example, assuming uniform ground parameters"""
from matplotlib.pyplot import figure, show
import grwave
try:
import seaborn as sns
sns.set_context("talk", 1.0)
except ImportError:
pass
def main():
wls = {
"freqMHz": 0.89,
"sigma": 2e-3,
"epslon": 4,
"dmax": 400,
"hrr": 3,
"htt": 100,
"dstep": 10,
"txwatt": 50e3,
}
data = grwave.grwave(wls)
# %%
d_km = data.index.values.astype(float)
ax = figure().gca()
ax.plot(d_km, data["fs"].values)
ax.set_xlabel("distance [km]")
ax.set_ylabel("field strength mV/m")
ax.axhline(4, color="red", linestyle="--")
ax.grid(True)
# ax.set_ylim((0,25))
show()
if __name__ == "__main__":
main()