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
d81c9f7e
Commit
d81c9f7e
authored
Feb 13, 2020
by
Julia Garriga Ferrer
Browse files
Documentation
parent
a41271eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
darfix/gui/displayComponentsWidget.py
View file @
d81c9f7e
...
@@ -111,10 +111,12 @@ class DisplayComponentsWidget(qt.QMainWindow):
...
@@ -111,10 +111,12 @@ class DisplayComponentsWidget(qt.QMainWindow):
def
setComponents
(
self
,
components
,
W
,
dimensions
):
def
setComponents
(
self
,
components
,
W
,
dimensions
):
"""
"""
Dataset setter. Saves the dataset and u
pdates the
stack
with the
dataset
Components setter. U
pdates the
plots
with the
components and their
data
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
.
components
=
components
self
.
W
=
W
self
.
W
=
W
...
@@ -238,6 +240,10 @@ class DisplayComponentsWidget(qt.QMainWindow):
...
@@ -238,6 +240,10 @@ class DisplayComponentsWidget(qt.QMainWindow):
class
PlotRockingCurves
(
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
)
sigFrameChanged
=
qt
.
Signal
(
int
)
sigMotorChanged
=
qt
.
Signal
(
int
)
sigMotorChanged
=
qt
.
Signal
(
int
)
...
...
darfix/io/utils.py
View file @
d81c9f7e
...
@@ -73,6 +73,11 @@ def advancement_display(iteration, total, prefix='', suffix='', decimals=1, leng
...
@@ -73,6 +73,11 @@ def advancement_display(iteration, total, prefix='', suffix='', decimals=1, leng
def
read_components
(
h5_file
):
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
:
with
h5py
.
File
(
h5_file
,
"r"
)
as
nx
:
# find the default NXentry group
# find the default NXentry group
nx_entry
=
nx
[
nx
.
attrs
[
"default"
]]
nx_entry
=
nx
[
nx
.
attrs
[
"default"
]]
...
@@ -97,14 +102,10 @@ def write_components(h5_file, entry, dimensions, W, data, processing_order,
...
@@ -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 h5_file: path to the hdf5 file
:param str entry: entry name
:param str entry: entry name
:param dict dimensions: Dictionary with the dimensions names and values
:param dict dimensions: Dictionary with the dimensions names and values
:param W: Matrix with the rocking curves values
:param numpy.ndarray W: Matrix with the rocking curves values
:type: numpy.ndarray
:param numpy.ndarray data: Stack with the components
:param data: Stack with the components
:param int processing_order: processing order of treatment
:type: numpy.ndarray
:param str data_path: path to store the data
:param processing_order: processing order of treatment
:type: int
:param data_path: path to store the data
:type: str
"""
"""
process_name
=
'process_'
+
str
(
processing_order
)
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