Skip to main content

Wandas is an open source library for efficient signal analysis in Python

Project description

Wandas logo

PyPi PyPI - Python Version CI codecov MIT License Typing

Wandas (Waveform Analysis Data Structures) is an open-source Python library for efficient signal analysis. It provides comprehensive signal processing functionalities and seamless integration with Matplotlib for visualization.

Wandas (Waveform Analysis Data Structures)は、Pythonによる効率的な信号解析のためのオープンソースライブラリです。 Wandas は、信号処理のための包括的な機能を提供し、Matplotlibとのシームレスな統合を実現しています。

Features / 機能

  • Comprehensive Signal Processing: Easily perform basic signal processing operations such as filtering (low-pass, high-pass, band-pass, A-weighting), Fourier transforms (FFT, STFT, ISTFT), spectral analysis (Welch, CSD, Coherence, Transfer Function), N-octave analysis, and more.

    包括的な信号処理機能: フィルタリング(ローパス、ハイパス、バンドパス、A特性)、 フーリエ変換(FFT、STFT、ISTFT)、 スペクトル分析(Welch法、CSD、コヒーレンス、伝達関数)、 Nオクターブ分析など、基本的な信号処理操作を簡単に実行可能。

  • Intuitive Data Structures: Utilizes ChannelFrame for time-domain data, SpectralFrame for frequency-domain data, and SpectrogramFrame for time-frequency data, offering a pandas-like experience.

    直感的なデータ構造: 時間領域データには ChannelFrame、 周波数領域データには SpectralFrame、 時間周波数領域データには SpectrogramFrame を使用し、 pandasライクな操作感を提供。

  • Visualization Integration: Seamless integration with Matplotlib for easy and customizable data visualization. The .plot() and .describe() methods offer quick insights into your data.

    可視化ライブラリとの統合: Matplotlibとシームレスに統合し、 簡単かつカスタマイズ可能なデータ可視化を実現。 .plot().describe() メソッドで迅速にデータ概要を把握可能。

  • Efficient Large Data Handling: Leverages lazy evaluation with Dask for efficient processing of large datasets.

    効率的な大規模データ処理: Daskを活用した遅延評価により、大規模データセットを効率的に処理。

  • Flexible I/O: Supports reading and writing WAV and CSV files. Additionally, it features its own WDF (Wandas Data File) format based on HDF5 for complete data and metadata preservation.

    柔軟なI/O: WAVおよびCSVファイルの読み書きをサポート。 さらに、データとメタデータを完全に保存するHDF5ベースの独自形式WDF (Wandas Data File) も搭載。

  • Metadata and History Tracking: Keeps track of processing history and metadata associated with the signals.

    メタデータと処理履歴の追跡: 信号に関連する処理履歴とメタデータを記録・管理。

  • Extensible API: Designed for extensibility, allowing users to add custom processing functions.

    拡張可能なAPI: ユーザーがカスタム処理関数を追加しやすいように拡張性を考慮した設計。

  • Sample Datasets: Includes sample datasets for testing and demonstration purposes.

Installation

pip install git+https://github.com/endolith/waveform-analysis.git@master
pip install wandas

Quick Start

import wandas as wd

# To run this example, place 'data/summer_streets1.wav' at the root of the repository,
# or change the path accordingly (e.g., 'examples/data/summer_streets1.wav').
# この例を実行するには、リポジトリのルートに 'data/summer_streets1.wav' を配置するか、
# 'examples/data/summer_streets1.wav' のようにパスを適宜変更してください。
cf = wd.read_wav("data/summer_streets1.wav")
cf.describe()

cf.describe

cf.describe(
    axis_config={
        "time_plot": {"xlim": (0, 15), "ylim": (-30000, 30000)},
        "freq_plot": {"xlim": (60, 120), "ylim": (0, 16000)},
    },
    cbar_config={"vmin": 10, "vmax": 70},
)

cf.describe

cf = wd.read_csv("data/test_signals.csv", time_column="Time")
cf.plot(title="Plot of test_signals.csv using wandas", overlay=False)

cf.plot

Signal Processing Example

# Example of applying a low-pass filter and plotting its FFT
# ローパスフィルタを適用し、そのFFTをプロットする例
signal = wd.generate_sin(freqs=[5000, 1000], duration=1, sampling_rate=44100)
filtered_signal = signal.low_pass_filter(cutoff=1000)
filtered_signal.fft().plot(title="FFT of Low-pass Filtered Signal")

signal.low_pass_filter

# Save the filtered signal as a WAV file
# フィルタ済み信号を WAV ファイルに保存
signal.low_pass_filter(cutoff=1000).to_wav('filtered_audio.wav')
# Display audio control
# Audioコントロール表示
signal.to_audio()

Documentation

For more detailed information, API reference, and tutorials, please visit the official documentation site.

より詳細な情報やAPIリファレンス、チュートリアルについては、公式ドキュメントサイト をご覧ください。

Tutorial

For practical usage and advanced examples, see the Tutorial and the Tutorial Index.

より実践的な使い方や応用例については、チュートリアル および チュートリアル一覧 をご覧ください。

Supported Data Formats

  • Audio Files: WAV
  • Data Files: CSV
  • Wandas Data Files: WDF (HDF5-based)

Bug Reports and Feature Requests

  • Bug Reports: Please provide details in the Issue Tracker.

  • Feature Requests: Feel free to open an Issue if you have new features or improvement suggestions.

バグ報告と機能リクエスト

  • バグ報告: Issue Tracker に詳細を記載してください。

  • 機能リクエスト: 新機能や改善案があれば、気軽に Issue をオープンしてください。

License

This project is licensed under the MIT License.


Experience efficient signal analysis with Wandas!

Wandas を使って効率的な信号解析体験を!

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

wandas-0.1.4.tar.gz (26.3 MB view details)

Uploaded Source

Built Distribution

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

wandas-0.1.4-py3-none-any.whl (75.5 kB view details)

Uploaded Python 3

File details

Details for the file wandas-0.1.4.tar.gz.

File metadata

  • Download URL: wandas-0.1.4.tar.gz
  • Upload date:
  • Size: 26.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wandas-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a0c4d0ee597ea279d989e977dd44838d60428f5facf4dea36b508299bb1720d2
MD5 1e42eb47908a2d8f17fb8d18207d7ba7
BLAKE2b-256 d24bf76d1880b661a592c719940070d0a59fec7444a3e6eff86d7849419bcbce

See more details on using hashes here.

File details

Details for the file wandas-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: wandas-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 75.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wandas-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 28ba347a550eb089880ec18a5a8ec4bc221eae57606965d18f64100ab6e7220e
MD5 1e526a4d9c98df73275cc8f9e3478a35
BLAKE2b-256 d71e77237dd9ef4bc432dc11c38662508af20094e8aa6a13a73fd2f46b07b694

See more details on using hashes here.

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