Skip to main content

YSA Signal - Standalone signal analyzer for .brw/.h5 files

Project description

YSA Signal

Standalone signal analyzer for downsampled .brw files

YSA Signal processes MEA recordings from downsampled .brw files, detects seizures and status epilepticus events, and saves the results in a compact HDF5 format. Mac only for now.

Installation

pip install ysa-signal

Usage

GUI Mode

To run the GUI, just run this command after installation:

ysa-signal

The GUI provides two tabs:

  • Process Files: Select input files, optionally enable seizure analysis, and save processed data
  • View Signals: Load processed files and view signals in an interactive 64x64 channel grid

CLI Mode

# Process without analysis (faster)
ysa-signal input.brw output_processed.h5

# Process with seizure analysis
ysa-signal input.brw output_processed.h5 --do-analysis

Python API

from ysa_signal import process_and_store, save_processed_data, load_processed_data

# Read in downsampled .brw file, process it, and store the results in memory (not on disk on a file)
processed_data = process_and_store('/path/to/file.brw', do_analysis=True)

# Save the processed data to an h5 file (on disk on a file you specify)
save_processed_data(processed_data, '/path/to/file_processed.h5')

# With already processed data saved to an h5 file, you can load it back into memory
loaded_data = load_processed_data('/path/to/file_processed.h5')

# Example: Accessing data for a specific channel (row, col)
row = loaded_data.active_channels[0][0]
col = loaded_data.active_channels[0][1]

# Access the signal and seizure times for the specified channel
channel_data = loaded_data.data[row - 1, col - 1]
signal = channel_data['signal']
sz_times = channel_data['SzTimes']

Batch Processing Example

from ysa_signal import process_and_store, save_processed_data
import glob

for brw_file in glob.glob('data/*.brw'):
    output_file = brw_file.replace('.brw', '_processed.h5')
    processed_data = process_and_store(brw_file, do_analysis=True)
    save_processed_data(processed_data, output_file)

Support

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

ysa_signal-1.1.3.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

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

ysa_signal-1.1.3-cp310-cp310-macosx_10_9_universal2.whl (478.7 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file ysa_signal-1.1.3.tar.gz.

File metadata

  • Download URL: ysa_signal-1.1.3.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for ysa_signal-1.1.3.tar.gz
Algorithm Hash digest
SHA256 1909ad8252345ebd7fc0fa90af7af6c3b2a0962db11a19e149fe2e760802b0df
MD5 a25de6e0486b82784e3a99d4660de78e
BLAKE2b-256 36425b5471bf046a2b4a3e6977b63a81adea6f7331febac367045f8c7d1170fa

See more details on using hashes here.

File details

Details for the file ysa_signal-1.1.3-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ysa_signal-1.1.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2a96fec7930a5fb5709399c8adb88e09dbcfb35a5e114418f8af51f8b536fa00
MD5 c2de8c6b9f77f82963d3319f8ce2d7d5
BLAKE2b-256 d8c78054124b07105848bc5dd04eba3378be9946a0f173f18bba8ce61f41c010

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