Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lemi2seed
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Software Public
MT
lemi2seed
Commits
ab1c441d
Commit
ab1c441d
authored
3 years ago
by
Maeva Pourpoint
Browse files
Options
Downloads
Patches
Plain Diff
Add method "update_electrode_info" to replace inner loop in "update_array" method
parent
a1865409
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
Data handling functionalities
Pipeline
#1367
passed with stage
in 5 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lemi2seed/lemi_data.py
+11
-4
11 additions, 4 deletions
lemi2seed/lemi_data.py
with
11 additions
and
4 deletions
lemi2seed/lemi_data.py
+
11
−
4
View file @
ab1c441d
...
...
@@ -249,10 +249,17 @@ class LemiData():
# Update component, channel_name and location code for electric channels
e_loc
=
get_e_loc
(
e_info
)
for
key
,
val
in
e_info
.
items
():
for
ind
in
np
.
where
(
self
.
data_np
[
'
channel_number
'
]
==
key
)[
0
]:
self
.
data_np
[
ind
][
'
component
'
]
=
val
self
.
data_np
[
ind
][
'
channel_name
'
]
=
CHANNEL_NAMING_CONVENTION
[
val
]
self
.
data_np
[
ind
][
'
location
'
]
=
e_loc
.
get
(
key
,
''
)
self
.
update_electrode_info
(
key
,
val
,
e_loc
)
def
update_electrode_info
(
self
,
key
:
str
,
val
:
str
,
e_loc
:
Dict
)
->
None
:
"""
Update electrode info (component, channel_name and location code) in
data_np attribute.
"""
for
ind
in
np
.
where
(
self
.
data_np
[
'
channel_number
'
]
==
key
)[
0
]:
self
.
data_np
[
ind
][
'
component
'
]
=
val
self
.
data_np
[
ind
][
'
channel_name
'
]
=
CHANNEL_NAMING_CONVENTION
[
val
]
self
.
data_np
[
ind
][
'
location
'
]
=
e_loc
.
get
(
key
,
''
)
def
update_data
(
self
,
qc_inputs
:
Optional
[
Dict
]
=
None
,
metadata
=
None
)
->
None
:
...
...
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