suite2p
suite2p copied to clipboard
comment sbxreader nchannels overwrite
I am not sure what is the correct way to design it. But I found that sometimes I don't want to analyze the red channel. If I set nchannels parameter to 1 in ops (and comment the channel overwrite here), I can analyze only the first channel.
So I think that either the ops parameter should not be overwritten by sbxreader, or that when using sbxreader one can not give those parameters (It is actually very easy to extract them to the gui once a file is selected, and then gray-out those parameters).
Codecov Report
Merging #698 (a7dabc3) into main (c9d925e) will increase coverage by
0.00%. The diff coverage isn/a.
@@ Coverage Diff @@
## main #698 +/- ##
=====================================
Coverage 5.77% 5.77%
=====================================
Files 53 53
Lines 9218 9217 -1
=====================================
Hits 532 532
+ Misses 8686 8685 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| suite2p/io/sbx.py | 7.14% <ø> (+0.08%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update c9d925e...a7dabc3. Read the comment docs.
I don't feel comfortable accepting this change without documentation and some weigh-in from @jcouto and other people who use scanbox
Hi, thanks for the suggestions!
@orena1 could you try pulling from https://github.com/jcouto/suite2p (sbx-support branch) and letting me know if that solves the issue?
I added also a hopefully faster way to parse sbx files using file operations instead of memmap. You'll need to upgrade sbxreader for this (pip install sbxreader --upgrade).
I'll create a pull request if this works for you. Please let me know.
-
What is the status of nchannels from ops vs. sbx/mat metadata?
-
What is the status of using do_bidiphase vs. sbx_ndeadcols (conceptually related to the metadata question and cascading options, but not related to # of channels)?
I added also a hopefully faster way to parse sbx files using file operations instead of memmap. You'll need to upgrade sbxreader for this (
pip install sbxreader --upgrade).
Avoiding memory mapping when .sbx files are too large to fit in RAM would be useful.
- I see your get_stack method. How does one tell suite2p whether or not to use memory mapping when loading .sbx?
Hi @generalciao,
-
in the current release of suite2p, nchannels is being taken from the sbx; on the fork it is taken from the suite2p options.
-
As I understand it bidiphase is to adjust for the lag between odd and even rows when running in bidirectional mode. sbx_ndeadcols is for removing some columns that are recorded while the ADC is being reset and that do not reflect neuronal signals - this only happens in scanbox's bidirectional mode. The default option for sbx_ndeadcols is -1 which will remove these columns from analysis when reading the data (only if in bidirectional mode). You can set it to a different value if you want to remove more or less columns; zero for none.
-
Memory mapping map a file to memory but does not require RAM. You can run arbitrarily large files with the current release. In the fork, I made that it reads the data sequentially which in some cases is a bit faster and I'll submit a pull request later when it is properly tested. So far it runs for me on both Windows and Linux but I would like to have more people testing it to be sure.
Let me know if you want to test the fork before the pull request and I'm happy to help with any issue that you may have.
Closing due to lack of activity. Also, it seems there is an sbx-support branch, so these modifications should be taken there if necessary.