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
05cd28ae
Commit
05cd28ae
authored
Jan 04, 2018
by
Markus Mirz
Browse files
clean up
parent
cee284ae
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
dataprocessing/readtools.py
View file @
05cd28ae
...
...
@@ -84,14 +84,17 @@ def read_timeseries_dpsim_cmpl(filename, timeseries_names=None):
:param timeseries_names: column name which should be read
:return: list of Timeseries objects
"""
pd_df
=
pd
.
read_csv
(
filename
,
header
=
None
)
pd_df
=
pd
.
read_csv
(
filename
)
timeseries_list
=
[]
if
timeseries_names
is
None
:
# No trajectory names specified, thus read in all
pd_df
.
rename
(
columns
=
lambda
x
:
x
.
strip
(),
inplace
=
True
)
column_names
=
list
(
pd_df
.
columns
.
values
)
print
(
column_names
)
# Remove timestamps column name and store separately
column_names
.
remove
(
0
)
column_names
.
remove
(
'time'
)
print
(
column_names
)
timestamps
=
pd_df
.
iloc
[:,
0
]
# Calculate number of network nodes since array is [real, imag]
node_number
=
int
(
len
(
column_names
)
/
2
)
...
...
@@ -99,7 +102,7 @@ def read_timeseries_dpsim_cmpl(filename, timeseries_names=None):
for
column
in
column_names
:
if
node_index
<=
node_number
:
ts_name
=
'node '
+
str
(
node_index
)
timeseries_list
.
append
(
TimeSeries
(
ts_name
,
timestamps
,
np
.
vectorize
(
complex
)(
pd_df
.
iloc
[:,
column
],
pd_df
.
iloc
[:,
column
+
node_number
])))
timeseries_list
.
append
(
TimeSeries
(
ts_name
,
timestamps
,
np
.
vectorize
(
complex
)(
pd_df
.
iloc
[:,
node_index
],
pd_df
.
iloc
[:,
node_index
+
node_number
])))
else
:
break
node_index
=
node_index
+
1
...
...
examples/plot_absolute_example.py
→
examples/
DPsim/
plot_absolute_example.py
View file @
05cd28ae
File moved
examples/DynPh_EMT_Comparison.ipynb
deleted
100644 → 0
View file @
cee284ae
This diff is collapsed.
Click to expand it.
examples/DynamicPhasorBasics.ipynb
deleted
100644 → 0
View file @
cee284ae
This diff is collapsed.
Click to expand it.
examples/Examples.ipynb
deleted
100644 → 0
View file @
cee284ae
This diff is collapsed.
Click to expand it.
examples/
C
ompar
ison_M
odelica_
DP
sim.py
→
examples/
c
ompar
e_m
odelica_
dp
sim.py
View file @
05cd28ae
File moved
examples/
C
ompare
M
odelica
PLECS
.py
→
examples/
c
ompare
_m
odelica
_plecs
.py
View file @
05cd28ae
File moved
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