CaImAn icon indicating copy to clipboard operation
CaImAn copied to clipboard

Build in motion correction on subset of movie (temporal crop)

Open EricThomson opened this issue 1 year ago • 0 comments

Would be good for speedy parameter search for motion correction. Currently, the motion correction object takes in a filename and parameter set. There is no easy way to specify a temporal crop. A couple of things would be good:

  • You can specify a spatial crop using the indices param. We should document this a bit better in the demo(s).
  • There is no natural way to specify a subset of frames at the top level. Add a parameter for this, or just expand indices to include time as well as space.

In the lower-level functions that implement motion correction, there seems to be a subidx argument built in, at least in some functions, that was meant to do this. It was never exposed at the top level, but this does suggest there does already seem a mechanism to do what I'm suggesting. Hence, there's a chance it won't be that hard to get the temporal "crop" implemented.

Saved memmapped results would then be cropped, so we would have to warn users, or handle it somehow: this would be a data altering step. My thought is this would be helpful for people to more quickly find good parameters on a minimal movie, then people could go and run motion correction on the full movie.

EricThomson avatar Jun 08 '23 12:06 EricThomson