@@ -224,7 +224,7 @@ def _prep_recording(recording, plot=False):
224
224
"chunked_bin_size_s" : "estimate" ,
225
225
"log_scale" : True ,
226
226
"depth_smooth_um" : 10 ,
227
- "histogram_type" : "2Dy_x " , # "y_only", "2Dy_x", "2Dy_amplitude"" TOOD: better names!
227
+ "histogram_type" : "activity_1d " , # "y_only", "2Dy_x", "2Dy_amplitude"" TOOD: better names!
228
228
}
229
229
compute_alignment_kwargs = {
230
230
"num_shifts_block" : None , # TODO: can be in um so comaprable with window kwargs.
@@ -238,7 +238,7 @@ def _prep_recording(recording, plot=False):
238
238
"akima_interp_nonrigid" : False ,
239
239
}
240
240
non_rigid_window_kwargs = {
241
- "rigid" : True ,
241
+ "rigid" : False ,
242
242
"win_shape" : "gaussian" ,
243
243
"win_step_um" : 250 ,
244
244
"win_scale_um" : 250 ,
@@ -271,36 +271,37 @@ def _prep_recording(recording, plot=False):
271
271
compute_alignment_kwargs = compute_alignment_kwargs ,
272
272
)
273
273
274
- if False :
275
- plotting_session_alignment .SessionAlignmentWidget (
276
- recordings_list ,
277
- peaks_list ,
278
- peak_locations_list ,
279
- extra_info ["session_histogram_list" ],
280
- ** extra_info ["corrected" ],
281
- spatial_bin_centers = extra_info ["spatial_bin_centers" ],
282
- drift_raster_map_kwargs = {"clim" :(- 250 , 0 )} # TODO: option to fix this across recordings.
283
- )
284
274
285
- plt .show ()
275
+ plotting_session_alignment .SessionAlignmentWidget (
276
+ recordings_list ,
277
+ peaks_list ,
278
+ peak_locations_list ,
279
+ extra_info ["session_histogram_list" ],
280
+ ** extra_info ["corrected" ],
281
+ spatial_bin_centers = extra_info ["spatial_bin_centers" ],
282
+ drift_raster_map_kwargs = {"clim" :(- 250 , 0 )} # TODO: option to fix this across recordings.
283
+ )
284
+
285
+ plt .show ()
286
286
287
287
# TODO: estimate chunk size Hz needs to be scaled for time? is it not been done correctly?
288
288
289
289
# No, even two sessions is a mess
290
290
# TODO: working assumptions, maybe after rigid, make a template for nonrigid alignment
291
291
# as at the moment all nonrigid to eachother is a mess
292
- A = extra_info ["histogram_info_list" ][2 ]["chunked_histograms" ]
293
-
294
- mean_ = alignment_utils .get_chunked_hist_mean (A )
295
- median_ = alignment_utils .get_chunked_hist_median (A )
296
- supremum_ = alignment_utils .get_chunked_hist_supremum (A )
297
- poisson_ = alignment_utils .get_chunked_hist_poisson_estimate (A )
298
- eigenvector_ = alignment_utils .get_chunked_hist_eigenvector (A )
299
-
300
- plt .plot (mean_ )
301
- plt .plot (median_ )
302
- plt .plot (supremum_ )
303
- plt .plot (poisson_ )
304
- plt .plot (eigenvector_ )
305
- plt .legend (["mean" , "median" , "supremum" , "poisson" , "eigenvector" ])
306
- plt .show ()
292
+ if False :
293
+ A = extra_info ["histogram_info_list" ][2 ]["chunked_histograms" ]
294
+
295
+ mean_ = alignment_utils .get_chunked_hist_mean (A )
296
+ median_ = alignment_utils .get_chunked_hist_median (A )
297
+ supremum_ = alignment_utils .get_chunked_hist_supremum (A )
298
+ poisson_ = alignment_utils .get_chunked_hist_poisson_estimate (A )
299
+ eigenvector_ = alignment_utils .get_chunked_hist_eigenvector (A )
300
+
301
+ plt .plot (mean_ )
302
+ plt .plot (median_ )
303
+ plt .plot (supremum_ )
304
+ plt .plot (poisson_ )
305
+ plt .plot (eigenvector_ )
306
+ plt .legend (["mean" , "median" , "supremum" , "poisson" , "eigenvector" ])
307
+ plt .show ()
0 commit comments