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

Pull changes from flatironinstitute and resolve merge conflicts #7

Merged
merged 642 commits into from
Jun 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
642 commits
Select commit Hold shift + click to select a range
1c056eb
Notebooks advice in readme: don't tell users to cd all the way into n…
pgunn Feb 9, 2024
80abf0e
notebooks: revise intent of diff to store images used by notebooks in…
pgunn Feb 9, 2024
b64a786
Move more images for notebooks
pgunn Feb 9, 2024
32250b2
Merge pull request #1270 from flatironinstitute/dev-notebooks_revert_…
pgunn Feb 14, 2024
b1f0ff3
Redoing the diff. Also removing an unused spatial function that calle…
pgunn Feb 14, 2024
bd4fe8c
More reimplementing into new diff
pgunn Feb 14, 2024
d550961
oasis.cpp got mistakenly added again. Removing it again
pgunn Feb 14, 2024
170dc21
merging.py
pgunn Feb 14, 2024
f1a4673
initialization.py convert from old diff; note local_nmf method goes a…
pgunn Feb 14, 2024
f84062c
estimates: going less ambitious with this one, for now
pgunn Feb 14, 2024
811593f
cnmf/cnmf port over the diffs
pgunn Feb 14, 2024
9a9134d
motion_correction: merge intents of diffs
pgunn Feb 14, 2024
bc2b2f6
components_evaluation
pgunn Feb 14, 2024
ccd9dd5
caiman/cluster.py
pgunn Feb 14, 2024
ccb6a70
base/traces: going less ambitious on this one for now
pgunn Feb 14, 2024
5cef076
base/rois.py: less ambitious for now
pgunn Feb 14, 2024
542ffeb
caiman.base.movies: imports
pgunn Feb 15, 2024
e1c3f92
"import caiman as cm" -> "import caiman"
pgunn Feb 15, 2024
acc394a
Remove ipython breakpoints, modernise some string interpolation, othe…
pgunn Feb 15, 2024
f2eed29
Fix a brain-o in an imports fix
pgunn Feb 15, 2024
a2baf62
import cleanup: fix "profile" decorator I accidentally removed, also …
pgunn Feb 15, 2024
ed63aab
import cleanup: fix another typo
pgunn Feb 15, 2024
c7925a9
import cleanup: more bug squashing
pgunn Feb 15, 2024
f7a559f
imports cleanup: another bug
pgunn Feb 15, 2024
887a054
import cleanup: more fixes until it passes testing locally
pgunn Feb 15, 2024
afa972b
import cleanup: for traces we'll go with absolute import to make it c…
pgunn Feb 15, 2024
b2a2ce0
import cleanup: cluster.py - removed some unneded imports, a bit more…
pgunn Feb 15, 2024
961676b
import cleanup: order of imports
pgunn Feb 15, 2024
7741c9f
import cleanup: caiman_datadir() is never going to be confusing
pgunn Feb 15, 2024
60c73cb
import cleanup: remove another relative import
pgunn Feb 15, 2024
b98db65
Remove cnmf_optional_outputs.py, code that was broken 8 years ago wit…
pgunn Feb 15, 2024
1cf9d71
Merge pull request #1277 from flatironinstitute/dev_no_relative_impor…
pgunn Feb 15, 2024
0ed8255
Sphinx-doc-fixes: Fix everything sphinx calls an error
pgunn Feb 16, 2024
fb3e752
docs: Overview.rst: remove outdated info
pgunn Feb 16, 2024
30aafba
Merge pull request #1279 from flatironinstitute/dev-fix_sphinx
pgunn Feb 16, 2024
4679246
docs_require needs ipywidgets
pgunn Feb 16, 2024
6eee03e
RTD: add zarr too
pgunn Feb 16, 2024
2155f6e
Switchover scipy.histogram() to numpy.histogram() to deal with scipy …
pgunn Feb 19, 2024
c043076
Adjust other scipy re-exports in stats
pgunn Feb 19, 2024
ca7012b
Merge pull request #1282 from flatironinstitute/dev-fix_scipy_histogr…
pgunn Feb 19, 2024
77ca518
Pull more docs into the sphinx doctree, fix some formatting issues an…
pgunn Feb 20, 2024
489fddb
docs/sphinx - fix readme-gpu so its headers are appropriately summarised
pgunn Feb 20, 2024
0297127
Sphinx/docs: Change formatting of file formats doc to ensure it parses
pgunn Feb 20, 2024
729b984
sphinx/links-and-formatting fixup More touch-ups to docs, also remove…
pgunn Feb 21, 2024
8126b8a
handle problems that can come up with auto-percentile calculations fo…
EricThomson Feb 21, 2024
dc8237c
updated based on review
EricThomson Feb 22, 2024
a9d598c
Merge pull request #1286 from flatironinstitute/dev-sphinx_and_markdo…
pgunn Feb 22, 2024
20da024
Merge pull request #1288 from flatironinstitute/dff_inception_debug
pgunn Feb 22, 2024
790b251
updated logo!
EricThomson Feb 22, 2024
77dfb23
Merge pull request #1289 from flatironinstitute/logo_update
pgunn Feb 22, 2024
59b6c22
Move and rephrase info on caiman central
pgunn Feb 22, 2024
09081ab
Readme: change section header
pgunn Feb 22, 2024
8589406
Merge pull request #1290 from flatironinstitute/dev-README_centralise…
pgunn Feb 22, 2024
8c237fb
Merge pull request #1292 from flatironinstitute/dev
pgunn Feb 23, 2024
a53973a
VERSION: 1.10.4 postrelease
pgunn Feb 23, 2024
cb6ed96
VERSION: 1.10.4 postrelease
pgunn Feb 23, 2024
d618202
CNMFParams: nb parameter isn't actually used outside of the version i…
pgunn Feb 27, 2024
bfc69dc
CNMFParams: Update docs to note nb removed from temporal/spatial
pgunn Feb 27, 2024
70d14d3
Merge pull request #1239 from flatironinstitute/dev-cnmfparams_json
pgunn Feb 27, 2024
906d9ee
Revert "CNMFParams: nb parameter isn't actually used outside of the v…
pgunn Feb 28, 2024
4232266
Revert "CNMFParams: Update docs to note nb removed from temporal/spat…
pgunn Feb 28, 2024
f64a6f8
Hotfix: cnmfparams json load
pgunn Feb 28, 2024
9a40444
Fix issue with dev release and last refactor of pathing
pgunn Mar 4, 2024
e27ead4
Fix issue with dev release and last refactor of pathing
pgunn Mar 4, 2024
9f26fc6
Fix typo
pgunn Jan 31, 2024
83ce6ce
VERSION: post release to 1.10.5
pgunn Mar 5, 2024
5985b28
VERSION: Post release to 1.10.5
pgunn Mar 5, 2024
7f77af9
Update scanbox functions for new file format & features
ethanbb Mar 11, 2024
20e6a0f
Return dxy in metadata and fix subindices case
ethanbb Mar 12, 2024
c12fa7a
Backporting bugfix for recent CNMF refactor
pgunn Mar 19, 2024
da257a0
updated discussion of memory optimizations
EricThomson Mar 19, 2024
c3b7342
Merge pull request #1300 from flatironinstitute/optimization_update
EricThomson Mar 19, 2024
d43033a
updated contributors doc
EricThomson Mar 19, 2024
083fb67
fixed words and formatting
EricThomson Mar 19, 2024
54915d3
Merge pull request #1301 from flatironinstitute/contrib_doc_update
pgunn Mar 20, 2024
8ecbe6d
removed pylab from motion_correction.py
EricThomson Mar 21, 2024
479649b
removed pylab from movies
EricThomson Mar 21, 2024
6091fd7
remove pylab from timeseries.py
EricThomson Mar 21, 2024
6b6db3a
remove pylab from traces.py
EricThomson Mar 21, 2024
79e36c1
remove pylab from behavior.py
EricThomson Mar 21, 2024
c69ae4b
remove pylab from utilities.py
EricThomson Mar 21, 2024
a419cb0
remove pylab from comparison_humans.py
EricThomson Mar 21, 2024
39f5eff
correct import order
EricThomson Mar 21, 2024
c461a3b
remove pylab from demo_behavior.py
EricThomson Mar 21, 2024
788a636
pylab removed from visualization.py
EricThomson Mar 21, 2024
08eec02
changed pylab to pyplot back end
EricThomson Mar 21, 2024
8eb8d05
correct problem changing loaded params
EricThomson Mar 22, 2024
0629765
handle grey_dilation import update
EricThomson Mar 22, 2024
fa38f06
get_colormap api updated before deprecation
EricThomson Mar 22, 2024
bc06acf
Add utils for converting SBX files to numpy format (and put updated s…
ethanbb Mar 27, 2024
1e04e69
Switch sbx destination format from npy to tif
ethanbb Mar 28, 2024
2fc7676
Support multidimensional subindices and add tests
ethanbb Mar 29, 2024
300fd3d
Merge branch 'dev' of https://github.com/flatironinstitute/CaImAn int…
ethanbb Mar 29, 2024
ec9ca6e
Alphebatize imports and use splitext
ethanbb Mar 29, 2024
16cb274
Merge pull request #1311 from proektlab/sbxload-update
pgunn Mar 29, 2024
0dbf510
Github/CI: Add sudo install of Ubuntu packages to hopefully meet open…
pgunn Mar 29, 2024
ae20ae2
Merge pull request #1313 from flatironinstitute/dev-test_ci_fixes
pgunn Mar 29, 2024
6aedb79
Fix invalid indexing for python <3.11
ethanbb Mar 29, 2024
d67ebed
Remove pipe syntax for type unions
ethanbb Mar 29, 2024
a93098d
Merge pull request #1314 from proektlab/sbxload-update
pgunn Mar 29, 2024
f74ff1b
README: Fix minor spacing issue with Johannes's institution in credits
pgunn Mar 29, 2024
ff7fcce
CNMFParams: init.nb is now the authoritative nb, until a major future…
pgunn Feb 28, 2024
6963cbc
CNMFParams: Add note discouraging use of the set() method
pgunn Feb 29, 2024
a422f0c
CNMFParams: only nag people once for deprecation
pgunn Mar 29, 2024
f9fa592
Merge pull request #1315 from flatironinstitute/dev-cnmfparams_nag_less
pgunn Mar 29, 2024
ace51be
Prevent interpretation as RGB; add option to make 2D by extracting a …
ethanbb Mar 31, 2024
f29731e
Merge pull request #1302 from flatironinstitute/remove_pylab
EricThomson Mar 31, 2024
b6e28c6
added explicit check for byte encoding
EricThomson Mar 31, 2024
97107ed
Merge pull request #1306 from flatironinstitute/handle_upcoming_depre…
EricThomson Mar 31, 2024
0452184
Merge pull request #1305 from flatironinstitute/fix_reload_typing
EricThomson Mar 31, 2024
6a9d3d3
Change keep3d argument to plane, and add tests for this and photometric
ethanbb Apr 1, 2024
f8a8102
Merge pull request #1316 from proektlab/sbxload-update
pgunn Apr 1, 2024
98ef067
Fix SBX functions for older tifffile versions and Windows (close mmap…
ethanbb Apr 1, 2024
66e2bcf
Followup to SBX work: fix setup.py
pgunn Apr 2, 2024
6470495
Merge pull request #1318 from flatironinstitute/dev
pgunn Apr 2, 2024
9681c64
VERSION to 1.10.6 after release: main branch
pgunn Apr 2, 2024
df51241
VERSION: post-release to 1.10.6
pgunn Apr 2, 2024
fe3f84f
test_sbx: Use distinct tiff files and don't clean them up afterwards,…
pgunn Apr 3, 2024
b312f10
test_sbx: fix assert
pgunn Apr 3, 2024
a25dccb
Merge pull request #1320 from flatironinstitute/dev
pgunn Apr 3, 2024
3cf859e
VERSION to 1.10.7 after release
pgunn Apr 3, 2024
8dac5d6
VERSION to 1.10.7 after release
pgunn Apr 3, 2024
269803b
Caiman: test_sbx remove try/except so we get better failures
pgunn Apr 3, 2024
f6183bc
Merge pull request #1321 from flatironinstitute/dev
pgunn Apr 3, 2024
d5cc466
VERSION to 1.10.8 after release
pgunn Apr 3, 2024
3f2f6a1
VERSION to 1.10.8 after release
pgunn Apr 3, 2024
2f44aa5
caiman.utils.sbx_utils.sbx_chain_to_tif(): remove mode flag to tiffil…
pgunn Apr 3, 2024
1d6ee38
VERSION to 1.10.9 post release
pgunn Apr 3, 2024
d536a13
VERSION to 1.10.9 post release
pgunn Apr 3, 2024
be40cbb
Fix typo
pgunn Apr 3, 2024
b9c4a2a
Merge pull request #1322 from flatironinstitute/dev
pgunn Apr 3, 2024
9ea86c7
VERSION: 1.10.10 post-release
pgunn Apr 3, 2024
a5de8bf
VERSION: 1.10.10 post-release
pgunn Apr 3, 2024
0fec0b0
Extensions starts with a dot
marberi Apr 8, 2024
4a08717
Use memmap to load only indexed parts of files
ethanbb Apr 10, 2024
163022f
Simplify by using the same loading code for all time index types
ethanbb Apr 10, 2024
20bb8ab
Merge branch 'dev' of https://github.com/flatironinstitute/CaImAn int…
ethanbb Apr 10, 2024
2647b59
Revert tifffile write to what is in dev since it works
ethanbb Apr 11, 2024
f5d5295
Merge pull request #1326 from marberi/dev
pgunn Apr 11, 2024
c75a4f8
Use del to close memmaps rather than _mmap; reduce code duplication
ethanbb Apr 12, 2024
6c836c0
Add comment about not viewing memmap and rename Ns
ethanbb Apr 12, 2024
69772e3
Merge pull request #1329 from proektlab/sbxload-update
pgunn Apr 12, 2024
149d624
Trying out a refactor of the basic demo to be less notebook-y, more a…
pgunn Oct 25, 2023
cd64806
note on single_thread
pgunn Oct 25, 2023
4592b43
demos get a readme (that caimanmanager will deliver, so it needs to b…
pgunn Oct 27, 2023
e17931b
Demos readme: format it a little more nicely
pgunn Oct 27, 2023
f30b975
Smaller cleanups, move logger setup into main(), preparing this to be…
pgunn Nov 3, 2023
fab66bc
bringing demo_pipeline and demo_caiman_basic closer together as I ref…
pgunn Nov 3, 2023
4ff7854
CLI Demos: Finish re-syncing demo_caiman_basic and demo_pipeline
pgunn Nov 3, 2023
46a15dd
Rebasing
pgunn Nov 3, 2023
9b56d85
Work on converting more CLI demos
pgunn Nov 3, 2023
1315b9a
cli_demos work: convert more, regularise more
pgunn Nov 15, 2023
2859174
cli_demos: Initial conversion of demo_pipeline_cnmfE to "app"
pgunn Nov 15, 2023
38436e1
cli demos: convert demo_pipeline_voltage_imaging to "app"
pgunn Nov 15, 2023
b882ddd
rebasing
pgunn Nov 16, 2023
21eb57f
cli demos: make amount of parallelism in the backend a CLI parameter
pgunn Nov 16, 2023
7ee20e1
demo_OnACID CLI: Use the new CNMFParams JSON API to let people specif…
pgunn Feb 28, 2024
2ffe070
CLI demo_caiman_basic.py: only set params once
pgunn Feb 28, 2024
860ea9f
demo_caiman_basic CLI demo: move to json config files, only provide o…
pgunn Feb 28, 2024
5a98259
Demos/jsonconfigs: Fix misuse of params api
pgunn Feb 29, 2024
3862d71
Revise the three CLI demos that have been refactored to do argument/f…
pgunn Mar 1, 2024
994773b
Demo revisions: remove inline parameters
pgunn Mar 1, 2024
13b2730
demos_refactor: demo_onacid file load fix
pgunn Mar 8, 2024
32a6428
demos_refactor: demo_pipeline rework to use json
pgunn Mar 8, 2024
fa065d6
demo_pipeline_NWB conversion work
pgunn Mar 12, 2024
7cfc771
cli demos json format fix whoops
pgunn Mar 12, 2024
01362a7
demos refactor: fixing demos as testing
pgunn Mar 13, 2024
d04b012
demos_refactor: params files should not try to set quality.decay_time…
pgunn Mar 13, 2024
29dcdcf
CLI demos rework: fix demo_onacid_mesoscope's visualisation defaults,…
pgunn Mar 14, 2024
2f6291e
demo_behaviour:rebasing
pgunn Apr 16, 2024
a6bfde2
demo refactor: demo_pipeline_voltage_imaging: make method a commandli…
pgunn Mar 14, 2024
c27f1a0
demos_refactor: volpy demo import tweaks
pgunn Mar 15, 2024
ad2533a
CNMF: Fix some issues from recent CNMFParams refactor
pgunn Mar 15, 2024
896389a
demo_pipeline_cnmfE.py: ready for testing
pgunn Apr 12, 2024
1dd6e2a
remove param temporal.memory_efficient which doesn't seem to do anything
pgunn Apr 12, 2024
28606d4
Params: Remove doc for temporal.memory_efficient which was documented…
pgunn Apr 12, 2024
d607a7c
CNMFParams: Remove documented but never-implemented data.mmap_C and d…
pgunn Apr 12, 2024
0c00f4c
Fix bug from 2019 with #030bc6d35
pgunn Apr 16, 2024
bc95a7f
CNMF: "is True" -> ""
pgunn Apr 16, 2024
dbd8e50
Remove spatial.block_size_spat
pgunn Apr 16, 2024
378b732
Remove merging.max_merge_area
pgunn Apr 16, 2024
f8f924b
demo_behavior: more rebase nonsense
pgunn Apr 16, 2024
8f296f6
demo_behavior: rebase nonsense
pgunn Apr 16, 2024
d87162f
After rebase, add demo_behavior back in
pgunn Apr 16, 2024
9c36719
CLI demo refactor: forgot to import os
pgunn Apr 18, 2024
126ca4a
CLI demos refactor: demo_pipeline_cnmfE: Fix a mistake in move to params
pgunn Apr 18, 2024
b607769
Fix paths for more temporary files over a run to land in caiman_data/…
pgunn Apr 18, 2024
97451ba
Adjust gating, path handling to try harder not to drop temporary file…
pgunn Apr 19, 2024
3ed88c7
Note in docs that caiman.movie.save() returns the filename. Fix a tes…
pgunn Apr 19, 2024
66ede97
Movie.save(): Always return filename (before it only did it for some …
pgunn Apr 19, 2024
f78791c
environment.yml: be smarter about alternate builds of conda, set chan…
pgunn Apr 23, 2024
7d5824d
environment.yml: can't actually set channel priority in environment.yml
pgunn Apr 24, 2024
53ea964
Try adjusting CI to use environment-minimal.yml
pgunn Apr 24, 2024
8b177d5
minimal environment needs a few more things
pgunn Apr 24, 2024
701c9af
environment-minimal hasn't seen enough testing over the years.
pgunn Apr 24, 2024
5082983
If we're to use environment-minimal for CI we need to include nose
pgunn Apr 24, 2024
b6e67c5
prevent old numpy breaking typing
pgunn Apr 24, 2024
0b81678
yaml: Prevent old versions of numpy and associated problems
pgunn Apr 24, 2024
14af8d5
CI's way of managing updating the test environment means lots of mini…
pgunn Apr 24, 2024
aabb25d
Merge pull request #1334 from flatironinstitute/dev-environment_rework
pgunn Apr 24, 2024
73d5721
Hotfix: Fix issue in demo_caiman_cnmf_3D from a past refactor to visu…
pgunn Apr 24, 2024
fd24f25
cherry-pick 73d572
pgunn Apr 24, 2024
41cd982
params: better handle if user provides ring_CNN (compensating for a m…
pgunn Apr 26, 2024
75c95b2
params: better handle if user provides ring_CNN (compensating for a m…
pgunn Apr 26, 2024
c45b9aa
Fix goof in last hotfix to CNMFParams
pgunn Apr 26, 2024
9ea5587
Fix goof in last hotfix to CNMFParams
pgunn Apr 26, 2024
b8e97f8
Remove (broken) support for the old non-hdf5 format of .mat files
pgunn Apr 26, 2024
fafffce
.mat files: give users better messages if they try to open a v1 file
pgunn Apr 26, 2024
2581815
mat file revamp: Use consistent phrasing
pgunn Apr 26, 2024
29a3a67
Update docs on mat file support
pgunn Apr 26, 2024
df5b487
Merge pull request #1337 from flatironinstitute/dev-fix_mat_support
pgunn Apr 26, 2024
7943ede
CNMFParams: remove some dead code (really just a commit to make CI ru…
pgunn Apr 30, 2024
ac1e2aa
CLI OnACID demos: correctly handle display of results
pgunn Apr 30, 2024
0fa78a3
CLI demo pipeline: get rid of qt errors
pgunn Apr 30, 2024
a5886c4
Add note to demo_behaviour that it needs a qt6 build of opencv
pgunn Apr 30, 2024
fe1ad0c
demo_behavior and caiman.behavior.behavior: fix ancient calls
pgunn Apr 30, 2024
0c80201
CLI demo: fix demo_behavior
pgunn Apr 30, 2024
862dba8
Remove caiman.base.movies.online_NMF() which is unused (and needs the…
pgunn May 1, 2024
887e99e
caiman.behavior.extract_components(): remove method_factorization of …
pgunn May 1, 2024
b45633a
Add note about commandline demos to the main README
pgunn May 1, 2024
6581329
Merge pull request #1211 from flatironinstitute/cli_demos_refactor
pgunn May 1, 2024
8e9ad9f
caimanmanager: don't copy __pycache__ dirs out of the library bundle
pgunn May 1, 2024
29743f0
Merge pull request #1341 from flatironinstitute/dev-fix_pycache_creation
pgunn May 1, 2024
63c1932
VERSION: next release will be 1.11.0
pgunn May 3, 2024
59708bd
VERSION: next release will be 1.11.0
pgunn May 3, 2024
a30d1b1
Merge pull request #1342 from flatironinstitute/dev
pgunn May 3, 2024
f070226
VERSION to 1.11.1 after release
pgunn May 3, 2024
7174b3b
VERSION to 1.11.1 after release
pgunn May 3, 2024
084e44a
See if updating to latest github actions for CI is easy (maybe will f…
pgunn May 3, 2024
dea8431
Fix code goof that a random bot found #1345
pgunn May 7, 2024
aa65ab3
Fix map_async call on DirectView causing error
ethanbb May 12, 2024
50fafa3
Merge pull request #1350 from proektlab/ipp-async-fix
pgunn May 12, 2024
dbd27db
Clean up special cases for loading from HDF5 and fix None handling
ethanbb May 16, 2024
09a8a02
Fix invalid comparison for non-scalars
ethanbb May 16, 2024
1624347
Merge pull request #1353 from proektlab/none-load-fix
pgunn May 16, 2024
ae1fe4e
Pin tensorflow below 2.16, address #1355
pgunn May 31, 2024
7826015
Merge branch 'master' of https://github.com/datajoint/CaImAn
kushalbakshi May 31, 2024
9f95676
Merge branch 'main' of https://github.com/flatironinstitute/CaImAn
kushalbakshi May 31, 2024
97b1784
Update(motion_correction.py): Remove unused imports
kushalbakshi May 31, 2024
b506e02
caimanmanager: Detect and adjust behaviour for editable installs
pgunn May 31, 2024
be70e72
Improve messaging around editable installs
pgunn May 31, 2024
1ca3152
Fix(mmapping.py): Tuple -> tuple case-match
kushalbakshi May 31, 2024
d0a5eb3
chdir for the user if needed
pgunn May 31, 2024
ddca982
caimanmanager: "is None" still can't be used on a variable if it was …
pgunn May 31, 2024
2c890ca
Merge pull request #1357 from flatironinstitute/dev-caimanmanager_det…
pgunn May 31, 2024
e970637
Merge pull request #1358 from flatironinstitute/dev
pgunn May 31, 2024
e7e8641
VERSION to 1.11.2 after release
pgunn May 31, 2024
fb87e6b
Merge branch 'main' of https://github.com/flatironinstitute/CaImAn
kushalbakshi Jun 3, 2024
6ecc83a
Add `output_dir` argument to `motion_correct_batch_rigid()`
kushalbakshi Jun 3, 2024
4e9394a
Fix(motion_correction.py): update `old_div()` to division operator
kushalbakshi Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.mat files: give users better messages if they try to open a v1 file
  • Loading branch information
pgunn committed Apr 26, 2024
commit fafffce77802c63d473f7329f4e0369fb764c28c
24 changes: 21 additions & 3 deletions caiman/base/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,13 @@ def load(file_name: Union[str, list[str]],
if extension in ('n5', 'zarr'): # Thankfully, the zarr library lines up closely with h5py past the initial open
f = zarr.open(file_name, "r")
else:
f = h5py.File(file_name, "r")
try:
f = h5py.File(file_name, "r")
except:
if extension == '.mat':
raise Exception(f"Problem loading {file_name}: Unknown format. This may be in the original version 1 (non-hdf5) mat format; please convert it first")
else:
raise Exception(f"Problem in loading {file_name}: Unknown format.")
ignore_keys = ['__DATA_TYPES__'] # Known metadata that tools provide, add to this as needed. Sync with get_file_size() !!
fkeys = list(filter(lambda x: x not in ignore_keys, f.keys()))
if len(fkeys) == 1: # If the file we're parsing has only one dataset inside it,
Expand Down Expand Up @@ -1939,7 +1945,13 @@ def load_iter(file_name: Union[str, list[str]], subindices=None, var_name_hdf5:
if extension in ('.n5', '.zarr'): # Thankfully, the zarr library lines up closely with h5py past the initial open
f = zarr.open(file_name, "r")
else:
f = h5py.File(file_name, "r")
try:
f = h5py.File(file_name, "r")
except:
if extension == '.mat':
raise Exception(f"Problem loading {file_name}: Unknown format. This may be in the original version 1 (non-hdf5) mat format; please convert it first")
else:
raise Exception(f"Problem in loading {file_name}: Unknown format.")
ignore_keys = ['__DATA_TYPES__'] # Known metadata that tools provide, add to this as needed.
fkeys = list(filter(lambda x: x not in ignore_keys, f.keys()))
if len(fkeys) == 1: # If the hdf5 file we're parsing has only one dataset inside it,
Expand Down Expand Up @@ -2027,7 +2039,13 @@ def get_file_size(file_name, var_name_hdf5:str='mov') -> tuple[tuple, Union[int,
if extension in ('n5', 'zarr'): # Thankfully, the zarr library lines up closely with h5py past the initial open
f = zarr.open(file_name, "r")
else:
f = h5py.File(file_name, "r")
try:
f = h5py.File(file_name, "r")
except:
if extension == '.mat':
raise Exception(f"Problem loading {file_name}: Unknown format. This may be in the original version 1 (non-hdf5) mat format; please convert it first")
else:
raise Exception(f"Problem in loading {file_name}: Unknown format.")
ignore_keys = ['__DATA_TYPES__'] # Known metadata that tools provide, add to this as needed. Sync with movies.my:load() !!
kk = list(filter(lambda x: x not in ignore_keys, f.keys()))
if len(kk) == 1: # TODO: Consider recursing into a group to find a dataset
Expand Down