Commit b1a2b274 authored by payno's avatar payno
Browse files

[orange add-on] add some gui from pyca for processes

parent 6a9fbcc9
......@@ -30,8 +30,8 @@ __date__ = "06/07/2019"
from Orange.widgets import gui
from Orange.widgets.widget import OWWidget
from silx.gui import qt
from Orange.canvas.registry.description import OutputSignal, InputSignal
from xas.core.types import xas_process_io
from PyMca5.PyMcaGui.physics.xas.XASPostEdgeParameters import XASPostEdgeParameters
import numpy
import logging
_logger = logging.getLogger(__file__)
......@@ -45,19 +45,22 @@ class ExafsOW(OWWidget):
id = "orange.widgets.xas.exafs"
description = "Process signal extraction"
icon = "icons/exafs.png"
priority = 4
priority = 3
category = "esrfWidgets"
keywords = ["spectroscopy", "signal"]
want_main_area = True
resizing_enabled = True
inputs = [("spectrum", numpy.ndarray, "process")]
outputs = [("spectrum", numpy.ndarray)]
inputs = [("spectrum", xas_process_io, "process")]
outputs = [("spectrum", xas_process_io)]
def __init__(self):
super().__init__()
self._pymcaWindow = XASPostEdgeParameters(parent=self)
layout = gui.vBox(self.mainArea, 'fourier transform').layout()
layout.addWidget(self._pymcaWindow)
def process(self, spectrum):
print('process', self.name)
......@@ -30,8 +30,8 @@ __date__ = "06/07/2019"
from Orange.widgets import gui
from Orange.widgets.widget import OWWidget
from silx.gui import qt
from Orange.canvas.registry.description import OutputSignal, InputSignal
from xas.core.types import xas_process_io
from PyMca5.PyMcaGui.physics.xas.XASFourierTransformParameters import XASFourierTransformParameters
import numpy
import logging
_logger = logging.getLogger(__file__)
......@@ -45,19 +45,22 @@ class FTOW(OWWidget):
id = "orange.widgets.xas.ft"
description = "Process fourier transform"
icon = "icons/ft.png"
priority = 3
priority = 4
category = "esrfWidgets"
keywords = ["spectroscopy", "signal", "fourier", "transform", "fourier transform"]
want_main_area = True
resizing_enabled = True
inputs = [("spectrum", numpy.ndarray, "process")]
outputs = [("spectrum", numpy.ndarray)]
inputs = [("spectrum", xas_process_io, "process")]
outputs = [("spectrum", xas_process_io)]
def __init__(self):
super().__init__()
self._pymcaWindow = XASFourierTransformParameters(parent=self)
layout = gui.vBox(self.mainArea, 'fourier transform').layout()
layout.addWidget(self._pymcaWindow)
def process(self, spectrum):
print('process', self.name)
......@@ -31,7 +31,7 @@ __date__ = "06/07/2019"
from Orange.widgets import gui
from Orange.widgets.widget import OWWidget
from silx.gui import qt
from Orange.canvas.registry.description import OutputSignal, InputSignal
from xas.core.types import xas_process_io
import numpy
import logging
_logger = logging.getLogger(__file__)
......@@ -45,19 +45,27 @@ class KWeightOW(OWWidget):
id = "orange.widgets.xas.k_weight"
description = "Process k weight"
icon = "icons/k_weight.png"
priority = 4
priority = 2
category = "esrfWidgets"
keywords = ["spectroscopy", "signal", "k", "weight"]
want_main_area = True
resizing_enabled = True
inputs = [("spectrum", numpy.ndarray, "process")]
outputs = [("spectrum", numpy.ndarray)]
inputs = [("spectrum", xas_process_io, "process")]
outputs = [("spectrum", xas_process_io)]
def __init__(self):
super().__init__()
self._k_widget = qt.QWidget(parent=self)
self._k_widget.setLayout(qt.QFormLayout())
self._k_widget.layout().addWidget(qt.QLabel('k weight'))
self._k_spin_box = qt.QSpinBox(parent=self)
self._k_spin_box.setRange(0, 3)
self._k_widget.layout().addWidget(self._k_spin_box)
layout = gui.vBox(self.mainArea, 'fourier transform').layout()
layout.addWidget(self._k_widget)
def process(self, spectrum):
print('process', self.name)
......@@ -30,8 +30,8 @@ __date__ = "06/07/2019"
from Orange.widgets import gui
from Orange.widgets.widget import OWWidget
from silx.gui import qt
from Orange.canvas.registry.description import OutputSignal, InputSignal
from PyMca5.PyMcaGui.physics.xas.XASNormalizationParameters import XASNormalizationParameters
from xas.core.types import xas_process_io
import numpy
import logging
_logger = logging.getLogger(__file__)
......@@ -45,19 +45,22 @@ class NormalizationOW(OWWidget):
id = "orange.widgets.xas.normalization"
description = "Process spectrum normalization"
icon = "icons/normalization.png"
priority = 4
priority = 1
category = "esrfWidgets"
keywords = ["spectroscopy", "normalization"]
want_main_area = True
resizing_enabled = True
inputs = [("spectrum", numpy.ndarray, "process")]
outputs = [("spectrum", numpy.ndarray)]
inputs = [("spectrum", xas_process_io, "process")]
outputs = [("spectrum", xas_process_io)]
def __init__(self):
super().__init__()
self._pymcaWindow = XASNormalizationParameters(parent=self)
layout = gui.vBox(self.mainArea, 'fourier transform').layout()
layout.addWidget(self._pymcaWindow)
def process(self, spectrum):
print('process', self.name)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment