Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Commit

Permalink
fix mcorr module projections bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalkolar committed May 5, 2021
1 parent 59449c7 commit 4768293
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mesmerize/viewer/modules/caiman_motion_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def view_output_projections(self):
)

self.nrows_projection_plots = ceil(len(self._projection_item_indices) / self.ncols_projection_plots)
self.ncols_projection_plots = min(len(self._projection_item_indices), 3)

self.plot_output_projections()

Expand All @@ -251,6 +252,9 @@ def plot_output_projections(self):
if not i < len(self._projection_item_indices):
break

if self.nrows_projection_plots == 1:
axes_ix = axes_ix[1]

index = self._projection_item_indices[i]
projection = self.currrent_projections[i]

Expand All @@ -271,6 +275,6 @@ def plot_output_projections(self):
self.projections_plot_widget.axs[axes_ix].set_title(index)
self.projections_plot_widget.axs[axes_ix].set_title(index)

self.projections_plot_widget.fig.tight_layout()
self.projections_plot_widget.draw()
self.projections_plot_widget.fig.tight_layout()
self.projections_plot_widget.show()

0 comments on commit 4768293

Please sign in to comment.