Closed oterocoronel closed 4 months ago
Good suggestions. Because of the way the init_pass is structured right now, some are a little difficult to implement. I need to re-write init_pass on the GPU sometime soon, so I will keep these suggestions in mind.
In the meantime, a few hotfixes:
fix_shallow_plane_shift_estimates
to True. This sets any shifts on planes above fix_shallow_plane_shift_estimate_threshold
to 0 if they exceed the maximum shift computed on planes below the threshold. If the estimates for shallow planes are below the max values in the deeper planes, they are untouched. n_planes x 2
to manually set plane shifts for all planes. Note that if you set this, you need to re-run init_pass
because these estimates are used in init_pass to create templates for registration later.You can pull the dev branch now to get these updates, or you can wait till I have time to test all my recent changes and I'll merge to main.
this has been improved in the new initial pass
When some planes have very little signal, the lateral shift estimation across planes is usually off. This is an issue with the data, not suite3d, but I think it could be handled better if one could:
1) Crop the recording before doing any motion correction (e.g. after job.run_init_pass). If the signal is too low for calculating the lateral offset in the mean images, then you probably won't get many neurons from there and could avoid creating a volume that you know has the wrong offsets for alignments
2) Make the x-y offset values accessible to the user to do some kind of basic adjustment. I've seen that the x-y offsets for planes 15-22 are reliable, but for planes 22-30 are sometimes off, I would be curious if I just use a linear interpolation from 15-22 extended to planes 22-30 if I can get anything from there
I thought about this when I noticed that in one recording the lateral-shift estimation was ~300pix for X and Y in a bad plane, thus creating a massively large recording (went from 500x500pix to 800x800pix, which is 2.5x larger and mostly empty with nans) and the only thing I could do was crop it after doing motion correction through all the data
Somewhat related:
3) Could we do lateral offset estimation after doing motion correction? This could help increase the SNR of the mean frames that are used for the shift estimations and give better results.