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

Crude skeleton for spikeextractors producer generators #15

Merged
merged 6 commits into from
Apr 3, 2021

Conversation

yarikoptic
Copy link
Member

@jwodder here is a crude idea for what I had in mind in #13 (drafting a PR as dirty as it was before I had to switch to another call/activity...) . WDYT - could we implement it in some way like this?

@jwodder
Copy link
Member

jwodder commented Apr 2, 2021

@yarikoptic I've changed the PR to check out the ephy_testing_data in a cached directory and also updated the rest of the code so that create() returns an iterable of triples.

@yarikoptic
Copy link
Member Author

Thank you @jwodder -- please finish it up to your liking (see the comment pointing to code to be finished) to get it all working and merge it whenever you are satisfied.

Comment on lines 142 to 143
nwbfile = NWBFile()
se.NwbRecordingExtractor.write_recording(recording, nwbfile=nwbfile, write_scaled=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarikoptic This bit doesn't seem to work; nwbfile = NWBFile() seems to be erroring out with TypeError: NWBFile.__init__: missing argument 'session_description', missing argument 'identifier', missing argument 'session_start_time'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just add some dummy ones. This is just for a test after all

with tempfile.NamedTemporaryFile() as tf:
se.NwbSortingExtractor.write_sorting(sorting, tf.name)
with pynwb.NWBHDF5IO(tf.name, mode="r") as io:
nwbfile = io.read()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarikoptic I got the Extractors to run, but the Sorters are failing here with hdmf.backends.io.UnsupportedOperation: Cannot read data from file /var/folders/l7/wrkq93d133d8zpn36fmqrq0r0000gn/T/tmpz8otn54x in mode 'r+'. There are no values..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it only for a single extractor or for all of them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if single -- just comment it out for now and produce for those for which it produces, and report for those which do not.
If for all -- I guess it is something more fundamental - just add a comment and do not enable the sorters tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarikoptic It's for all of them.

@jwodder jwodder marked this pull request as ready for review April 3, 2021 04:06
@jwodder jwodder merged commit f8fb6ec into master Apr 3, 2021
@jwodder jwodder deleted the enh-spikeextractors branch April 3, 2021 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants