Commit 098f7b8d authored by Markus Mirz's avatar Markus Mirz
Browse files

added dpsim module

parent 9efcf2ad
from dataprocessing.readtools import *
from dataprocessing.timeseries import *
def get_node_voltage_phasors(dpsim_timeseries_list):
"""Calculate voltage phasors of all nodes
:param dpsim_timeseries_list: timeseries list retrieved from dpsim results
voltage_phasor_list = {}
for ts in dpsim_timeseries_list:
ts_abs = ts.abs( + '_abs')
ts_phase = ts.phase( + '_phase')
ts_phasor = [ts_abs, ts_phase]
voltage_phasor_list[] = ts_phasor
return voltage_phasor_list
......@@ -32,14 +32,6 @@ class TimeSeries:
ts_scaled = TimeSeries(name, self.time, self.values * factor)
return ts_scaled
def complex_abs_dep(name, ts_real, ts_imag):
""" Calculate absolute value of complex variable.
Assumes the same time steps for both timeseries.
ts_abs = TimeSeries(name, ts_real.time, np.sqrt(ts_real.values ** 2 + ts_imag.values ** 2))
return ts_abs
def complex_abs(name, ts_real, ts_imag):
""" Calculate absolute value of complex variable.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment