lidar subdir has the files
In [1]:
%ls lidar
Recent matlab files are just hdf5, which we can get from pytables
In [2]:
import tables
lineData = tables.openFile(r"lidar/20150927-0000-01.FRFNProp.line.data.mat","r")
#science = tables.openFile(r"lidar/20150927-0000-01.FRFNProp.line.science.mat","r")
Grab the filtered water levels on the grid in FRF coordinates
In [12]:
for f in lineData.root:
for g in f:
print g
In [13]:
z = lineData.root.lineGriddedFilteredData.waterGridFiltered[:]
x = lineData.root.lineCoredat.downLineX[:]
In [14]:
%matplotlib notebook
from matplotlib import pyplot as plt
In [15]:
fig = plt.figure()
plt.plot(x,z[:,5000])
Out[15]:
data file has nan's where it is unreliable, find the index for about 105m offshore
In [9]:
import numpy as np
xfinite = x[:]
xfinite[np.isnan(x)] = -1000.0
i105 = np.where(xfinite > 105.0)[0][0]
print i105
In [18]:
fig = plt.figure()
plt.plot(lineData.root.lineCoredat.tGPSVector[:500],z[i105,:500])
Out[18]: