From 392de92c2d2bb1676aa7bd2322cba6a006ac7824 Mon Sep 17 00:00:00 2001 From: Rohan Dhall Date: Thu, 4 Sep 2025 15:15:55 -0700 Subject: [PATCH] Fixes bug when displaying movies. Transposes movie data before display in pyqtgraph. --- TemDataBrowser/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TemDataBrowser/__init__.py b/TemDataBrowser/__init__.py index ed86258..101369e 100644 --- a/TemDataBrowser/__init__.py +++ b/TemDataBrowser/__init__.py @@ -105,6 +105,10 @@ def on_change_data_filename(self, fname): elif self.data.ndim > 4: print(f'{self.data.ndim}-D data files are not supported.') + #if movie data (3D), pyqtgraph expects axis order of (index, x, y) + if self.data.ndim == 3: + self.data = self.data.transpose() + xscale = file['pixelSize'][-2] yscale = file['pixelSize'][-1] self.imview.setImage(self.data)