CCampJr / CRIkit2

CRIKit2 is a hyperspectral imaging toolkit formerly known as the coherent Raman imaging toolkit.
Other
18 stars 11 forks source link

Occassionally, ROI spectrum crashes with x- and y- length error #17

Closed CCampJr closed 6 years ago

CCampJr commented 7 years ago

File "c:\users\chc\documents\python\crikit2\crikit\CRIkitUI.py", line 1240, in lambda event: self._roiClick(event, self._roiSpectrumPlot)) File "c:\users\chc\documents\python\crikit2\crikit\CRIkitUI.py", line 1410, in _roiClick pass_fcn((self.x_loc_list, self.y_loc_list)) File "c:\users\chc\documents\python\crikit2\crikit\CRIkitUI.py", line 1339, in _roiSpectrumPlot self.plotter.plot(self.hsi.f, spectrum, label=label_plot, meta=meta) File "c:\users\chc\documents\python\sciplot_pyqt5\sciplot\sciplotUI.py", line 535, in plot plot_data.mplobj = self.mpl_widget.ax.plot(x, y, label=label, **kwargs) File "C:\Users\chc\Documents\Python\WinPython-64bit-3.5.2.1Qt5\python-3.5.2.amd64\lib\site-packages\matplotlib\init__.py" , line 1819, in inner return func(ax, *args, *kwargs) File "C:\Users\chc\Documents\Python\WinPython-64bit-3.5.2.1Qt5\python-3.5.2.amd64\lib\site-packages\matplotlib\axes_axes.p y", line 1382, in plot for line in self._get_lines(args, **kwargs): File "C:\Users\chc\Documents\Python\WinPython-64bit-3.5.2.1Qt5\python-3.5.2.amd64\lib\site-packages\matplotlib\axes_base.p y", line 381, in _grab_next_args for seg in self._plot_args(remaining, kwargs): File "C:\Users\chc\Documents\Python\WinPython-64bit-3.5.2.1Qt5\python-3.5.2.amd64\lib\site-packages\matplotlib\axes_base.p y", line 359, in _plot_args x, y = self._xy_from_xy(x, y) File "C:\Users\chc\Documents\Python\WinPython-64bit-3.5.2.1Qt5\python-3.5.2.amd64\lib\site-packages\matplotlib\axes_base.p y", line 219, in _xy_from_xy raise ValueError("x and y must have same first dimension") ValueError: x and y must have same first dimension

CCampJr commented 7 years ago

Will add a try-except statement to just suppress the problem

CCampJr commented 6 years ago

Haven't had it arise in a long time. Total mystery. Closing it out.