---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[10], line 1
----> 1 scan.get_plot_axis("signal")
File /dls_sw/apps/mmg_toolbox/latest/mmg_toolbox/mmg_toolbox/nexus/nexus_scan.py:242, in NexusScan.get_plot_axis(self, axis_name, reduce_shape, flatten)
230 """
231 Return plot axis data and label for given axis name
232
(...)
239 :return: (data, label) tuple
240 """
241 with self.load_hdf() as hdf:
--> 242 return self._get_plot_axis(hdf, axis_name, reduce_shape=reduce_shape, flatten=flatten)
File /dls_sw/apps/mmg_toolbox/latest/mmg_toolbox/mmg_toolbox/nexus/nexus_scan.py:224, in NexusScan._get_plot_axis(self, hdf, axis_name, reduce_shape, flatten)
222 data = np.sum(data, axis=(-1, -2))
223 if np.shape(data) != shape:
--> 224 raise ValueError(f"2+D Arrays must have same shape: {axis_name}{np.shape(data)} != {shape}")
225 if flatten:
226 data = np.reshape(data, -1)
ValueError: 2+D Arrays must have same shape: signal(512, 512) != (1,)
Example file:
/dls/i06/data/2026/cm44142-2/i06-369302.nxsCurrently scan.get_plot_data fails when reading: