Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
ewoksapps
est
Commits
7b374731
Commit
7b374731
authored
Aug 03, 2021
by
payno
Browse files
PEP8
parent
76aab690
Pipeline
#51923
failed with stages
in 11 minutes and 46 seconds
Changes
57
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
est/app/canvas_launcher/__init__.py
View file @
7b374731
from
.launcher
import
Launcher
from
.launcher
import
Launcher
# noqa
est/app/process.py
View file @
7b374731
...
@@ -7,14 +7,13 @@ from ewoksorange.owsconvert import ows_to_ewoks
...
@@ -7,14 +7,13 @@ from ewoksorange.owsconvert import ows_to_ewoks
from
.utils
import
get_unit
from
.utils
import
get_unit
from
.utils
import
get_url
from
.utils
import
get_url
from
.utils
import
convert_spectra_dims
from
.utils
import
convert_spectra_dims
from
.utils
import
get_xas_obj
try
:
try
:
import
h5py
import
h5py
# noqa
except
ImportError
:
has_h5py
=
True
except
:
has_h5py
=
False
has_h5py
=
False
else
:
has_h5py
=
True
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
_logger
=
logging
.
getLogger
(
__name__
)
_logger
=
logging
.
getLogger
(
__name__
)
...
...
est/app/test/test_exec.py
View file @
7b374731
...
@@ -37,7 +37,7 @@ from est.io.utils.information import InputInformation
...
@@ -37,7 +37,7 @@ from est.io.utils.information import InputInformation
from
silx.io.url
import
DataUrl
from
silx.io.url
import
DataUrl
try
:
try
:
import
PyMca5
import
PyMca5
# noqa
except
ImportError
:
except
ImportError
:
has_pymca
=
False
has_pymca
=
False
else
:
else
:
...
...
est/app/utils/__init__.py
View file @
7b374731
...
@@ -32,18 +32,19 @@ from silx.io.url import DataUrl
...
@@ -32,18 +32,19 @@ from silx.io.url import DataUrl
from
est.units
import
ur
from
est.units
import
ur
from
est.core.types
import
Dim
from
est.core.types
import
Dim
from
est.io.utils
import
get_data
from
est.io.utils
import
get_data
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
XASObject
from
est.core.io
import
read_xas
from
est.core.io
import
read_xas
from
est.io.utils.information
import
InputInformation
from
est.io.utils.information
import
InputInformation
import
logging
import
logging
from
est
import
settings
from
est
import
settings
try
:
try
:
from
est.io.utils.spec
import
read_spectrum
from
est.io.utils.spec
import
read_spectrum
# noqa
has_read_spectrum
=
True
except
ImportError
:
except
ImportError
:
has_read_spectrum
=
False
has_read_spectrum
=
False
else
:
has_read_spectrum
=
True
_logger
=
logging
.
getLogger
(
__name__
)
_logger
=
logging
.
getLogger
(
__name__
)
...
...
est/core/io.py
View file @
7b374731
...
@@ -33,7 +33,7 @@ from est.io import read_xas, write_xas, get_xasproc
...
@@ -33,7 +33,7 @@ from est.io import read_xas, write_xas, get_xasproc
from
est.core.types
import
XASObject
from
est.core.types
import
XASObject
from
silx.io.url
import
DataUrl
from
silx.io.url
import
DataUrl
from
est.core.types
import
Dim
from
est.core.types
import
Dim
from
est.units
import
ur
,
convert_to
from
est.units
import
ur
from
typing
import
Union
from
typing
import
Union
from
est.io.utils.information
import
InputInformation
from
est.io.utils.information
import
InputInformation
import
h5py
import
h5py
...
...
est/core/process/energyroi.py
View file @
7b374731
...
@@ -27,12 +27,8 @@ __authors__ = ["H. Payno"]
...
@@ -27,12 +27,8 @@ __authors__ = ["H. Payno"]
__license__
=
"MIT"
__license__
=
"MIT"
__date__
=
"27/01/2021"
__date__
=
"27/01/2021"
from
est.core.types
import
XASObject
from
.process
import
Process
from
.process
import
Process
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
import
logging
import
logging
from
typing
import
Union
_logger
=
logging
.
getLogger
(
__name__
)
_logger
=
logging
.
getLogger
(
__name__
)
...
...
est/core/process/io.py
View file @
7b374731
...
@@ -30,8 +30,6 @@ __date__ = "06/11/2019"
...
@@ -30,8 +30,6 @@ __date__ = "06/11/2019"
from
.process
import
Process
from
.process
import
Process
from
est.core.types
import
XASObject
from
est.core.types
import
XASObject
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
from
est.io.utils.information
import
InputInformation
from
est.io.utils.information
import
InputInformation
import
pkg_resources
import
pkg_resources
...
...
est/core/process/larch/autobk.py
View file @
7b374731
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.process.process
import
Process
from
est.core.process.process
import
Process
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
from
larch.xafs.autobk
import
autobk
from
larch.xafs.autobk
import
autobk
import
multiprocessing
import
multiprocessing
import
functools
import
functools
...
...
est/core/process/larch/mback.py
View file @
7b374731
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.process.process
import
Process
from
est.core.process.process
import
Process
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
from
larch.xafs.mback
import
mback
from
larch.xafs.mback
import
mback
import
multiprocessing
import
multiprocessing
import
functools
import
functools
...
@@ -93,7 +91,7 @@ def process_spectr_mback(
...
@@ -93,7 +91,7 @@ def process_spectr_mback(
):
):
if
opt_name
in
_conf
:
if
opt_name
in
_conf
:
opts
[
opt_name
]
=
_conf
[
opt_name
]
opts
[
opt_name
]
=
_conf
[
opt_name
]
if
not
"z"
in
opts
:
if
"z"
not
in
opts
:
raise
ValueError
(
"atomic number of the absorber is not specify"
)
raise
ValueError
(
"atomic number of the absorber is not specify"
)
if
_DEBUG
is
True
:
if
_DEBUG
is
True
:
...
...
est/core/process/larch/mback_norm.py
View file @
7b374731
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.process.process
import
Process
from
est.core.process.process
import
Process
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
from
larch.xafs.mback
import
mback_norm
from
larch.xafs.mback
import
mback_norm
from
larch.xafs.pre_edge
import
preedge
from
larch.xafs.pre_edge
import
preedge
import
multiprocessing
import
multiprocessing
...
...
est/core/process/larch/pre_edge.py
View file @
7b374731
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.process.process
import
Process
from
est.core.process.process
import
Process
from
est.core.process.process
import
_NexusSpectrumDef
,
_NexusDatasetDef
from
est.core.process.process
import
_NexusSpectrumDef
,
_NexusDatasetDef
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
from
est.core.utils.symbol
import
MU_CHAR
from
est.core.utils.symbol
import
MU_CHAR
from
larch.xafs.pre_edge
import
pre_edge
from
larch.xafs.pre_edge
import
pre_edge
import
multiprocessing
import
multiprocessing
...
...
est/core/process/larch/test/test_autobk.py
View file @
7b374731
...
@@ -34,7 +34,7 @@ import urllib.request
...
@@ -34,7 +34,7 @@ import urllib.request
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
try
:
try
:
import
larch
import
larch
# noqa
except
ImportError
:
except
ImportError
:
has_larch
=
False
has_larch
=
False
else
:
else
:
...
...
est/core/process/larch/test/test_mback.py
View file @
7b374731
...
@@ -34,7 +34,7 @@ import urllib.request
...
@@ -34,7 +34,7 @@ import urllib.request
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
try
:
try
:
import
larch
import
larch
# noqa
except
ImportError
:
except
ImportError
:
has_larch
=
False
has_larch
=
False
else
:
else
:
...
...
est/core/process/larch/test/test_mback_norm.py
View file @
7b374731
...
@@ -34,7 +34,7 @@ import urllib.request
...
@@ -34,7 +34,7 @@ import urllib.request
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
try
:
try
:
import
larch
import
larch
# noqa
except
ImportError
:
except
ImportError
:
has_larch
=
False
has_larch
=
False
else
:
else
:
...
...
est/core/process/larch/test/test_pre_edge.py
View file @
7b374731
...
@@ -34,7 +34,7 @@ import urllib.request
...
@@ -34,7 +34,7 @@ import urllib.request
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
try
:
try
:
import
larch
import
larch
# noqa
except
ImportError
:
except
ImportError
:
has_larch
=
False
has_larch
=
False
else
:
else
:
...
...
est/core/process/larch/test/test_workflow.py
View file @
7b374731
...
@@ -35,12 +35,12 @@ import numpy
...
@@ -35,12 +35,12 @@ import numpy
from
est.core.types
import
Spectrum
from
est.core.types
import
Spectrum
try
:
try
:
import
larch
import
larch
# noqa
except
ImportError
:
except
ImportError
:
has_larch
=
False
has_larch
=
False
else
:
else
:
has_larch
=
True
has_larch
=
True
from
est.core.process.larch.xftf
import
larch_xftf
,
process_spectr_xftf
as
xftf
from
est.core.process.larch.xftf
import
process_spectr_xftf
as
xftf
from
est.core.process.larch.autobk
import
process_spectr_autobk
as
autobk
from
est.core.process.larch.autobk
import
process_spectr_autobk
as
autobk
from
est.core.process.larch.pre_edge
import
process_spectr_pre_edge
as
pre_edge
from
est.core.process.larch.pre_edge
import
process_spectr_pre_edge
as
pre_edge
from
est.io.utils.larch
import
read_ascii
from
est.io.utils.larch
import
read_ascii
...
...
est/core/process/larch/test/test_xftf.py
View file @
7b374731
...
@@ -34,7 +34,7 @@ import urllib.request
...
@@ -34,7 +34,7 @@ import urllib.request
from
est.core.types
import
Spectrum
,
XASObject
from
est.core.types
import
Spectrum
,
XASObject
try
:
try
:
import
larch
import
larch
# noqa
except
ImportError
:
except
ImportError
:
has_larch
=
False
has_larch
=
False
else
:
else
:
...
...
est/core/process/larch/xftf.py
View file @
7b374731
...
@@ -28,8 +28,6 @@ from est.core.types import Spectrum, XASObject
...
@@ -28,8 +28,6 @@ from est.core.types import Spectrum, XASObject
from
est.core.process.process
import
Process
from
est.core.process.process
import
Process
from
est.core.process.process
import
_NexusSpectrumDef
from
est.core.process.process
import
_NexusSpectrumDef
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_NexusDatasetDef
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
from
larch.xafs.xafsft
import
xftf
from
larch.xafs.xafsft
import
xftf
from
est.core.utils.symbol
import
ANGSTROM_CHAR
from
est.core.utils.symbol
import
ANGSTROM_CHAR
import
multiprocessing
import
multiprocessing
...
...
est/core/process/noise.py
View file @
7b374731
...
@@ -29,8 +29,6 @@ __date__ = "18/01/2021"
...
@@ -29,8 +29,6 @@ __date__ = "18/01/2021"
from
est.core.types
import
XASObject
from
est.core.types
import
XASObject
from
est.core.types
import
Spectrum
from
est.core.types
import
Spectrum
from
est.core.process.process
import
_input_desc
from
est.core.process.process
import
_output_desc
from
.process
import
Process
from
.process
import
Process
from
.process
import
_NexusSpectrumDef
from
.process
import
_NexusSpectrumDef
from
.process
import
_NexusDatasetDef
from
.process
import
_NexusDatasetDef
...
@@ -40,7 +38,6 @@ import numpy
...
@@ -40,7 +38,6 @@ import numpy
import
pkg_resources
import
pkg_resources
import
multiprocessing
import
multiprocessing
import
functools
import
functools
from
typing
import
Union
_logger
=
logging
.
getLogger
(
__name__
)
_logger
=
logging
.
getLogger
(
__name__
)
...
@@ -80,21 +77,21 @@ def process_noise_savgol(
...
@@ -80,21 +77,21 @@ def process_noise_savgol(
)
)
if
"noise"
in
configuration
:
if
"noise"
in
configuration
:
configuration
=
configuration
[
"noise"
]
configuration
=
configuration
[
"noise"
]
if
not
"window_size"
in
configuration
:
if
"window_size"
not
in
configuration
:
raise
ValueError
(
"`window_size` should be specify. Missing in configuration"
)
raise
ValueError
(
"`window_size` should be specify. Missing in configuration"
)
else
:
else
:
window_size
=
configuration
[
"window_size"
]
window_size
=
configuration
[
"window_size"
]
if
not
"polynomial_order"
in
configuration
:
if
"polynomial_order"
not
in
configuration
:
raise
ValueError
(
raise
ValueError
(
"`polynomial_order` should be specify. Missing in configuration"
"`polynomial_order` should be specify. Missing in configuration"
)
)
else
:
else
:
polynomial_order
=
configuration
[
"polynomial_order"
]
polynomial_order
=
configuration
[
"polynomial_order"
]
if
not
"e_min"
in
configuration
:
if
"e_min"
not
in
configuration
:
e_min
=
None
e_min
=
None
else
:
else
:
e_min
=
configuration
[
"e_min"
]
e_min
=
configuration
[
"e_min"
]
if
not
"e_max"
in
configuration
:
if
"e_max"
not
in
configuration
:
e_max
=
None
e_max
=
None
else
:
else
:
e_max
=
configuration
[
"e_max"
]
e_max
=
configuration
[
"e_max"
]
...
...
est/core/process/process.py
View file @
7b374731
...
@@ -124,13 +124,6 @@ class _NexusSpectrumDef:
...
@@ -124,13 +124,6 @@ class _NexusSpectrumDef:
def
title_latex
(
self
):
def
title_latex
(
self
):
return
self
.
__title_latex
return
self
.
__title_latex
@
title
.
setter
def
title_latex
(
self
,
title
):
if
not
isinstance
(
title
,
(
str
,
type
(
None
))):
raise
TypeError
(
"`title` should be an instance of str or None"
)
else
:
self
.
__title_latex
=
title
class
_NexusDatasetDef
:
class
_NexusDatasetDef
:
"""Util function to define a Nexus plot"""
"""Util function to define a Nexus plot"""
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment