Skip to main content

Tools to load hydrographic data as DataFrames

Project description

Latest version Travs-CI Gittip

Tools to load hydrographic data into pandas DataFrame (and some rudimentary methods for data pre-processing/analysis).

This module can load SeaBird CTD (CNV), Sippican XBT (EDF), and Falmouth CTD (ASCII) formats.

Quick intro

pip install ctd

and then,

kw = dict(compression='gzip')
fname = './test/data/CTD/g01l06s01.cnv.gz'
cast = DataFrame.from_cnv(fname, **kw)
downcast, upcast = cast.split()
fig, ax = downcast['t090C'].plot()
Bad Processing

We can do better:

from ctd import DataFrame, lp_filter, movingaverage
kw.update(below_water=True)
cast = DataFrame.from_cnv(fname, **kw)
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.axis([0, 30, 2000, 0])
ax.set_ylabel("Pressure [dbar]")
ax.set_xlabel(u'Temperature [\u00b0C]')
Good Processing

Not so quick intro

Check out the IPython Notebook.

Author

Filipe Fernandes

Changelog

Version 0.2.1

  • None is assigned to position data when it is not available.

Version 0.2.0

  • Fixed compatibility fir 0.13.

Version 0.1.0

  • First version derived from oceans package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctd-0.2.1.tar.gz (14.9 kB view details)

Uploaded Source

File details

Details for the file ctd-0.2.1.tar.gz.

File metadata

  • Download URL: ctd-0.2.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ctd-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a566f82444d556afb70e4723ab40aa578a21fdf611d429e6784ac7de597eaa44
MD5 59f90c1e989c702ee9c6969ecadea8bc
BLAKE2b-256 075a63a38227531f2376c0fb6e9bd2a285aa5bff52c6c0992e5504c482d7e9cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page