EQ Sight — JupyterLab

The JupyterLab view, accessible via the Erlenmeyer flask icon in the sidebar, provides an interactive Python environment for advanced analysis of power quality data. On EQ Gateways, JupyterLab ships as the optional eq-lab package (sudo apt install eq-lab), which provides JupyterLab plus equser, an open-source Python package for working with EQ Wave data. The flask icon appears in the sidebar only when eq-lab is installed.

Overview

JupyterLab provides an interactive analysis environment for users who need to:

  • Perform custom calculations on waveform data
  • Create specialized visualizations
  • Develop automated analysis workflows
  • Export data in custom formats

Getting Started

When you open the JupyterLab tab:

  1. A new notebook session starts automatically
  2. The equser package is installed in the eq-lab environment and ready to use
  3. Sample notebooks in tutorials/, analysis/, and tools/ demonstrate common analysis patterns

You can also install equser on any computer with pip install equser to work with exported data or connect to a gateway remotely.

Working with CPOW Waveform Data

Load continuous point-on-wave (CPOW) parquet files directly from the gateway’s storage:

from equser.data import load_cpow_scaled

# Load a CPOW parquet file (32 kHz, 7 channels)
data = load_cpow_scaled('/var/lib/eq-coherence/data/cpow/20250615_120000.parquet')

# Scaled voltage and current arrays are ready to use
print(f"Phase A voltage range: {data['VA'].min():.1f} to {data['VA'].max():.1f} V")
print(f"Start time: {data['start_time']}")
print(f"Sample rate: {data['sample_rate']} Hz")
print(f"Samples: {len(data['VA']):,}")

The load_cpow_scaled() function automatically handles raw int32-to-float scaling using the vscale/iscale metadata embedded in each parquet file.

Querying Data via the REST API

The gateway exposes a REST API at port 8080. See the API Reference for endpoint details.

Power Monitoring Data (Arrow IPC)

from equser.api import GatewayClient

# The gateway proxies /api on the normal HTTP port, so no port is needed.
client = GatewayClient('http://localhost')

# Fetch recent PMon data for a device (returns a pyarrow.Table)
table = client.get_pmon_data(
    'wave-001',
    start_time='2025-06-15T12:00:00Z',
    end_time='2025-06-15T13:00:00Z',
)

df = table.to_pandas()
print(df.columns.tolist())

SQL Queries

# SELECT-only SQL against the gateway's DuckDB store; returns a pyarrow.Table.
table = client.query_sql(
    "SELECT time_us, AVRMS, BVRMS, CVRMS FROM pmon_data ORDER BY time_us DESC",
    limit=100,
)
df = table.to_pandas()

Live Streaming via WebSocket

from equser.api import connect_spectral_stream

# The spectral stream is a broadcast consumer of the live CPOW feed. Each
# binary window is a pyarrow.Table of FFT magnitudes; text messages are gap
# markers (dicts).
for item in connect_spectral_stream(channels=['VA', 'IA'], cycles=12):
    if isinstance(item, dict):
        continue  # gap marker
    print(f"Spectral window: {item.num_rows} bins, channels {item.column_names}")
    break  # Remove to stream continuously

Plotting Tools

The equser package includes plotting utilities for common visualizations:

from equser.plotting import PowerMonitorPlotter, WaveformPlotter

Waveform analysis helpers such as find_zero_crossings(), extract_complete_cycles(), and plot_extracted_cycles() are available for detailed cycle-level inspection.

Saving Work

Your notebooks are automatically saved to your user workspace. You can also:

  • Download notebooks to your local computer
  • Export results as CSV, PNG, or PDF

Resources

  • Sample Notebooks: Browse the tutorials/, analysis/, and tools/ directories in the file browser
  • API Documentation: Built-in help via help(equser)
  • equser Package: See from equser import pmon, plotting, analysis, data, api for available modules

Performance Notes

JupyterLab runs on the gateway alongside EQ Coherence and EQ Sight. For large data analyses:

  • Use time filters to limit data volume
  • Consider downsampling for trend analysis
  • Export large datasets for processing on dedicated workstations


© 2026 EQ Systems Inc. • [email protected] • (415) 562–5251 • Updated March 2026