Skip to main content

Tools to load hydrographic data into pandas DataFrame

Project description

python-ctd

DOI Tests PyPI License

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.

Quick intro

You can install the CTD package with

conda install ctd --channel conda-forge

or

pip install ctd

and then,

from pathlib import Path
import ctd

path = Path('tests', 'data', 'CTD')
fname = path.joinpath('g01l06s01.cnv.gz')

down, up = ctd.from_cnv(fname).split()
ax = down['t090C'].plot_cast()

Bad Processing

We can do better:

temperature = down['t090C']

fig, ax = plt.subplots(figsize=(5.5, 6))
temperature.plot_cast(ax=ax)
temperature.remove_above_water()\
           .despike()\
           .lp_filter()\
           .press_check()\
           .interpolate(method='index',
                        limit_direction='both',
                        limit_area='inside')\
           .bindata(delta=1, method='interpolate')\
           .smooth(window_len=21, window='hanning') \
           .plot_cast(ax=ax)
ax.set_ylabel('Pressure (dbar)')
ax.set_xlabel('Temperature (°C)')

Good Processing

Try it out on mybinder

Binder

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-1.4.7.tar.gz (73.3 kB view details)

Uploaded Source

Built Distribution

ctd-1.4.7-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ctd-1.4.7.tar.gz
  • Upload date:
  • Size: 73.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ctd-1.4.7.tar.gz
Algorithm Hash digest
SHA256 f499c0bb08d96c5220e54f91977a094998e83c2e8a5340539ecc823ecd6eb12e
MD5 b30661cfea0ab5c6f38dccf4179ccb59
BLAKE2b-256 54c71de8a19335640509372d75df4c40633421d5a165aad5bbbff0129f5a0a05

See more details on using hashes here.

File details

Details for the file ctd-1.4.7-py3-none-any.whl.

File metadata

  • Download URL: ctd-1.4.7-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ctd-1.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 64fd565eb8cd6746947ca5134e4e0abc8db02efd43f1e4d684ab8d49bd39a948
MD5 34e1f034b97a91cd948e56ab5a14394b
BLAKE2b-256 af9ad6399046cd5210eafbd9b0b063c437059ddeb063842419a82f993176c15d

See more details on using hashes here.

Supported by

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