Skip to Content

Process Flowcharts

Device Connection Flow

This flowchart illustrates the complete process from device discovery to active data streaming, including error handling and recovery mechanisms.

Key Process Steps:

  1. Discovery Phase

    • USB devices detected via serial port enumeration
    • BLE devices found through active scanning
    • WiFi/LSL devices discovered via mDNS broadcast
  2. Connection Setup

    • Driver verification and installation if needed
    • Protocol-specific handshake (varies by device type)
    • Connection parameters negotiation
  3. Configuration

    • Sample rate selection (250Hz, 500Hz, 1000Hz)
    • Channel mapping and activation
    • Digital filter configuration (notch, bandpass)
  4. Quality Assurance

    • Optional impedance checking per channel
    • Signal quality validation
    • Automatic bad channel detection
  5. Data Streaming

    • Zero-copy ring buffer initialization
    • Real-time data validation
    • Asynchronous Pub/Sub publishing

Session Management Flow

This flowchart shows the complete lifecycle of a neural recording session from creation to completion.

Session Management Steps:

  1. Session Creation

    • Generate unique session identifier (UUID v4)
    • Associate with patient/participant record
    • Set recording permissions and access controls
  2. Device Selection

    • Verify device availability and compatibility
    • Check for device conflicts or exclusive access
    • Reserve devices for session duration
  3. Configuration

    • Recording duration (continuous or fixed)
    • Event triggers (manual, scheduled, or signal-based)
    • Storage options (hot, warm, cold tiers)
  4. Recording Process

    • Synchronized multi-device recording
    • Real-time health monitoring
    • Pause/resume functionality
  5. Session Completion

    • Data file finalization and integrity checks
    • Metadata generation with session summary
    • Archival to appropriate storage tier

Real-Time Data Streaming Flow

This flowchart details the real-time data processing pipeline from acquisition to client delivery.

Data Processing Pipeline:

  1. Acquisition Stage

    • Receive raw data from device drivers
    • Apply hardware timestamps with microsecond precision
    • Validate packet integrity and sequence
  2. Pre-Processing Stage

    • Remove DC offset using high-pass filter (0.1 Hz)
    • Apply notch filter for powerline noise (50/60 Hz)
    • Optional: Apply bandpass filter based on use case
  3. Quality Assessment

    • Check for saturated channels
    • Detect disconnected electrodes
    • Calculate signal-to-noise ratio
    • Mark poor quality segments
  4. Buffering Strategy

    • Ring buffer: 10,000 samples per channel
    • Batch threshold: 1,000 samples (4 seconds @ 250Hz)
    • Emergency flush: Every 100ms
  5. Distribution

    • Parallel fan-out to multiple consumers
    • Priority-based message delivery
    • Guaranteed delivery to storage

ML Model Lifecycle Flow

This flowchart shows the complete machine learning model lifecycle from data collection through deployment and monitoring, including retraining feedback loops.

Model Training Pipeline:

StageDurationResourcesOutput
Data CollectionContinuousStorage: 10TB/monthLabeled datasets
Data Cleaning2-4 hoursCPU: 32 coresClean dataset
Feature Engineering1-2 hoursCPU: 16 coresFeature matrices
Model Training4-12 hoursGPU: 4x V100Trained model
Hyperparameter Opt8-24 hoursGPU: 8x V100Best parameters
Validation1-2 hoursCPU: 8 coresMetrics report
Clinical Review1-3 daysHuman expertsApproval/feedback

Supported Model Types:

MODEL_ARCHITECTURES = { "classification": { "EEGNet": "Compact CNN for EEG", "DeepConvNet": "Deep CNN architecture", "ShallowConvNet": "Shallow CNN for online", "LSTM-FCN": "LSTM + Fully Convolutional", "Transformer": "Attention-based model" }, "regression": { "CNN-LSTM": "Feature prediction", "TCN": "Temporal Convolutional Network", "WaveNet": "Dilated convolutions" }, "anomaly_detection": { "Autoencoder": "Reconstruction-based", "VAE": "Variational Autoencoder", "GAN": "Generative Adversarial Network" } }
Last updated on