skip to navigation
skip to content

ctd 0.3.0

Tools to load hydrographic data as DataFrames

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

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()

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]')

Not so quick intro

Profiles and sections.

Author

Filipe Fernandes

Changelog

Version 0.2.2

  • Support for different searbird cnv pressure spellings (‘prDM’ and ‘prdM’) thanks @j08lue.
  • Lazy import for optinal dependencies (gsw and scipy).
  • Several small bug fixes

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.
 
File Type Py Version Uploaded on Size
ctd-0.3.0.tar.gz (md5) Source 2017-05-04 13KB
  • Author: Filipe Fernandes
  • Home Page: https://github.com/pyoceans/python-ctd
  • Download URL: http://pypi.python.org/pypi/ctd
  • Keywords: oceanography,data analysis,DataFrame
  • License:
    Copyright 2017 Filipe Fernandes
    
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    
    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    
    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    
    3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Platform: any
  • Categories
  • Package Index Owner: ocefpaf
  • DOAP record: ctd-0.3.0.xml