Performance analysis and testing tools for Distributed Acoustic Sensing (DAS) systems
Project description
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 sectioninterrogation_rate(float): Sampling frequency in Hzgauge_length(float): Gauge length in meterswindow_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 fromcalculate_self_noise()test_sections(list): Section namesgauge_length(float): Gauge length in metersdata_unit(str): Display unittitle(str): Plot titlesampling_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 fromcalculate_self_noise()gauge_length(float): Gauge length in meterstest_sections(list): Section namesband_frequencies(list): Frequency bands for averaging, e.g.,[(1, 100), (100, 1000)]report_in_db(bool): Use dB scale or linear unitsdata_unit(str): Display unitrender_tables(bool): Render per-section summary tables with matplotlibtable_figsize(tuple): Figure size when rendering tables
🧪 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
- Prepare Data: Load DAS measurements (channels × samples)
- Define Sections: Select channel ranges for analysis
- Calculate Self-Noise: Use
calculate_self_noise()with appropriate parameters - Visualize: Create plots with
plot_combined_self_noise_db() - 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/
├── source/
│ └── pySEAFOM/
│ ├── __init__.py # package exports
│ └── self_noise.py # self-noise analysis engine
├── testing_notebooks/
│ └── self_noise_test.ipynb # synthetic validation notebook
├── workflows/
│ └── SELF_NOISE_WORKFLOW.md # step-by-step processing summary
├── README.md
├── pyproject.toml
├── setup.py
├── MANIFEST.in
└── dist/ # build artifacts (created on release)
🔌 Adding New Modules
To add a new analysis module:
- Create
source/pySEAFOM/your_module.pywith your functions - Update
source/pySEAFOM/__init__.py:from . import self_noise, your_module
- Add documentation to this README (and module docstrings)
- Add or update an example notebook under
testing_notebooks/
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyseafom-0.1.5.tar.gz.
File metadata
- Download URL: pyseafom-0.1.5.tar.gz
- Upload date:
- Size: 726.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a10834bf53e0852673f6e42dc51c3e0828f6f2244bab444b46fe85270ff7ae28
|
|
| MD5 |
3f78bcba1e7601977ba827f4d99192be
|
|
| BLAKE2b-256 |
7ba9925573bc91fbe4f80572ed010baf44c7a2de5f5604257928a99a8a16ff60
|
File details
Details for the file pyseafom-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pyseafom-0.1.5-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
885049ae1b12e27b3ee628c00b95e4b0cb0554bc3e7ed521b0ed4c13530bb655
|
|
| MD5 |
b2922448bf71e615eff0360b02f0a030
|
|
| BLAKE2b-256 |
911a5bc5e6238e3e5a7530a8aa385a8d67b9285a2f960555c81bab24e7dddf15
|