Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NASA Battery Dataset
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GC TICc
16TICc19 HES-SO - Predict
NASA Battery Dataset
Commits
5e5a3646
Unverified
Commit
5e5a3646
authored
6 years ago
by
etienne
Browse files
Options
Downloads
Plain Diff
Merge branch 'extraction-complex' into auto-scikit-learn
parents
d44b4127
3228d83d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extraction/extract_item_into_dict.py
+13
-12
13 additions, 12 deletions
extraction/extract_item_into_dict.py
with
13 additions
and
12 deletions
extraction/extract_item_into_dict.py
+
13
−
12
View file @
5e5a3646
"""
This file tries to split one matlab item into a dictionnary
"""
import
numpy
as
np
def
_convert_matlab_datetime_vector_to_utc
(
date_vector
):
...
...
@@ -70,26 +71,26 @@ def extract_impedance_from_item(item):
dict_item
[
"
datetime
"
]
=
_convert_matlab_datetime_vector_to_utc
(
item
[
2
][
0
])
dict_item
[
"
sense_current
"
]
=
item
[
3
][
0
][
0
][
0
][
0
]
# Current in sense branch (Amps)| Complexes
dict_item
[
"
sense_current_real
"
]
=
[
complx
.
real
for
complx
in
dict_item
[
"
sense_current
"
]]
dict_item
[
"
sense_current_imag
"
]
=
[
complx
.
imag
for
complx
in
dict_item
[
"
sense_current
"
]]
dict_item
[
"
sense_current_real
"
]
=
np
.
array
(
[
complx
.
real
for
complx
in
dict_item
[
"
sense_current
"
]]
)
dict_item
[
"
sense_current_imag
"
]
=
np
.
array
(
[
complx
.
imag
for
complx
in
dict_item
[
"
sense_current
"
]]
)
dict_item
[
"
battery_current
"
]
=
item
[
3
][
0
][
0
][
1
][
0
]
# Current in battery branch (Amps)| Complexes
dict_item
[
"
battery_current_real
"
]
=
[
complx
.
real
for
complx
in
dict_item
[
"
battery_current
"
]]
dict_item
[
"
battery_current_imag
"
]
=
[
complx
.
imag
for
complx
in
dict_item
[
"
battery_current
"
]]
dict_item
[
"
battery_current_real
"
]
=
np
.
array
(
[
complx
.
real
for
complx
in
dict_item
[
"
battery_current
"
]]
)
dict_item
[
"
battery_current_imag
"
]
=
np
.
array
(
[
complx
.
imag
for
complx
in
dict_item
[
"
battery_current
"
]]
)
dict_item
[
"
current_ratio
"
]
=
item
[
3
][
0
][
0
][
2
][
0
]
# Ratio of the above currents| Complexes
dict_item
[
"
current_ratio_real
"
]
=
[
complx
.
real
for
complx
in
dict_item
[
"
current_ratio
"
]]
dict_item
[
"
current_ratio_imag
"
]
=
[
complx
.
imag
for
complx
in
dict_item
[
"
current_ratio
"
]]
dict_item
[
"
current_ratio_real
"
]
=
np
.
array
(
[
complx
.
real
for
complx
in
dict_item
[
"
current_ratio
"
]]
)
dict_item
[
"
current_ratio_imag
"
]
=
np
.
array
(
[
complx
.
imag
for
complx
in
dict_item
[
"
current_ratio
"
]]
)
# Battery impedance (Ohms) computed from raw data| Complexes
dict_item
[
"
battery_impedance
"
]
=
[
val
[
0
]
for
val
in
item
[
3
][
0
][
0
][
3
]]
dict_item
[
"
battery_impedance_real
"
]
=
[
complx
.
real
for
complx
in
dict_item
[
"
battery_impedance
"
]]
dict_item
[
"
battery_impedance_imag
"
]
=
[
complx
.
imag
for
complx
in
dict_item
[
"
battery_impedance
"
]]
dict_item
[
"
battery_impedance
"
]
=
np
.
array
(
[
val
[
0
]
for
val
in
item
[
3
][
0
][
0
][
3
]]
)
dict_item
[
"
battery_impedance_real
"
]
=
np
.
array
(
[
complx
.
real
for
complx
in
dict_item
[
"
battery_impedance
"
]]
)
dict_item
[
"
battery_impedance_imag
"
]
=
np
.
array
(
[
complx
.
imag
for
complx
in
dict_item
[
"
battery_impedance
"
]]
)
# Calibrated and smoothed battery impedance (Ohms)| Complexes
dict_item
[
"
rectified_impedance
"
]
=
[
val
[
0
]
for
val
in
item
[
3
][
0
][
0
][
4
]]
dict_item
[
"
rectified_impedance_real
"
]
=
[
complx
.
real
for
complx
in
dict_item
[
"
rectified_impedance
"
]]
dict_item
[
"
rectified_impedance_imag
"
]
=
[
complx
.
imag
for
complx
in
dict_item
[
"
rectified_impedance
"
]]
dict_item
[
"
rectified_impedance
"
]
=
np
.
array
(
[
val
[
0
]
for
val
in
item
[
3
][
0
][
0
][
4
]]
)
dict_item
[
"
rectified_impedance_real
"
]
=
np
.
array
(
[
complx
.
real
for
complx
in
dict_item
[
"
rectified_impedance
"
]]
)
dict_item
[
"
rectified_impedance_imag
"
]
=
np
.
array
(
[
complx
.
imag
for
complx
in
dict_item
[
"
rectified_impedance
"
]]
)
dict_item
[
"
re
"
]
=
item
[
3
][
0
][
0
][
5
][
0
][
0
]
# Estimated electrolyte resistance (Ohms)| float_
dict_item
[
"
rct
"
]
=
item
[
3
][
0
][
0
][
6
][
0
][
0
]
# Estimated charge transfer resistance (Ohms)| float_
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment