Skip to content

pyoceans/python-ctd

Repository files navigation

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

About

Tools to load hydrographic data into pandas DataFrame

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 13

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy