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

add MiniscopeDataInterface #163

Closed
wants to merge 16 commits into from
Closed

add MiniscopeDataInterface #163

wants to merge 16 commits into from

Conversation

bendichter
Copy link
Contributor

Motivation

fix #162

Checklist

  • Have you thoroughly read our Developer Guide?
  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XXX where XXX is the issue number?
  • Did you update the CHANGLOG.md file on your branch to describe your changes?


nwb.add_acquisition(
ImageSeries(
name="OnePhotonSeries",
Copy link
Member

Choose a reason for hiding this comment

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

The OnePhotonSeries here: NeurodataWithoutBorders/nwb-schema#523

has been approved by Oliver but stalled after that. Let's try to get that integrated and make use of that instead of making something ad-hoc here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea!


nwb.add_acquisition(
ImageSeries(
name="behaviorCam",
Copy link
Member

Choose a reason for hiding this comment

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

Gonna need some example data together with some example stub files to really understand this, but the behavior video stream is attached to the regular microscope camera? Are they synchronized through the same system?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are synchronized through the same system

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

That is pretty nice then actually, first time I've seen a format with auto-synchronizing behavior stream!

@h-mayorquin
Copy link
Collaborator

@bendichter
For the test that is failing you need to add the name of the interface in the following lines:

neuroconv/tests/imports.py

Lines 109 to 110 in aae9a0d

"Suite2pSegmentationInterface",
"TiffImagingInterface",

@h-mayorquin
Copy link
Collaborator

h-mayorquin commented Oct 17, 2022

I added type hints which were causing tests to fail. I guess we don't have gin data for this, do we?

@bendichter
Copy link
Contributor Author

We need gin data for this interface

@CodyCBakerPhD
Copy link
Member

Found some example files: https://github.com/denisecailab/minian/tree/master/demo_movies

with some corresponding .nc files (not sure what those are): https://github.com/denisecailab/minian/tree/master/demo_data/session1

OnePhotonSeries is under way: NeurodataWithoutBorders/pynwb#1593

If we wanted to get this through faster, I would say we would at least need to adjust the ndx-miniscope extension to use a TwoPhotonSeries named OnePhotonSeries instead of an ImageSeries as it currently is. There's a lot of ophys metadata about the imaging planes and optic channels that isn't linked otherwise...

The behavior cam stuff would be good to go as is, though. I think the VideoInterface should actually work for that as-is, but we could always create a specially named child class just for miniscope if desired

@CodyCBakerPhD CodyCBakerPhD changed the base branch from old_main to main November 25, 2022 05:14
@CodyCBakerPhD CodyCBakerPhD marked this pull request as draft November 25, 2022 16:12
@CodyCBakerPhD
Copy link
Member

Looking deeper into the ndx-miniscope extension, its practice of writing the data to a simple ImageSeries causes us to loose a lot of valuable ophys metadata structure (the ImagingPlane, the OpticalChannels, etc.) so I'd prefer if it at least wrote to a TwoPhotonSeries named 'OnePhotonSeries' (as people have had to do for a while now) until the hanging issues on the OnePhotonSeries (NeurodataWithoutBorders/pynwb#1593) are resolved and released

@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Merging #163 (522e7e8) into main (f0d5886) will decrease coverage by 0.41%.
The diff coverage is 50.00%.

❗ Current head 522e7e8 differs from pull request most recent head ac6f316. Consider uploading reports for the commit ac6f316 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
- Coverage   91.73%   91.32%   -0.42%     
==========================================
  Files          78       66      -12     
  Lines        3739     3435     -304     
==========================================
- Hits         3430     3137     -293     
+ Misses        309      298      -11     
Flag Coverage Δ
unittests 91.32% <50.00%> (-0.42%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...terfaces/ophys/miniscope/miniscopedatainterface.py 48.00% <48.00%> (ø)
src/neuroconv/datainterfaces/__init__.py 100.00% <100.00%> (ø)
...c/neuroconv/tools/spikeinterface/spikeinterface.py 90.21% <0.00%> (-0.92%) ⬇️
...erfaces/ecephys/baserecordingextractorinterface.py 94.00% <0.00%> (-0.12%) ⬇️
src/neuroconv/utils/__init__.py 100.00% <0.00%> (ø)
src/neuroconv/basedatainterface.py 96.00% <0.00%> (ø)
...onv/datainterfaces/ecephys/ced/ceddatainterface.py 85.71% <0.00%> (ø)
...onv/datainterfaces/ecephys/phy/phydatainterface.py 100.00% <0.00%> (ø)
...terfaces/ecephys/spikeglx/spikeglxdatainterface.py 100.00% <0.00%> (ø)
... and 27 more

@CodyCBakerPhD
Copy link
Member

Replaced by #468, which uses the OnePhotonSeries, ophys metadata, and ROIExtractors on top of the ndx-miniscope types

GIN data should be made available soon for Miniscope v3

@CodyCBakerPhD CodyCBakerPhD deleted the miniscope branch June 8, 2023 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: add miniscope datainterface
3 participants