Skip to main content

Performance analysis and testing tools for Distributed Acoustic Sensing (DAS) systems

Project description

SEAFOM Logo

pySEAFOM

A Python library for performance analysis and testing of Distributed Acoustic Sensing (DAS) interrogators, developed by SEAFOM's Measuring Sensor Performance group. This package provides standardized tools for testing, benchmarking, and performance evaluation of DAS systems following SEAFOM recommended procedures.

🌐 Purpose

To promote transparency, consistency, and collaboration in the evaluation of DAS interrogator performance by providing open-source tools and standardized workflows.

⚡ Quick Start

Installation

pip install pySEAFOM

Basic Usage

Option 1: Import specific functions directly

from pySEAFOM import calculate_self_noise, plot_combined_self_noise_db
import numpy as np

Option 2: Import modules (recommended when using multiple engines)

import pySEAFOM
import numpy as np

# Load your DAS data (channels × time samples)
data = np.load('your_das_data.npy')  # Shape: (n_channels, n_samples)

# Define test sections (channel ranges to analyze)
sections = [data[0:50, :], data[100:150, :]]  # Two cable sections
section_names = ['Section A', 'Section B']

# Calculate self-noise for each section (using direct import)
results = calculate_self_noise(
    sections,
    interrogation_rate=10000,  # Hz
    gauge_length=10.0,         # meters
    window_function='blackman-harris',
    data_type='pε'             # picostrain
)

# OR using module import:
# results = pySEAFOM.self_noise.calculate_self_noise(
    sections,
    interrogation_rate=10000,  # Hz
    gauge_length=10.0,         # meters
    window_function='blackman-harris',
    data_type='pε'             # picostrain
)

# Visualize results
plot_combined_self_noise_db(
    results=results,
    test_sections=section_names,
    gauge_length=10.0,
    org_data_unit='pε',
    title='DAS Self-Noise Test Results'
)

📁 Features & Modules

Current Modules

pySEAFOM.self_noise

Self-noise analysis

Future Modules (Planned)

  • Linearity Analysis: Dynamic range and linearity testing
  • Frequency Response: Frequency-dependent sensitivity
  • Spatial Resolution: Gauge length verification
  • Noise Floor: System noise characterization

📚 Documentation

Main Functions

calculate_self_noise()

Computes RMS amplitude spectral density across channels.

Parameters:

  • sections (list): List of 2D arrays (channels × samples) for each test section
  • interrogation_rate (float): Sampling frequency in Hz
  • gauge_length (float): Gauge length in meters
  • window_function (str): FFT window type ('blackman-harris', 'hann', 'none', etc.)
  • data_type (str): Data unit ('pε', 'nε', 'rad', or custom)

Returns:

  • List of tuples: [(frequencies, asd), ...] for each section

plot_combined_self_noise_db()

Creates publication-quality self-noise plots.

Parameters:

  • results: Output from calculate_self_noise()
  • test_sections (list): Section names
  • gauge_length (float): Gauge length in meters
  • org_data_unit (str): Display unit
  • title (str): Plot title
  • sampling_freq (float): Sampling rate (for metadata box)
  • n_channels (int): Total channels (for metadata box)
  • duration (float): Recording duration (for metadata box)

report_self_noise()

Prints formatted text report.

Parameters:

  • results: Output from calculate_self_noise()
  • gauge_length (float): Gauge length in meters
  • test_sections (list): Section names
  • band_frequencies (list): Frequency bands for averaging, e.g., [(1, 100), (100, 1000)]
  • report_in_db (bool): Use dB scale or linear units
  • org_data_unit (str): Display unit

🧪 Example Notebook

See self_noise_test.ipynb for a complete example using synthetic data:

  • Generates known ASD synthetic signals
  • Validates calculation accuracy
  • Demonstrates all visualization options

📊 Typical Workflow

  1. Prepare Data: Load DAS measurements (channels × samples)
  2. Define Sections: Select channel ranges for analysis
  3. Calculate Self-Noise: Use calculate_self_noise() with appropriate parameters
  4. Visualize: Create plots with plot_combined_self_noise_db()
  5. Report: Generate text summaries with report_self_noise()

🔧 Development Setup

# Clone the repository
git clone https://github.com/SEAFOM-Fiber-Optic-Monitoring-Group/pySEAFOM.git
cd pySEAFOM

# Install in development mode
pip install -e .

# Install development dependencies
pip install -e ".[dev]"

# Run tests (if available)
pytest tests/

📦 Package Structure

pySEAFOM/
├── self_noise              - Self-noise analysis module
│   ├── calculate_self_noise()
│   ├── plot_combined_self_noise_db()
│   └── report_self_noise()
├── (future modules)        - Additional analysis engines
└── examples/               - Example notebooks
    └── self_noise_test.ipynb

🔌 Adding New Modules

To add a new analysis module:

  1. Create source/your_module.py with your functions
  2. Update source/__init__.py:
    from . import self_noise, your_module
    
  3. Add documentation to README
  4. Create example notebook in root directory

See the existing self_noise.py module as a template.

🤝 Contributing

We welcome contributions from researchers, engineers, and developers working in the fiber optic sensing space. Please see our contribution guidelines to get started.

📜 License

This project is licensed under the MIT License — see the LICENSE file for details.

This repository follows the SEAFOM Governance Policy.

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

pyseafom-0.1.4.tar.gz (163.0 kB view details)

Uploaded Source

Built Distribution

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

pyseafom-0.1.4-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyseafom-0.1.4.tar.gz
  • Upload date:
  • Size: 163.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for pyseafom-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7aed23fa4b677e10adea54ce85e8aa68b3568cb729d4f7406a5e852b1cc7b27b
MD5 336d96e86471632409dbf77a8ac1f6f6
BLAKE2b-256 f1a4ac92c267d1fd268f0ae9613879c2cfbdc2fe2dc4312fde355b69ec87e216

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyseafom-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 da9e702e1005a9224c65899aeebe9a3a2fd9ac99cf45f6c86d8d360de679601d
MD5 27eb18fcc916c437399955781742c5dd
BLAKE2b-256 3b89a1c437514b0b3f9d4d5586c13671581967f1077c5907f87ed5390f36483e

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