Skip to content

Commit

Permalink
Merge branch 'wheel_alignment' into mesoscopeBrainLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
mayofaulkner committed Oct 11, 2023
2 parents 32df145 + 10007ec commit 312681b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ibllib/io/extractors/video_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ def process(self):
wg = WindowGenerator(all_me.size - 1, int(self.camera_meta['fps'] * self.twin),
int(self.camera_meta['fps'] * toverlap))

out = Parallel(n_jobs=self.nprocess)(delayed(self.compute_shifts)(times, all_me, first, last, iw, wg)
out = Parallel(n_jobs=4)(delayed(self.compute_shifts)(times, all_me, first, last, iw, wg)
for iw, (first, last) in enumerate(wg.firstlast))

self.shifts = np.array([])
Expand All @@ -903,11 +903,13 @@ def process(self):

if self.upload:
fig = self.plot_with_behavior() if self.behavior else self.plot_without_behavior()
save_fig_path = Path(self.session_path.joinpath('snapshot', 'video', 'video_wheel_alignment.png'))
save_fig_path = Path(self.session_path.joinpath('snapshot', 'video',
f'video_wheel_alignment_{self.label}.png'))
save_fig_path.parent.mkdir(exist_ok=True, parents=True)
fig.savefig(save_fig_path)
snp = ReportSnapshot(self.session_path, self.eid, content_type='session', one=self.one)
snp.outputs = [save_fig_path]
snp.register_images(widths=['orig'])
plt.close(fig)

return self.new_times

0 comments on commit 312681b

Please sign in to comment.