.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_wave_spectra.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_wave_spectra.py: Wave spectra examples ===================== .. GENERATED FROM PYTHON SOURCE LINES 6-40 .. image:: /gallery/images/sphx_glr_plot_wave_spectra_001.png :alt: plot wave spectra :class: sphx-glr-single-img .. code-block:: default import os import pandas as pd import toto wavefile='https://raw.githubusercontent.com/calypso-science/Toto/master/_tests/txt_file/yura87.dat' os.system('wget %s ' % wavefile) wave=pd.read_csv('yura87.dat',skiprows=28,names=['time','ssh1','ssh2','ssh3'],delimiter='\s+') time=pd.to_datetime(wave['time'],unit='s') wave['time'][:]=time wave.set_index('time',inplace=True) wave.WaveAnalysis.wave_spectra(sea_level='ssh1',\ args={'units':'m', 'windows': 3600, 'overlap':1800, 'nfft':3600, 'detrend':'Off', 'period (s) min and max for plotting':[5, 250], 'xaxis':'period', 'display':'On', }) # wave.WaveAnalysis.wave_spectra(sea_level='ssh',\ # args={'units':'m', # 'windows': 3600, # 'overlap':1800, # 'nfft':3600, # 'detrend':'Off', # 'period (s) min and max for plotting':[3, 250], # 'xaxis':'frequency', # 'display':'On', # }) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.748 seconds) .. _sphx_glr_download_gallery_plot_wave_spectra.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_wave_spectra.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_wave_spectra.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_