In [1]:
import numpy as np
import matplotlib.pyplot as plt
% matplotlib inline
In [2]:
import jeepr
jeepr.__version__
Out[2]:
In [6]:
from jeepr import Scan
g = Scan.from_gprmax('../tests/test_2D_merged.out')
In [7]:
g.__dict__
Out[7]:
In [8]:
g.plot()
In [9]:
t0 = np.sqrt(2) / float(g.freq)
h = g.crop(t=t0)
h.plot()
In [10]:
h.shape
Out[10]:
In [11]:
h.log
Out[11]:
Note, however, that the t0
of the section has been reset to 0 ns.
In [12]:
h.t0
Out[12]:
Let's look at a spectrum; it looks quite different from real data.
In [13]:
f, p = g.get_spectrum()
plt.plot(f, p)
Out[13]:
In [14]:
from jeepr import Model
In [15]:
m = Model.from_gprMax('../tests/test_2D.in')
In [16]:
m.plot()
In [17]:
m.__dict__
Out[17]:
In [18]:
ground = m.rx['position'][0]
n = m.crop(z=ground)
n.plot()
In [19]:
n_time, _ = n.to_time(dt=5e-11)
n_time.plot()
In [20]:
fig = plt.figure(figsize=(16, 9))
ax0 = fig.add_subplot(111)
ax0 = h.plot(ax=ax0)
ax0 = n_time.plot(ax=ax0, alpha=0.5)
plt.show()