Commit 35d1d81d authored by payno's avatar payno
Browse files

[process] reprocess. Rename to PEP8: setProperties -> set_properties

parent 4d9ab1e4
......@@ -123,13 +123,13 @@ class TestReprocessingLarch(unittest.TestCase):
self.h5_file = os.path.join(self.output_dir, "output_file.h5")
pre_edge_process = Larch_pre_edge()
pre_edge_process.setProperties({"rbkg": 1.0, "kweight": 2})
pre_edge_process.set_properties({"rbkg": 1.0, "kweight": 2})
autobk_process = Larch_autobk()
autobk_process.setProperties(
autobk_process.set_properties(
{"kmin": 2, "kmax": 16, "dk": 3, "window": "hanning", "kweight": 2}
)
xftf_process = Larch_xftf()
xftf_process.setProperties({"kweight": 2})
xftf_process.set_properties({"kweight": 2})
out = pre_edge_process(xas_obj=self.xas_obj_ref)
out = autobk_process(xas_obj=out)
......
......@@ -148,7 +148,7 @@ class XASWriter(object):
def output_file(self, file_):
self._output_file = file_
def setProperties(self, properties):
def set_properties(self, properties):
if "_output_file_setting" in properties:
self._output_file = properties["_output_file_setting"]
......
......@@ -137,7 +137,7 @@ class Larch_autobk(Process):
def __init__(self):
Process.__init__(self, name="autobk")
def setProperties(self, properties):
def set_properties(self, properties):
if "_larchSettings" in properties:
self._settings = properties["_larchSettings"]
......
......@@ -126,7 +126,7 @@ class Larch_mback(Process):
def __init__(self):
Process.__init__(self, name="mback")
def setProperties(self, properties):
def set_properties(self, properties):
if "_larchSettings" in properties:
self._settings = properties["_larchSettings"]
......
......@@ -135,7 +135,7 @@ class Larch_mback_norm(Process):
def __init__(self):
Process.__init__(self, name="mback_norm")
def setProperties(self, properties):
def set_properties(self, properties):
if "_larchSettings" in properties:
self._settings = properties["_larchSettings"]
......
......@@ -124,7 +124,7 @@ class Larch_pre_edge(Process):
def __init__(self):
Process.__init__(self, name="pre_edge")
def setProperties(self, properties):
def set_properties(self, properties):
if "_larchSettings" in properties:
self._settings = properties["_larchSettings"]
......
......@@ -127,7 +127,7 @@ class Larch_xftf(Process):
def __init__(self):
Process.__init__(self, name="xftf")
def setProperties(self, properties):
def set_properties(self, properties):
if "_larchSettings" in properties:
self._settings = properties["_larchSettings"]
......
......@@ -150,7 +150,7 @@ class PyMca_exafs(Process):
def __init__(self):
Process.__init__(self, name="exafs")
def setProperties(self, properties):
def set_properties(self, properties):
if "_pymcaSettings" in properties:
self.setConfiguration(properties["_pymcaSettings"])
......
......@@ -152,7 +152,7 @@ class PyMca_ft(Process):
def __init__(self):
Process.__init__(self, name="ft")
def setProperties(self, properties):
def set_properties(self, properties):
if "_pymcaSettings" in properties:
self._settings = properties["_pymcaSettings"]
......
......@@ -142,7 +142,7 @@ class PyMca_k_weight(Process):
def __init__(self):
Process.__init__(self, name="k weight")
def setProperties(self, properties):
def set_properties(self, properties):
if "_kWeightSetting" in properties:
_properties = properties.copy()
_properties["k_weight"] = _properties["_kWeightSetting"]
......
......@@ -127,7 +127,7 @@ class PyMca_normalization(Process):
Process.__init__(self, "normalization")
self._advancement = Progress(self.name)
def setProperties(self, properties):
def set_properties(self, properties):
if "_pymcaSettings" in properties:
self._settings = properties["_pymcaSettings"]
......
......@@ -88,7 +88,7 @@ class ROIProcess(Process):
Process.__init__(self, name="roi")
self._roi = None
def setProperties(self, properties):
def set_properties(self, properties):
if "roi" in properties:
self._roi = _ROI.from_dict(properties["roi"])
......
......@@ -155,7 +155,7 @@ if __name__ == "__main__":
def accept(self):
roi_process = ROIProcess()
roi_ = _ROI.from_silx_def(self.getROI())
roi_process.setProperties({"roi": roi_.to_dict()})
roi_process.set_properties({"roi": roi_.to_dict()})
update_xas_object = roi_process.process(self.getXasObject())
self.setXasObject(update_xas_object)
self.show()
......
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