pswamp.gui.grid_view.dim_2d.layers
Submodules
Attributes
Exceptions
Raised when layer fails. |
Classes
This class is intended for consuming PMU data from a specified Kafka topic and storing the last samples (n_samples) in a |
|
This class is intended for consuming PMU data from a specified Kafka topic and storing the last samples (n_samples) in a |
|
Functions
|
|
|
Get coordinates for stations in PMU data frame |
|
Get coordinates for a subset of stations |
|
|
|
|
|
Get coordinates for stations in PMU data frame |
|
|
|
Get coordinates for stations in PMU data frame |
|
|
|
|
|
Get coordinates for stations in PMU data frame |
|
Package Contents
- class pswamp.gui.grid_view.dim_2d.layers.PMUTimeWindowOnline(kafka_kwargs={}, kafka_topic='pmudata', auto_adjust_offset=False, **kwargs)
Bases:
PMUTimeWindowThis class is intended for consuming PMU data from a specified Kafka topic and storing the last samples (n_samples) in a TimeWindow object.
- kafka_topic = 'pmudata'
- kafka_kwargs
- auto_adjust_offset = False
- pmu_stream
- _is_stopped = False
- initialize()
- run()
- stop()
- class pswamp.gui.grid_view.dim_2d.layers.PhasorPlot(n_phasors=None, pos0=None, normalize_length=True, normalize_angle=False, update_freq=None, plot_widget=None, background_color=(30, 63, 64), *args, **kwargs)
Bases:
PySide6.QtWidgets.QWidget- request_plot_update
- pos0 = None
- approx_zero_value = 1e-06
- normalize_length = True
- normalize_angle = False
- update_freq = None
- angles_prev
- phasors
- phasor_0
- colors
- create_plot_items()
- update(phasors)
- update_plot()
- update_plot_items(draw_phasors)
- pswamp.gui.grid_view.dim_2d.layers.read_geo_data(countries='All')
- pswamp.gui.grid_view.dim_2d.layers.load_bus_coords_for_current_stations(config, return_3d=False, geo=True)
Get coordinates for stations in PMU data frame
- pswamp.gui.grid_view.dim_2d.layers.load_bus_coords_for_stations(config, wanted_stations, return_3d=False, geo=True)
Get coordinates for a subset of stations
- pswamp.gui.grid_view.dim_2d.layers.load_dxf(path)
- exception pswamp.gui.grid_view.dim_2d.layers.LayerFailedException
Bases:
ExceptionRaised when layer fails.
- class pswamp.gui.grid_view.dim_2d.layers.StationNamesLayer(parent, config, geo=True)
- config
- plotWidget
- k = 2
- bus_name_text = []
- add_text(coord, text)
- remove_layer()
- class pswamp.gui.grid_view.dim_2d.layers.PhasorPlotLayer(parent, config, geo=True)
- config
- k = 2
- uuid
- parent
- pmu_tw
- col_idx_mag = []
- col_idx_ang = []
- plotWidget
- phasor_plot
- add_phasor_plot(bus_coords)
- remove_layer()
- class pswamp.gui.grid_view.dim_2d.layers.StaticLineDataLayer(parent, config, geo=True, data_subkey='line_data_path')
- config
- k = 2
- parent
- line_style
- ps_geo_data
- power_lines_pl
- add_line_plots(pos, line_width, color)
- remove_layer()
- show_lines(key)
- hide_lines(key)
- set_power_lines_color(key, color)
- set_line_width(key, line_width)
- update_line_plots(key, **style_kwargs)
- class pswamp.gui.grid_view.dim_2d.layers.StaticLineDataLayer_v0(*args, **kwargs)
Bases:
StaticLineDataLayer
- class pswamp.gui.grid_view.dim_2d.layers.StaticLineDataLayerSettings(target_layer)
Bases:
PySide6.QtWidgets.QWidget- target_layer
- btn_name_to_key
- update_grid_plots(state)
- class pswamp.gui.grid_view.dim_2d.layers.PMUTimeWindow(n_samples=None, window_length=None, time_window_type=TimeWindowLabeled, substitute_zero_freq_with_nan=True, channel_selection=None, channel_selection_idx=None)
- time_window_type
- tw = None
- header = None
- n_samples = None
- window_length = None
- is_initialized = False
- n_channels = None
- dt
- fs
- pmu_decoder
- initialize_from_config_frame(config_frame)
- update_window(pmu_data_frame)
- class pswamp.gui.grid_view.dim_2d.layers.PhasorPlot(n_phasors=None, pos0=None, normalize_length=True, normalize_angle=False, update_freq=None, plot_widget=None, background_color=(30, 63, 64), *args, **kwargs)
Bases:
PySide6.QtWidgets.QWidget- request_plot_update
- pos0 = None
- approx_zero_value = 1e-06
- normalize_length = True
- normalize_angle = False
- update_freq = None
- angles_prev
- phasors
- phasor_0
- colors
- create_plot_items()
- update(phasors)
- update_plot()
- update_plot_items(draw_phasors)
- pswamp.gui.grid_view.dim_2d.layers.read_geo_data(countries='All')
- pswamp.gui.grid_view.dim_2d.layers.load_bus_coords_for_current_stations(config, return_3d=False, geo=True)
Get coordinates for stations in PMU data frame
- class pswamp.gui.grid_view.dim_2d.layers.BusesLayer(parent, config, geo=True)
- config
- plotWidget
- k = 2
- x
- y
- z
- colors
- bus_scatter
- add_scatter_plot(bus_coords_3d)
- remove_layer()
- pswamp.gui.grid_view.dim_2d.layers.sample_dataset_path
- class pswamp.gui.grid_view.dim_2d.layers.PMUTimeWindow(n_samples=None, window_length=None, time_window_type=TimeWindowLabeled, substitute_zero_freq_with_nan=True, channel_selection=None, channel_selection_idx=None)
- time_window_type
- tw = None
- header = None
- n_samples = None
- window_length = None
- is_initialized = False
- n_channels = None
- dt
- fs
- pmu_decoder
- initialize_from_config_frame(config_frame)
- update_window(pmu_data_frame)
- class pswamp.gui.grid_view.dim_2d.layers.PhasorPlot(n_phasors=None, pos0=None, normalize_length=True, normalize_angle=False, update_freq=None, plot_widget=None, background_color=(30, 63, 64), *args, **kwargs)
Bases:
PySide6.QtWidgets.QWidget- request_plot_update
- pos0 = None
- approx_zero_value = 1e-06
- normalize_length = True
- normalize_angle = False
- update_freq = None
- angles_prev
- phasors
- phasor_0
- colors
- create_plot_items()
- update(phasors)
- update_plot()
- update_plot_items(draw_phasors)
- pswamp.gui.grid_view.dim_2d.layers.read_geo_data(countries='All')
- pswamp.gui.grid_view.dim_2d.layers.load_bus_coords_for_current_stations(config, return_3d=False, geo=True)
Get coordinates for stations in PMU data frame
- class pswamp.gui.grid_view.dim_2d.layers.HeatMapBasePlot(coords, lims=[0.9, 1.1], y_scale=1, z_offset=1, background_color=(30, 63, 64), plot_window=None)
- z_offset = 1
- y_scale = 1
- not_nan_xy
- x
- y
- im_width
- im_height
- z_scale = 1000.0
- cb
- im
- pl
- interp_method = 'linear'
- update(new_z)
- class pswamp.gui.grid_view.dim_2d.layers.PMUTimeWindowOnline(kafka_kwargs={}, kafka_topic='pmudata', auto_adjust_offset=False, **kwargs)
Bases:
PMUTimeWindowThis class is intended for consuming PMU data from a specified Kafka topic and storing the last samples (n_samples) in a TimeWindow object.
- kafka_topic = 'pmudata'
- kafka_kwargs
- auto_adjust_offset = False
- pmu_stream
- _is_stopped = False
- initialize()
- run()
- stop()
- class pswamp.gui.grid_view.dim_2d.layers.FrequencyHeatMap(parent, config, geo=True, heatmap_kwargs=dict(y_scale=1, lims=[-0.035, 0.035], z_offset=0))
- config
- uuid
- plotWidget
- k = 2
- x
- y
- z
- heatmap
- pmu_tw
- freq_col_idx
- update_heatmap()
- remove_layer()
- pswamp.gui.grid_view.dim_2d.layers.read_geo_data(countries='All')
- class pswamp.gui.grid_view.dim_2d.layers.CountriesLayer(parent, config, geo=True)
- config
- k = 2
- plotWidget
- geo_data
- geo_lines
- add_geo_lines(geo_data)
- update_countries(countries=['Norway'])
- remove_layer()
- class pswamp.gui.grid_view.dim_2d.layers.CountriesLayerSettings(target_layer, *args, **kwargs)
Bases:
PySide6.QtWidgets.QWidget- target_layer
- item_list
- done_button
- done_button_click()
- onItemClicked(item)
- pswamp.gui.grid_view.dim_2d.layers.config
- class pswamp.gui.grid_view.dim_2d.layers.PMUTimeWindow(n_samples=None, window_length=None, time_window_type=TimeWindowLabeled, substitute_zero_freq_with_nan=True, channel_selection=None, channel_selection_idx=None)
- time_window_type
- tw = None
- header = None
- n_samples = None
- window_length = None
- is_initialized = False
- n_channels = None
- dt
- fs
- pmu_decoder
- initialize_from_config_frame(config_frame)
- update_window(pmu_data_frame)
- class pswamp.gui.grid_view.dim_2d.layers.PhasorPlot(n_phasors=None, pos0=None, normalize_length=True, normalize_angle=False, update_freq=None, plot_widget=None, background_color=(30, 63, 64), *args, **kwargs)
Bases:
PySide6.QtWidgets.QWidget- request_plot_update
- pos0 = None
- approx_zero_value = 1e-06
- normalize_length = True
- normalize_angle = False
- update_freq = None
- angles_prev
- phasors
- phasor_0
- colors
- create_plot_items()
- update(phasors)
- update_plot()
- update_plot_items(draw_phasors)
- pswamp.gui.grid_view.dim_2d.layers.read_geo_data(countries='All')
- pswamp.gui.grid_view.dim_2d.layers.load_bus_coords_for_current_stations(config, return_3d=False, geo=True)
Get coordinates for stations in PMU data frame
- pswamp.gui.grid_view.dim_2d.layers.get_from_database(config, field)
- class pswamp.gui.grid_view.dim_2d.layers.PMULayer(parent, config, geo=True)
- config
- plotWidget
- k = 2
- x
- y
- z
- colors
- bus_scatter
- add_scatter_plot(bus_coords_3d)
- remove_layer()
- pswamp.gui.grid_view.dim_2d.layers.sample_dataset_path