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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ctd-1.5.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ctd-1.5.0.tar.gz
Algorithm Hash digest
SHA256 09ded6c3d595282a530924ccc1d2591fdf32bcd3d949dc0cd390c95353f1827d
MD5 999c1d2b5d1ebde2be75a9246114f104
BLAKE2b-256 1009c8a69df0b33c40c270b2825ae9ec24a8601253c5e22a22e437758f745c4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctd-1.5.0.tar.gz:

Publisher: pypi.yml on pyoceans/python-ctd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

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

File hashes

Hashes for ctd-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 142d9832ffd7cde9ca763adf11b5e63d1294f9131da0a24559101ab601ac100c
MD5 ff905e3c41c020afd07ad90e18828d0d
BLAKE2b-256 ee3266629557e78ed58cfc09366ccfea1c2b5d5fa96a1a5480e9dafc5dc5cc78

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctd-1.5.0-py3-none-any.whl:

Publisher: pypi.yml on pyoceans/python-ctd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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