Issues motion correction #220
Unanswered
AnneHstudent
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am new to Minian (and to analyzing data or using python), and am struggling with the motion correction for Purkinje Cell imaging data. The input movie consists of many short recordings in a row, pasted next to each other and so creating a video of 3-4 minutes. If the last frame in a chunk of recordings has one large active cell and then switches to the next frame, in a new chunk of recordings where another cell is active, the default motion correction thinks this is the same cell, creating false motion correction and huge jumps and overlapping. I think motion correction has issues because the cell size is so big and not many cells are active.
I tried to fix the problem in multiple ways:
The method that worked best was trying the experimental non-rigid motion correction:
I added
get_mesh_size(varr_ref.sel(subset_mc)
to get a proper mesh size. Then I added:
%%time motion = estimate_motion(varr_ref.sel(subset_mc), mesh_size=[61, 2], alt_error=2, **param_estimate_motion)
This created quite an OK motion correction, at least the big jumps and overlapping didn't occur anymore. The problem is that it took a long time (several hours) to save the motion, where the default only took a few seconds/minutes, and thus is not ideal. I also am not positive if I took all the steps correctly to change the motion correction from rigid to non-rigid, or if I missed something crucial.
I have also tried to move the motion correction up in the pipeline, before the glow removal step, but something seems to go wrong in the steps after the motion correction and seed initialization isn't done properly (whole image covered with seeds despite correct parameters). I'm not sure why this doesn't work the way it should.
I also tried to only add and lower
alt_error
to 2. This didn't do anything to the jumps and overlapping the motion correction.I have also tried to fully skip the motion correction, but then initialization steps will give an error because
Y_fm_chk
is not defined, and I am not sure how to work around this.Anyone an idea of how to tackle this problem? Is the approach of non-rigid motion correction the best approach or can I still change something? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions