Skip to content

Commit

Permalink
Merge pull request #754 from markotoplak/hyper-default-integration
Browse files Browse the repository at this point in the history
HyperSpectra: change the default integration method
  • Loading branch information
markotoplak authored Oct 5, 2024
2 parents 5a74ade + 0afb921 commit 0459bf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions orangecontrib/spectroscopy/tests/test_owhyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

from orangecontrib.spectroscopy.data import _spectra_from_image, build_spec_table
from orangecontrib.spectroscopy.io.util import VisibleImage
from orangecontrib.spectroscopy.preprocess.integrate import IntegrateFeaturePeakSimple, Integrate
from orangecontrib.spectroscopy.preprocess.integrate import IntegrateFeaturePeakSimple, \
Integrate, IntegrateFeatureSimple
from orangecontrib.spectroscopy.widgets import owhyper
from orangecontrib.spectroscopy.widgets.owhyper import \
OWHyper
Expand Down Expand Up @@ -419,7 +420,9 @@ def last_called_array(m):

wrap = self.widget.imageplot.img

# integrals from zero; default
# integral from zero
self.widget.integration_method = \
self.widget.integration_methods.index(IntegrateFeatureSimple)
self.send_signal("Data", data)
with patch.object(wrap, 'setImage', wraps=wrap.setImage) as m:
wait_for_image(self.widget)
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/spectroscopy/widgets/owhyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ class Outputs(SelectionOutputsMixin.Outputs):
imageplot = SettingProvider(ImagePlot)
curveplot = SettingProvider(CurvePlotHyper)

integration_method = Setting(0)
integration_method = Setting(4) # Closest value
integration_methods = Integrate.INTEGRALS
value_type = Setting(0)
attr_value = ContextSetting(None)
Expand Down

0 comments on commit 0459bf7

Please sign in to comment.