Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
98603df5
Commit
98603df5
authored
Feb 13, 2020
by
Julia Garriga Ferrer
Browse files
Documentation
parent
67d5f80c
Pipeline
#21221
passed with stage
in 2 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/displayComponentsWidget.py
View file @
98603df5
...
...
@@ -111,10 +111,12 @@ class DisplayComponentsWidget(qt.QMainWindow):
def
setComponents
(
self
,
components
,
W
,
dimensions
):
"""
Dataset setter. Saves the dataset and u
pdates the
stack
with the
dataset
data
Components setter. U
pdates the
plots
with the
components and their
corresponding rocking curves.
:param Dataset dataset: dataset
:param array_like components: stack of images with the components
:param array_like W: array with the rocking curves intensity
:param dict dimensions: dictionary with the values of the dimensions
"""
self
.
components
=
components
self
.
W
=
W
...
...
@@ -238,6 +240,10 @@ class DisplayComponentsWidget(qt.QMainWindow):
class
PlotRockingCurves
(
qt
.
QMainWindow
):
"""
Widget to plot the rocking curves of the components. It can be filtered
to show only the rocking curves of a certain moving dimension.
"""
sigFrameChanged
=
qt
.
Signal
(
int
)
sigMotorChanged
=
qt
.
Signal
(
int
)
...
...
darfix/io/utils.py
View file @
98603df5
...
...
@@ -73,6 +73,11 @@ def advancement_display(iteration, total, prefix='', suffix='', decimals=1, leng
def
read_components
(
h5_file
):
"""
Read a stack of components and its parameters from a Nexus file.
:param str h5_file: path to the hdf5 file
"""
with
h5py
.
File
(
h5_file
,
"r"
)
as
nx
:
# find the default NXentry group
nx_entry
=
nx
[
nx
.
attrs
[
"default"
]]
...
...
@@ -97,14 +102,10 @@ def write_components(h5_file, entry, dimensions, W, data, processing_order,
:param str h5_file: path to the hdf5 file
:param str entry: entry name
:param dict dimensions: Dictionary with the dimensions names and values
:param W: Matrix with the rocking curves values
:type: numpy.ndarray
:param data: Stack with the components
:type: numpy.ndarray
:param processing_order: processing order of treatment
:type: int
:param data_path: path to store the data
:type: str
:param numpy.ndarray W: Matrix with the rocking curves values
:param numpy.ndarray data: Stack with the components
:param int processing_order: processing order of treatment
:param str data_path: path to store the data
"""
process_name
=
'process_'
+
str
(
processing_order
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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