-
Notifications
You must be signed in to change notification settings - Fork 84
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
unknown new formatting for imaging ROIs in v1.4.0 #1334
Comments
Hi @carsen-stringer . Thanks for the bug report. What version of h5py do you have installed? |
h5py 2.10.0 pypi_0 pypi |
okay so I dug into this a little more and now the |
I've fixed the accessing in suite2p and it should be backward compatible, but other imaging softwares may have similar issues |
Thanks for tracking this down, @carsen-stringer! |
Hi @carsen-stringer . Sorry for not following up on this issue. The core machinery of PyNWB lives in HDMF, which we also maintain. We found that PyNWB 1.4.0 with HDMF 2.2.0 wrote pixel masks as a dataset of dtype int and shape (N, 3), when instead, based on the NWB spec, it should be written as a dataset of compound type (uint, uint, float) and shape (N, ) (see #1313). This was fixed in HDMF 2.3.0, which changes how pixel mask data are written, which in turn changes how the data can be read. Since PyNWB has not yet released a new version since the update to HDMF 2.3.0, you will get different behavior with PyNWB 1.4.0 and different versions of HDMF. I've raised issue #1343 to make a new PyNWB release and to change our release workflow to prevent this from happening again. We also need to update PyNWB to have the same API regardless of what version of HDMF the file was written with. Files written with HDMF 2.2.0 and below contain a pixel mask dataset of dtype int and shape (N, 3). When reading such a file, Files written with HDMF 2.3.0 and up contain a pixel mask dataset of compound type (uint, uint, float) and shape (N, ). When reading such a file, It looks like suite2p previously used the I am puzzled as to how you got |
Ah you're right it's an np.ndarray that's structured! Sorry I didn't realize that. You're right, one of those should work -- I was checking for an np.ndarray because I assumed the new format was a dictionary :) thanks so much for all the help. The way I've written it now should work for either case:
|
Description
Before pynwb==1.4.0, rois could be saved as 2D, now I write them as 2D but when I read them they are no longer 2D:
There is no mention of format change in the v1.4.0 release, this works fine in v1.3.3.
Steps to Reproduce
Environment
Checklist
The text was updated successfully, but these errors were encountered: