Commit 98603df5 authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

Documentation

parent 67d5f80c
Pipeline #21221 passed with stage
in 2 minutes and 3 seconds
......@@ -111,10 +111,12 @@ class DisplayComponentsWidget(qt.QMainWindow):
def setComponents(self, components, W, dimensions):
"""
Dataset setter. Saves the dataset and updates the stack with the dataset
data
Components setter. Updates 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)
......
......@@ -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)
......
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