Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASdataprocessing
Commits
6eb2b345
Commit
6eb2b345
authored
Aug 30, 2018
by
Markus Mirz
Browse files
improving dpsim read function
parent
bb192aa8
Changes
2
Hide whitespace changes
Inline
Side-by-side
dataprocessing/dpsim.py
View file @
6eb2b345
...
...
@@ -7,7 +7,7 @@ def get_node_voltage_phasors(dpsim_timeseries_list):
:return:
"""
voltage_phasor_list
=
{}
for
ts
in
dpsim_timeseries_list
:
for
name
,
ts
in
dpsim_timeseries_list
.
items
()
:
ts_abs
=
ts
.
abs
(
ts
.
name
+
'_abs'
)
ts_phase
=
ts
.
phase
(
ts
.
name
+
'_phase'
)
ts_phasor
=
{}
...
...
@@ -23,7 +23,7 @@ def get_node_emt_voltages(timeseries_list, freq):
:return:
"""
voltages_list
=
{}
for
ts
in
timeseries_list
:
for
name
,
ts
in
timeseries_list
.
items
()
:
ts_emt
=
ts
.
dynphasor_shift_to_emt
(
ts
.
name
,
freq
)
voltages_list
[
ts
.
name
]
=
ts_emt
...
...
dataprocessing/readtools.py
View file @
6eb2b345
...
...
@@ -81,7 +81,7 @@ def read_timeseries_dpsim(filename, timeseries_names=None):
:return: list of Timeseries objects
"""
pd_df
=
pd
.
read_csv
(
filename
)
timeseries_list
=
[]
timeseries_list
=
{}
cmpl_result_columns
=
[]
real_result_columns
=
[]
...
...
@@ -107,14 +107,12 @@ def read_timeseries_dpsim(filename, timeseries_names=None):
#print("Found real variable: " + column)
for
column
in
real_result_columns
:
timeseries_list
.
append
(
TimeSeries
(
column
,
timestamps
,
pd_df
[
column
]))
timeseries_list
[
column
]
=
TimeSeries
(
column
,
timestamps
,
pd_df
[
column
])
for
column
in
cmpl_result_columns
:
timeseries_list
.
append
(
TimeSeries
(
column
,
timestamps
,
np
.
vectorize
(
complex
)(
pd_df
[
column
+
real_string
],
pd_df
[
column
+
imaginary_string
])))
timeseries_list
[
column
]
=
TimeSeries
(
column
,
timestamps
,
np
.
vectorize
(
complex
)(
pd_df
[
column
+
real_string
],
pd_df
[
column
+
imaginary_string
]))
else
:
# Read in specified time series
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment