Indefinite Streaming Pipeline

Overview

The Indefinite Streaming Pipeline is a Python module specific for handling Indefinite Streaming data format from Percept. This section will go over all functions implemented and provide sufficient details on pipeline implementation.

Methods

Percept.IndefiniteStream.saveMontageStreams(deviceID, streamList, sourceFile)

Save Indefinite Streaming Data in Database Storage

Parameters
  • deviceID – UUID4 deidentified id for each unique Percept device.

  • streamList – Array of Indefinite Streaming structures extracted from Medtronic JSON file.

  • sourceFile – filename of the raw JSON file that the original data extracted from.

Returns

Boolean indicating if new data is found (to be saved).

Percept.IndefiniteStream.processMontageStreams(stream, method='spectrogram')

Calculate BrainSense Survey Power Spectrum.

The pipeline will filter all channels in the raw Indefinite Streaming with a zero-phase 5th-order Butterworth filter between 1-100Hz. Then time-frequency analysis is calculated using short-time Fourier Transform with 0.5Hz frequency resolution using 1.0 second window and 500ms overlap. Zero-padding when neccessary to increase frequency resolution.

Parameters

stream – Indefinite Stream raw object.

Returns

Processed Indefinite Streams with Spectrums.

Percept.IndefiniteStream.queryMontageDataOverview(user, patientUniqueID, authority)

Query available Indefinite Streaming data from specific patient requested

This function will query all available Indefinite Streaming data that a specific user has access to for a specific patient.

Parameters
  • user – BRAVO Platform User object.

  • patientUniqueID – Deidentified patient ID as referenced in SQL Database.

  • authority – User permission structure indicating the type of access the user has.

Returns

List of Indefinite Streaming data accessible.

Percept.IndefiniteStream.queryMontageData(user, devices, timestamps, authority)

Query available Indefinite Streaming data from specific patient requested

Query all data (which can be multiple recordings from the same day if data interruption exist) based on the timestamps.

Parameters
  • user – BRAVO Platform User object.

  • devices (list) – Deidentified neurostimulator device IDs as referenced in SQL Database.

  • timestamps (list) – Unix timestamps at which the recordings are collected.

  • authority – User permission structure indicating the type of access the user has.

Returns

List of Indefinite Streaming data accessible.