-
Notifications
You must be signed in to change notification settings - Fork 243
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
BUG: Input array broadcast error when th_badframes = 0 #930
Comments
Quick correction - when running suite2p v0.11.1 (instead of v0.12.0), if ops are default except tau = 0.7, fs = 30, and th_badframes = 0 suite2p will run and open GUI, however will not save an NWB file. If I add save_NWB = 1 to ops, I encounter an error following save in NWB format, error message below:
|
I'm getting the same input array error on about half of the datasets I've tried so far, |
I just ran into this error as well running v0.12.0 on Debian 11. Going to try re-install/clear my conda environment in case something strange has happened after I removed and reinstalled to update. EDIT: |
Hi, I also get this error (the original one) We have analyzed the same dataset using the GUI but running it through the python function gives this error. |
Thanks for letting us know about this. Can someone provide a dropbox link to a dataset such that this can be reproduced? We are having trouble replicating this on our end. |
I can provide a dataset this evening, but need to pare it down to something a lot smaller. It's currently about 60k individual tiffs acquired from a Bruker 2p scope. If it still throws this error with a smaller number of tiffs I'll update this comment with the link for you. I'll also include my conda environment and the info about the machine I've run it on most recently (it's happened across several different machines). I can also put it into H5 or whatever else you'd like if that's easier for you. |
Yep, that'd be great! It'd be best if it's as small as possible and can reproduce this error. Any format is fine. Thanks a bunch! |
I can also upload a dataset if it might be helpful. Also, I don't know if this is a clue but sometimes it seems like registration runs fine on the initial analysis, but if I try to open the session up later on and/or tweak parameters, things "break" and I wind up with OP's error message. I'm a bit confused as to whether I should be saving the ops.npy from the initial run-through and reloading those ops when I reopen the session to avoid any conflicts with the default values? I am using the GUI to change ops values, btw. |
Yes, @lizard1111, if you could that would be greatly appreciated. |
Somehow since Monday evening I have been unable to reproduce this with any of my troublesome datasets of any size... Really unsure what I did... Trying to break it again though! |
That's funny, @jmdelahanty - same deal here. I've been loading in much smaller datasets than usual though, so I will see what happens with one of my regular-sized ones. |
I am having this issue as well, and from looking at the
Output:
|
…ich the current batch has fewer frames than the bin_size
Hi @RandallJEllis, thanks for providing this code! Seems this error was caused by a particular edge case in which the last batch (frames 6000-6020) happened to have the same number of frames as the We've updated the code to cover these edge cases but without the data that caused the errors in the first place, we can't say for sure if this was the problem @lizard1111 and @jmdelahanty faced above. I'll close this for now since the commit above fixes the bug @RandallJEllis mentioned but you all can feel free to create another issue if it still persists after pulling the commit 83d4ebb. |
* add get_nd2_list method * remove comment * support pipelining nd2 files * support pipelining nd2 files * fix docstring and whitespaces * bug fix * final touch * Modified README to contain updated suite2p installation instructions for mac Ventura OS. Addresses issue MouseLand#897. * Fixed issue MouseLand#908 regarding badframes for register.py. Detection module was fixed to properly bin movies AFTEr taking into account bad frames. * Fix blocks issue for nonrigid registration in MouseLand#907 * Update test_and_deploy.yml * Removed whitespace from display xauthority line in tox.ini. * Update test_and_deploy.yml Add apt-get update for linux runner and remove dvc requirement. * Update test_and_deploy.yml Added py import to workflow file and added debugging only during job failures * Update test_and_deploy.yml * Update tox.ini * Update test_and_deploy.yml Remove the up-term step. * Updated TwophotonSeries initialization for save_nwb in io * Bump torch from 1.11.0 to 1.13.1 Bumps [torch](https://github.com/pytorch/pytorch) from 1.11.0 to 1.13.1. - [Release notes](https://github.com/pytorch/pytorch/releases) - [Changelog](https://github.com/pytorch/pytorch/blob/master/RELEASE.md) - [Commits](pytorch/pytorch@v1.11.0...v1.13.1) --- updated-dependencies: - dependency-name: torch dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update issue templates * Update installation-issues.yml for issues * Rename installation-issues.yml to installation-issue.yml * Update installation issue.yml * Update bug_report.yml * Added bug_report.yml issue template * Update all issue templates * Update feature_request issue * Update feature_request.yml * Fixes issue MouseLand#914 for saving news ops parameters * Update documentation_issue.yml * Update documentation_issue.yml * Fixes multiplane issue MouseLand#905 with save_nwb * Fixes issue MouseLand#904 for 2 channel manual labeling * Update .readthedocs.yml * remove spaces * conform to function signature and usage pattern a few lines above * add nd2 in requirements * minor revision * new logic * refactor dim sorting * revert to previous code * Fixes the from_stat_dict bug mentioned in MouseLand#935. * Update run suite2p jupyter notebook to fix issue MouseLand#935 * Addresses MouseLand#930 in which bin_data has trouble dealing with cases in which the current batch has fewer frames than the bin_size * removed ops assignment * removed deprecated np.bool * Update the version of the dependencies for suite2p * Update np.bool to 'bool' to account for numpy deprecation with latest version * Add Sparse detection to gui as a setting for running suite2p * Addresses MouseLand#951 and adds nd2 as an input to gui * Fix issue with np.asanyarray being changed in numpy 1.24.4 * addressed IndexError * Update README.md * Update README.md * fixing skip torch if version 2.0 * adding pep8 style to repo * fixing dictionary splitting * modifying imports * converting to "" from '' * converting binaryfile to memmap * rewriting binarycombined * removing scanimage-tiff-reader for now * fixing dragging in gui and linewidth=88 * removing old testing yml * adding py39, updating readme * adding option for MouseLand#955 * fixing bug in docstring (MouseLand#902) * adding iplane to saved manual ROIs (MouseLand#789) * fixing MouseLand#747 saving to mat * making nd2 and scanimage-tiff-reader optional (MouseLand#950) * removing bruker dependency on scanimage-tiff-reader * Create codecov.yml * Update README.md * Update README.md * Update README.md * Update README.md * Update BinaryRWFile name usage to BinaryFile * Add instructions on how to use test_data generation script * Added instructions on generating new test data * Add method for writing tiff for binaryFile class * Update write_tiff for binary.py to crop frames, x, and y too * fix frame range issue with write_Tiff for binary * added debugging logs * removed debugging logs * removed print statement * removed unnecessary space * Fixes MouseLand#943 to address documentation issue with high_pass * adding copyright to every py file * Delete .dvc directory * fixing import error with h5py and paramiko MouseLand#987 * Update README.md * Add pynwb package to setup.py as tests needs pynwb for one of the io_tests * Update readme.md to be for python version 3.9 * Addresses MouseLand#944 leading zero issue with tiff filename. * Addresses MouseLand#944 leading zero issue with tiff filename. * Update save_path0 to close MouseLand#991. * Update save_path0 to close MouseLand#991. * update visualize.py to import rastermap properly * Re-add connected to GUI options * Update README.md Remove note about scanimage-tiff-reader mac incompatibility * Update README.md Simplify mac os instructions * Update setup.py Update rastermap requirement based on issue ticket suggestions * Update setup.py * Updated jupyter notebook to work with new binaryFile class in suite2p.io * Updated jupyter notebook name * Update colab 2023 to fully fix MouseLand#1011 and update some comments on notebook * Updated jupyter notebook to work with new binaryFile class in suite2p.io * Updated jupyter notebook name * Update colab 2023 to fully fix MouseLand#1011 and update some comments on notebook * adding pyqt6 and switching to qtpy * updating readme and fixing spelling error in copyright * adding license notice * adding check in setup.py for installation of a pyqt version * adding tutorial * Update tutorial.md with additional comments * Update suite2p gui to work with QFileDialog.Options() not working with pyqt6 * Update binary.py write_tiff to add all frames to a single series * Updated tiff.py to use contiguous parameter * Update README.md * checking h5py key to open binaries before data_path * fixing bug in code * adding new data type * adding support for binary and mp4/avi files * enabling ops.json loading in reggui and binary-only processing * increase tolerance on classification regression test * add more tolerance * increasing tolerance again * increasing tolerance again * Update README.md * Add explanation for how to apply classifiers * CheckState Fix * Fix conda environment creation for developers * Update utils.py * Update README.md to fix MouseLand#1060. Updates badge links for tests and docs * Update merge.py of gui subpackage to not use deprecated np.bool * Update merge.py of gui subpackage to not use deprecated np.bool * Add import to gui/io.py * Update gui.rst to have clearer instructions for MouseLand#1002. * bug in h5py key option * adding support for multipage bruker ome tiffs * Update inputs.rst to include multipage bruker instructions * Update inputs.rst * Added support for Thorlabs RAW files (io.raw) * Added xmltodict * Update raw.py- todo verified * safe import for xmltodict * fixing bug with multiplane registration * allowing reg_file input to compute_zpos * fixing bug with multi-plane nonrigid ops * add support for Hamamatsu DCIMG format * add support for Hamamatsu DCIMG format * add dcimg_deps to all_deps and restrict cellpose to <3.0 * Addresses MouseLand#1093 with cellpose method having too many arguments * Addresses MouseLand#1093 with cellpose method having too many arguments * remove cellpose<3.0 restriction * Fixes issue MouseLand#1101 with older version of cellpose * Update zalign.py Made sure that if a reg_file is given to the zalign function it uses it, rather than the ops reg_file * Update setup.py * adding dcimg * removing dcimg extra --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: tdincer <[email protected]> Co-authored-by: Chris Ki <[email protected]> Co-authored-by: Chris Ki <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: carsen-stringer <[email protected]> Co-authored-by: Kabilar Gunalan <[email protected]> Co-authored-by: itsb <[email protected]> Co-authored-by: Sidharth Hulyalkar <[email protected]> Co-authored-by: Ahmed Morsi <[email protected]> Co-authored-by: Marius Pachitariu <[email protected]> Co-authored-by: Heather Ratigan <[email protected]> Co-authored-by: Ryan Ly <[email protected]> Co-authored-by: Arielle Leon <[email protected]> Co-authored-by: Andrew Landau <[email protected]> Co-authored-by: arielleleon <[email protected]> Co-authored-by: yaelpri <[email protected]> Co-authored-by: yaelpri <[email protected]> Co-authored-by: Yael Prilutski <[email protected]> Co-authored-by: nguyemi5 <[email protected]> Co-authored-by: nguyemi5 <[email protected]> Co-authored-by: liadJB <[email protected]>
Describe the issue:
Hi, I’m sorry if I’m missing something simple, but it seems anytime I have my ops th_badframes = 0, I get an error in ROI detection.
I’ve tried many different ops settings and many different datasets (including ones that worked well previously).
The error is always the same and persists even when all of the ops are default except tau = 0.7, fs = 30, and th_badframes = 0
Reproduce the code example:
Error message:
No response
Version information:
suite2p v0.12.0
Context for the issue:
I use an M1 macbook, and had previously installed and used suit2p for ~ 5-6 months (though I am still a total novice).
I recently needed the display replaced and the machine came back with a factory reset and the newest Ventura OS installed. After re-install of iterm2, python3.8, miniconda (python 3.8), and suite2p v0.12.0, I have run into this error with every dataset I’ve tried.
I am curious if my problem may be a software incompatibility?
Although, I have also encountered the same error using suite2p v0.11.1 (the version I ran before my macbook was reset).
The text was updated successfully, but these errors were encountered: