Live Acquisition

Module: equser.pmon Dependencies: [daq] extra (avro, fastavro)

Real-time power monitor data acquisition from EQ Wave sensor hardware. Install with:

pip install equser[daq]

Note: Live acquisition requires physical EQ Wave sensor hardware connected via Ethernet.

PowerMonitor

The main acquisition class. Connects to an EQ Wave sensor, reads 10/12-cycle power quality measurements, and writes them to Parquet files.

from equser.pmon import PowerMonitor

monitor = PowerMonitor(config)
monitor.run()  # Blocks until interrupted

acquire(config_path)

Convenience function to load configuration and start monitoring.

from equser.pmon import acquire

acquire('equser.yaml')

Avro-to-Parquet conversion

Convert legacy Avro data files to Parquet format.

from equser.pmon import convert_avro_to_parquet

convert_avro_to_parquet('input.avro', 'output.parquet')

Schema

The PMon schema defines 10/12-cycle power quality measurements:

from equser.pmon.schema import create_schema

schema, schema_str, field_names = create_schema(num_phases=3)
print(field_names)
# ['time_us', 'FREQ', 'AVRMS', 'BVRMS', 'CVRMS', ...]

Supports 1, 2, or 3-phase configurations. Fields include:

FieldDescription
time_usMeasurement timestamp (microseconds)
FREQLine frequency (Hz)
{A,B,C}VRMSPhase RMS voltage
{A,B,C}IRMSPhase RMS current
NIRMSNeutral RMS current
{A,B,C}WATTPhase active power
{A,B,C}VFUNDPhase fundamental voltage
{A,B,C}IFUNDPhase fundamental current

Error hierarchy

equser.pmon.errors.PMonError
├── ConnectionError    - Sensor connection failures
├── DataError         - Invalid or corrupt data
└── ConfigError       - Configuration problems

CLI

# Start acquisition
equser pmon acquire -c config.yaml

# Convert Avro to Parquet
equser pmon convert data/*.avro --remove