From 745531333975dbd6be79b7db162da6e39dc4c616 Mon Sep 17 00:00:00 2001 From: "borondics.accounts@gmail.com" Date: Wed, 18 Oct 2023 16:28:55 +0200 Subject: [PATCH 1/5] added icon to 2DCOS --- .../spectroscopy/widgets/icons/2dcos.svg | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 orangecontrib/spectroscopy/widgets/icons/2dcos.svg diff --git a/orangecontrib/spectroscopy/widgets/icons/2dcos.svg b/orangecontrib/spectroscopy/widgets/icons/2dcos.svg new file mode 100644 index 000000000..11c6e9970 --- /dev/null +++ b/orangecontrib/spectroscopy/widgets/icons/2dcos.svg @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + From 0e4bddb8dc0394b2f1fd9007f6ab7866d84fb448 Mon Sep 17 00:00:00 2001 From: "borondics.accounts@gmail.com" Date: Wed, 18 Oct 2023 16:48:54 +0200 Subject: [PATCH 2/5] changed the code to load icon --- orangecontrib/spectroscopy/widgets/owcos.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/orangecontrib/spectroscopy/widgets/owcos.py b/orangecontrib/spectroscopy/widgets/owcos.py index d9f07c475..46cda8929 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,8 @@ def plotCOS(self): (topSPwn.max() - topSPwn.min()), (leftSPwn.max() - leftSPwn.min()))) - self.cbarCOS.set_range(-1 * np.absolute(cosmat).max(), np.absolute(cosmat).max()) + print(np.nanmax(np.absolute(cosmat)), np.nanmax(np.absolute(cosmat))) + 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 +487,4 @@ 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 + # WidgetPreview(OWCos).run(set_data1=Orange.data.Table("/Users/borondics/2dcos-test-lShift2b_large.dat"), set_data2=None) From 11b5119c31179f837721f43ec62990599d3a03c9 Mon Sep 17 00:00:00 2001 From: "borondics.accounts@gmail.com" Date: Thu, 19 Oct 2023 16:12:12 +0200 Subject: [PATCH 3/5] new icon for 2DCOS --- .../spectroscopy/widgets/icons/2dcos.svg | 1281 ++++++++++++++++- 1 file changed, 1233 insertions(+), 48 deletions(-) diff --git a/orangecontrib/spectroscopy/widgets/icons/2dcos.svg b/orangecontrib/spectroscopy/widgets/icons/2dcos.svg index 11c6e9970..b782dcc15 100644 --- a/orangecontrib/spectroscopy/widgets/icons/2dcos.svg +++ b/orangecontrib/spectroscopy/widgets/icons/2dcos.svg @@ -9,12 +9,11 @@ id="svg1" inkscape:version="1.3 (0e150ed, 2023-07-21)" sodipodi:docname="2dcos.svg" + xml:space="preserve" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg"> - - - - - - - - - - - - + sodipodi:nodetypes="cccccccc" /> From 1e34c2e4d851accc929b31a050c885b130b43db1 Mon Sep 17 00:00:00 2001 From: "borondics.accounts@gmail.com" Date: Thu, 19 Oct 2023 16:14:27 +0200 Subject: [PATCH 4/5] took out unnecessary line --- orangecontrib/spectroscopy/widgets/owcos.py | 1 - 1 file changed, 1 deletion(-) diff --git a/orangecontrib/spectroscopy/widgets/owcos.py b/orangecontrib/spectroscopy/widgets/owcos.py index 46cda8929..8d02bd010 100644 --- a/orangecontrib/spectroscopy/widgets/owcos.py +++ b/orangecontrib/spectroscopy/widgets/owcos.py @@ -487,4 +487,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) From d1c22be156f3fe451a13db27efaf2b3d4cac779d Mon Sep 17 00:00:00 2001 From: "borondics.accounts@gmail.com" Date: Thu, 19 Oct 2023 16:18:00 +0200 Subject: [PATCH 5/5] removed print --- orangecontrib/spectroscopy/widgets/owcos.py | 1 - 1 file changed, 1 deletion(-) diff --git a/orangecontrib/spectroscopy/widgets/owcos.py b/orangecontrib/spectroscopy/widgets/owcos.py index 8d02bd010..238ede988 100644 --- a/orangecontrib/spectroscopy/widgets/owcos.py +++ b/orangecontrib/spectroscopy/widgets/owcos.py @@ -443,7 +443,6 @@ def plotCOS(self): (topSPwn.max() - topSPwn.min()), (leftSPwn.max() - leftSPwn.min()))) - print(np.nanmax(np.absolute(cosmat)), np.nanmax(np.absolute(cosmat))) 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)