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 example for creating pixel mask to ophys tutorial (inspired by #572) #577

Merged
merged 7 commits into from
Aug 28, 2024

Conversation

ehennestad
Copy link
Collaborator

@ehennestad ehennestad commented Jul 1, 2024

Motivation

It was unclear how to create pixel_mask for PlaneSegmentation objects. This was raised in issue #572

How to test the behavior?

open ophys.mlx

Checklist

  • 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 #XX where XX is the issue number?

@ehennestad
Copy link
Collaborator Author

@bendichter
@lawrence-mbf one test fails, related to nwb version. Is that due to matnwb still being on v2.6.0?

@lawrence-mbf
Copy link
Collaborator

@bendichter @lawrence-mbf one test fails, related to nwb version. Is that due to matnwb still being on v2.6.0?

Yeah, the message implies that pynwb is using 2.7.0 by default.

plane_segmentation = types.core.PlaneSegmentation( ...
'colnames', {'pixel_mask'}, ...
'description', 'roi pixel position (x,y) and pixel weight', ...
'id', types.hdmf_common.ElementIdentifiers('data', int64(0:n_rois-1)'), ...
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'id', types.hdmf_common.ElementIdentifiers('data', int64(0:n_rois-1)'), ...

this line is no longer needed. If 'id' is omitted, it will be added automatically.

@bendichter
Copy link
Contributor

@ehennestad this looks great! Just one minor edit, then it's good to go

@ehennestad
Copy link
Collaborator Author

@bendichter

@bendichter bendichter merged commit 14281d7 into master Aug 28, 2024
1 check failed
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.

3 participants