Skip to content

Commit

Permalink
avoid duplicating channel names as property when all_annotations=True
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed May 14, 2024
1 parent 3864afd commit 6565db6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def __init__(
If True, include all annotations in the extracted data.
use_names_as_ids : Optional[bool], default: None
If True, use channel names as IDs. Otherwise, use default IDs.
In NEO the ids are guaranteed to be unique. Names are user defined and can be duplicated.
neo_kwargs : Dict[str, Any]
Additional keyword arguments to pass to the NeoBaseExtractor for initialization.
Expand Down Expand Up @@ -275,8 +276,8 @@ def __init__(

self.set_property("gain_to_uV", final_gains)
self.set_property("offset_to_uV", final_offsets)
if not use_names_as_ids:
self.set_property("channel_name", signal_channels["name"])
if not use_names_as_ids and not all_annotations:
self.set_property("channel_names", signal_channels["name"])

if all_annotations:
block_ann = self.neo_reader.raw_annotations["blocks"][self.block_index]
Expand Down

0 comments on commit 6565db6

Please sign in to comment.