perda.live.live_analyzer#

perda.live.live_analyzer#

Live data analysis using the CDP IPC server, mirroring the Analyzer interface.

class perda.live.live_analyzer.LiveAnalyzer(host, port, timeout, range_timeout)[source]#

Bases: object

Live data analyzer that pulls time-series data from the CDP IPC server and exposes a plotting interface analogous to Analyzer.

Parameters:
  • host (str)

  • port (int)

  • timeout (float)

  • range_timeout (float)

analyze_frequency(var, time_secs=30, expected_frequency_hz=None, gap_threshold_multiplier=2.0, font_config=FontConfig(large=20, medium=14, small=10), layout_config=LayoutConfig(width=1200, height=700, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', title_x=0.5, title_xanchor='center', title_yanchor='top', grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, max_display_resolution=50), plot_config=ScatterHistogramPlotConfig(color_scatter='blue', color_line='crimson', color_histogram='blue', histogram_bins=80))[source]#
Return type:

Figure

Parameters:
classmethod dataserver(port=5001, timeout=5.0, range_timeout=2.0)[source]#
Return type:

LiveAnalyzer

Parameters:
  • port (int)

  • timeout (float)

  • range_timeout (float)

ensure_connected()[source]#
Return type:

None

fetch(var, time_secs=30)[source]#
Return type:

DataInstance

Parameters:
  • var (str)

  • time_secs (int)

get(access_string, value_type)[source]#
Return type:

float | bool | int

Parameters:
is_connected(refresh=False)[source]#
Return type:

bool

Parameters:

refresh (bool)

classmethod local(port=5001, timeout=5.0, range_timeout=2.0)[source]#
Return type:

LiveAnalyzer

Parameters:
  • port (int)

  • timeout (float)

  • range_timeout (float)

plot(var_1, var_2=None, time_secs=30, title=None, y_label_1=None, y_label_2=None, show_legend=True, font_config=FontConfig(large=20, medium=14, small=10), layout_config=LayoutConfig(width=1200, height=700, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', title_x=0.5, title_xanchor='center', title_yanchor='top', grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, max_display_resolution=50))[source]#
Return type:

Figure

Parameters:
classmethod remote(host, port=5001, timeout=5.0, range_timeout=2.0)[source]#
Return type:

LiveAnalyzer

Parameters:
  • host (str)

  • port (int)

  • timeout (float)

  • range_timeout (float)

set(access_string, value, value_type)[source]#
Return type:

None

Parameters:
  • access_string (str)

  • value (float | bool | int)

  • value_type (ValueType)