How the ophys pipeline differs from / adds to Suite2p
Default is nonrigid MC, but rigid performed better on the data Johannes looked at
Constructs its own reference image (pad with NaNs, apply shifts to copy of the data)
Detect empty frames at the beginning and end
Can optimize MC params (smooth_sigma and smooth_sigma_time)
Clips offset outliers, but only for non-rigid transform
Creates summary images and video for QC
Notes 6/27:
some parameter is set to 0 by default, found that a different value was better for SSF data, but currently for learning mFISH it is set to 0
some exploration on params for nonrigid motion has been done, testing block sizes, max_nr_shift
lowest block sizes caused a lot of noise, something bigger than 8 was good-ish
lack of confidence in outcome measures - accutance or something similar would help, but s2p is introducing some blurriness so maybe this isn't the best?
Johnannes ran most up to date version of s2P with default params and compared with Arielle's motion correction capsule (with nonrigid motion) and the results were virtually identifcal, indicating that whatever changes have happened to s2p in between the ophys_etl version and current s2p version have not affected the motion correction results
Notes 7/12:
Timing of the pipeline (updated to use suite2p 0.13.1) for nonrigid MC (data size 42829x512x512)
INFO:Suite2PRegistration: RUNTIME. Total: 293.2868402004242. auto_remove_empty_frames: 292.33686995506287
INFO:Suite2PRegistration: RUNTIME. Total: 789.8589227199554. refImg: 496.5720205307007
INFO:Suite2PWrapper: RUNTIME. Total: 1936.8091781139374. register: 1146.950094461441. <- That’s about 7 mins faster due to newer Suite2p v0.13.1
INFO:Suite2PRegistration: RUNTIME. Total: 1936.911880016327. clipping: 0.06454992294311523
INFO:Suite2PRegistration: RUNTIME. Total: 2049.1889264583588. tiffs->hdf5: 112.27701616287231
INFO:Suite2PRegistration: RUNTIME. Total: 2061.2726607322693. save_projections: 12.083706378936768
INFO:Suite2PRegistration: RUNTIME. Total: 2091.096650838852. save_shifts: 29.823959350585938
INFO:RegistrationQC: RUNTIME. Total: 2666.117187976837. RegistrationQC: 575.0204970836639
Ophys pipeline spends quite a bit of time creating the reference image, using 5000 frames instead of Suite2p’s default 300.
Ophys pipeline creates motion-corrected data 3 times: mem-map, tiffs, h5. TODO: Create h5 (or zarr) directly from suite2p’s mem-map.
Ophys pipeline calculates Suite2p’s registration metrics, but throws them away. TODO: keep them
Is there a good reason to store the shifts aka offsets as CVS instead of including in the h5 as is done with the refImg?
How the ophys pipeline differs from / adds to Suite2p
Notes 6/27:
some parameter is set to 0 by default, found that a different value was better for SSF data, but currently for learning mFISH it is set to 0
some exploration on params for nonrigid motion has been done, testing block sizes, max_nr_shift
lowest block sizes caused a lot of noise, something bigger than 8 was good-ish
lack of confidence in outcome measures - accutance or something similar would help, but s2p is introducing some blurriness so maybe this isn't the best?
Johnannes ran most up to date version of s2P with default params and compared with Arielle's motion correction capsule (with nonrigid motion) and the results were virtually identifcal, indicating that whatever changes have happened to s2p in between the ophys_etl version and current s2p version have not affected the motion correction results
Notes 7/12: Timing of the pipeline (updated to use suite2p 0.13.1) for nonrigid MC (data size 42829x512x512) INFO:Suite2PRegistration: RUNTIME. Total: 293.2868402004242. auto_remove_empty_frames: 292.33686995506287 INFO:Suite2PRegistration: RUNTIME. Total: 789.8589227199554. refImg: 496.5720205307007 INFO:Suite2PWrapper: RUNTIME. Total: 1936.8091781139374. register: 1146.950094461441. <- That’s about 7 mins faster due to newer Suite2p v0.13.1 INFO:Suite2PRegistration: RUNTIME. Total: 1936.911880016327. clipping: 0.06454992294311523 INFO:Suite2PRegistration: RUNTIME. Total: 2049.1889264583588. tiffs->hdf5: 112.27701616287231 INFO:Suite2PRegistration: RUNTIME. Total: 2061.2726607322693. save_projections: 12.083706378936768 INFO:Suite2PRegistration: RUNTIME. Total: 2091.096650838852. save_shifts: 29.823959350585938 INFO:RegistrationQC: RUNTIME. Total: 2666.117187976837. RegistrationQC: 575.0204970836639