diff --git a/orangecontrib/spectroscopy/widgets/icons/2dcos.svg b/orangecontrib/spectroscopy/widgets/icons/2dcos.svg new file mode 100644 index 000000000..b782dcc15 --- /dev/null +++ b/orangecontrib/spectroscopy/widgets/icons/2dcos.svg @@ -0,0 +1,1273 @@ + + + + diff --git a/orangecontrib/spectroscopy/widgets/owcos.py b/orangecontrib/spectroscopy/widgets/owcos.py index d9f07c475..238ede988 100644 --- a/orangecontrib/spectroscopy/widgets/owcos.py +++ b/orangecontrib/spectroscopy/widgets/owcos.py @@ -182,8 +182,7 @@ class OWCos(OWWidget): description = ( "Perform 2D correlation analysis with series spectra") - # TODO - needs icon - icon = "icons/average.svg" + icon = "icons/2dcos.svg" graph_name = "plotview" # need this to show the save button @@ -444,7 +443,7 @@ def plotCOS(self): (topSPwn.max() - topSPwn.min()), (leftSPwn.max() - leftSPwn.min()))) - self.cbarCOS.set_range(-1 * np.absolute(cosmat).max(), np.absolute(cosmat).max()) + self.cbarCOS.set_range(-1 * np.nanmax(np.absolute(cosmat)), np.nanmax(np.absolute(cosmat))) self.cbarCOS.set_colors(np.array(colorcet.diverging_bwr_40_95_c42) * 255) for s in leftSP: @@ -487,4 +486,3 @@ def commit(self): from Orange.widgets.utils.widgetpreview import WidgetPreview WidgetPreview(OWCos).run(set_data1=Orange.data.Table("collagen"), set_data2=None) - # WidgetPreview(OWCos).run(set_data1=Orange.data.Table("/Users/borondics/2dcos-test-lShift2b_large.dat"), set_data2=None) \ No newline at end of file