Tools to load hydrographic data as pandas DataFrame with some handy methods for data pre-processing and analysis
This module can load SeaBird CTD (CNV), Sippican XBT (EDF), and Falmouth CTD (ASCII) formats.
pip install ctd
or
conda install ctd
and then,
from ctd import DataFrame
fname = './tests/data/CTD/g01l06s01.cnv.gz'
cast = DataFrame.from_cnv(fname)
downcast, upcast = cast.split()
fig, ax = downcast['t090C'].plot()
We can do better:
from ctd import DataFrame, lp_filter, movingaverage
cast = DataFrame.from_cnv(fname, below_water=True)
downcast, upcast = cast.split()
temperature = downcast['t090C'].despike(n1=2, n2=20, block=100)
temperature.index = lp_filter(temperature.index.values)
temperature = temperature.bindata(delta=1)
temperature = temperature.interpolate()
temperature = temperature.smooth(window_len=21, window='hanning')
fig, ax = temperature.plot()
ax.set_ylabel('Pressure (dbar)')
ax.set_xlabel(u'Temperature (°C)');
Filipe Fernandes