Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplicating channel names as property in neo base extractor when all_annotations=True #2845

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading