Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HyperSpectra: change the default integration method #754

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -415,7 +416,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
Loading