跳转到主要内容

工具,用于将海洋数据加载到pandas DataFrame

项目描述

python-ctd

DOI Tests PyPI License

工具,用于将海洋数据作为pandas DataFrame加载,并提供一些方便的数据预处理和分析方法

本模块可以加载 SeaBird CTD (CNV)Sippican XBT (EDF)Falmouth CTD (ASCII) 格式。

快速入门

您可以使用以下命令安装CTD包

conda install ctd --channel conda-forge

pip install ctd

然后

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

我们可以做得更好

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

在mybinder上试一试

Binder

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定要选择哪个,请了解更多关于 安装包 的信息。

源分发

ctd-1.4.6.tar.gz (72.1 kB 查看哈希值)

上传时间:

构建分发

ctd-1.4.6-py3-none-any.whl (15.6 kB 查看哈希值)

上传于 Python 3

由以下组织支持