-
Notifications
You must be signed in to change notification settings - Fork 86
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
ElectrodesTable #1890
Draft
mavaylon1
wants to merge
19
commits into
dev
Choose a base branch
from
electrode
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
ElectrodesTable #1890
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2be97c9
ElectrodesTable
mavaylon1 ea7d60f
foo
mavaylon1 fe28745
check
mavaylon1 5ac7321
file
mavaylon1 b24d47d
checkpoint
mavaylon1 45dbe9e
Merge branch 'dev' into electrode
mavaylon1 6caa774
Merge branch 'dev' into electrode
mavaylon1 f00b134
not sure clean up
mavaylon1 dbfb805
Merge branch 'dev' into electrode
mavaylon1 be0614c
checkpoint repr works as well as able to write
mavaylon1 c97a0df
backwards compat seems to work
mavaylon1 64ad906
draft complete
mavaylon1 dc1f7b8
cleanup 1
mavaylon1 c02886b
cleanup 1
mavaylon1 0cd8edc
clean up 2
mavaylon1 06cf465
Add note
mavaylon1 81fa0e6
rebase:
mavaylon1 6cb8577
Update test_nwbfile.py
mavaylon1 5785f75
clean up
mavaylon1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
from .base import TimeSeries, ProcessingModule | ||
from .device import Device | ||
from .epoch import TimeIntervals | ||
from .ecephys import ElectrodeGroup | ||
from .ecephys import ElectrodeGroup, ElectrodesTable | ||
from .icephys import (IntracellularElectrode, SweepTable, PatchClampSeries, IntracellularRecordingsTable, | ||
SimultaneousRecordingsTable, SequentialRecordingsTable, RepetitionsTable, | ||
ExperimentalConditionsTable) | ||
|
@@ -389,7 +389,7 @@ | |
{'name': 'lab_meta_data', 'type': (list, tuple), 'default': None, | ||
'doc': 'an extension that contains lab-specific meta-data'}, | ||
{'name': 'electrodes', 'type': DynamicTable, | ||
'doc': 'the ElectrodeTable that belongs to this NWBFile', 'default': None}, | ||
'doc': 'the ElectrodesTable that belongs to this NWBFile', 'default': None}, | ||
{'name': 'electrode_groups', 'type': Iterable, | ||
'doc': 'the ElectrodeGroups that belong to this NWBFile', 'default': None}, | ||
{'name': 'ic_electrodes', 'type': (list, tuple), | ||
|
@@ -615,7 +615,7 @@ | |
|
||
def __check_electrodes(self): | ||
if self.electrodes is None: | ||
self.electrodes = ElectrodeTable() | ||
self.electrodes = ElectrodesTable() | ||
|
||
@docval(*get_docval(DynamicTable.add_column), allow_extra=True) | ||
def add_electrode_column(self, **kwargs): | ||
|
@@ -709,7 +709,7 @@ | |
for idx in region: | ||
if idx < 0 or idx >= len(self.electrodes): | ||
raise IndexError('The index ' + str(idx) + | ||
' is out of range for the ElectrodeTable of length ' | ||
' is out of range for the ElectrodesTable of length ' | ||
+ str(len(self.electrodes))) | ||
desc = getargs('description', kwargs) | ||
name = getargs('name', kwargs) | ||
|
@@ -791,13 +791,13 @@ | |
self.__check_invalid_times() | ||
self.invalid_times.add_interval(**kwargs) | ||
|
||
@docval({'name': 'electrode_table', 'type': DynamicTable, 'doc': 'the ElectrodeTable for this file'}) | ||
@docval({'name': 'electrode_table', 'type': ElectrodesTable, 'doc': 'the ElectrodesTable for this file'}) | ||
def set_electrode_table(self, **kwargs): | ||
""" | ||
Set the electrode table of this NWBFile to an existing ElectrodeTable | ||
Set the electrode table of this NWBFile to an existing ElectrodesTable | ||
""" | ||
if self.electrodes is not None: | ||
msg = 'ElectrodeTable already exists, cannot overwrite' | ||
msg = 'ElectrodesTable already exists, cannot overwrite' | ||
raise ValueError(msg) | ||
electrode_table = getargs('electrode_table', kwargs) | ||
self.electrodes = electrode_table | ||
|
@@ -1150,16 +1150,6 @@ | |
return t | ||
|
||
|
||
def ElectrodeTable(name='electrodes', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might break downstream code. Hopefully not because people should not be using this function, but it is not conventionally marked as private with leading underscores, so they might. What do you think about changing this to something like: def ElectrodeTable(name='electrodes',
description='metadata about extracellular electrodes'):
warn("The ElectrodeTable convenience function is deprecated. Please create a new instance of the ElectrodesTable class instead.", DeprecationWarning)
return ElectrodesTable() |
||
description='metadata about extracellular electrodes'): | ||
return _tablefunc(name, description, | ||
[('location', 'the location of channel within the subject e.g. brain region'), | ||
('group', 'a reference to the ElectrodeGroup this electrode is a part of'), | ||
('group_name', 'the name of the ElectrodeGroup this electrode is a part of') | ||
] | ||
) | ||
|
||
|
||
def TrialTable(name='trials', description='metadata about experimental trials'): | ||
return _tablefunc(name, description, ['start_time', 'stop_time']) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule nwb-schema
updated
8 files
+2 −2 | README.rst | |
+24 −10 | core/nwb.base.yaml | |
+2 −2 | core/nwb.behavior.yaml | |
+69 −0 | core/nwb.ecephys.yaml | |
+5 −67 | core/nwb.file.yaml | |
+1 −1 | core/nwb.namespace.yaml | |
+2 −2 | docs/format/source/conf.py | |
+15 −0 | docs/format/source/format_release_notes.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please bump to PyNWB 3.1.0 as this is a minor change, not a bug fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will also be part of supporting NWB schema 2.9.0