Skip to content
Snippets Groups Projects
Commit 06efa841 authored by Loic Huder's avatar Loic Huder
Browse files

Remove get_xas_obj

parent aac6854c
No related branches found
No related tags found
No related merge requests found
from est.app.utils.xasobj import get_xas_obj
from silx.io.url import DataUrl
from est.core.io import read_from_input_information
from est.units import ur
from larch.xafs import etok
from silx.gui import qt
......@@ -162,9 +162,7 @@ class AnalysisThread(threading.Thread):
)
# this could be replace by a larch Spectrum. We would just have to duplicated noise treatment
xas_obj = get_xas_obj(
input_information=input_information,
)
xas_obj = read_from_input_information(input_information)
self.spectrum = xas_obj.spectra.data.flat[0]
# TODO: add a process attact to attach informations from an url.
......
import logging
from est import settings
from est.core.io import read_from_input_information
from est.io.information import InputInformation
def get_xas_obj(
input_information: InputInformation, timeout=settings.DEFAULT_READ_TIMEOUT
):
"""load xas object from command line input
:param spec_input: tuple of Union[str, None, dict]
:param float timeout: read time out (for hdf5 only for now)
"""
xas_obj = read_from_input_information(
information=input_information, timeout=timeout
)
return xas_obj
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment