Skip to content

How to pass var_name_hdf5 when running mcorr #197

@oterocoronel

Description

@oterocoronel

I have some .h5 files that have the data in a field named 'data'.
I have tried passing var_name_hdf5 = 'data' when adding an additional parameter like this:

df.caiman.add_item(
    algo='mcorr',
    input_movie_path=movie_path,
    params=mcorr_params1,
    item_name=movie_path.stem,  
    var_name_hdf5 = 'data'
) 

But when trying to actually run mcorr, it fails. The output is:

{'success': False,
 'traceback': 'Traceback (most recent call last):\n  File "/home/lab/.mambaforge/envs/mescore/lib/python3.10/site-packages/mesmerize_core/algorithms/mcorr.py", line 67, in run_algo\n    mc.motion_correct(save_movie=True)\n  File "/home/lab/.mambaforge/envs/mescore/lib/python3.10/site-packages/caiman/motion_correction.py", line 249, in motion_correct\n    mi = min(mi, next(iterator).min()[()])\n  File "/home/lab/.mambaforge/envs/mescore/lib/python3.10/site-packages/caiman/base/movies.py", line 2254, in load_iter\n    for y in Y:\nTypeError: \'NoneType\' object is not iterable\n'}

I suspect that the issue is that when trying to run MotionCorrection, it is only passing the motion parameters. This is easy to fix in CaImAn vanilla, because I can invoke it like this:

mc = MotionCorrect(fnames, dview=dview, var_name_hdf5='data', **opts.get_group('motion'))

Any suggestions? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions