Commit a7126863 authored by payno's avatar payno

[doc] Add screenshot script for geometry, mapping, metadata_table and shift

parent 1ac78122
......@@ -20,6 +20,7 @@ Widgets
widgets/dataselection
widgets/geometry
widgets/mapping
widgets/metadata
widgets/noisereduction
widgets/roiselection
widgets/saveexperiment
......
COM
===
.. snapshotqt:: orangecontrib/id06workflow/widgets/screenshots/com.py
.. snapshotqt:: orangecontrib/id06workflow/widgets/screenshots/com_screenshot.py
Signals
......
Geometry
========
![image](icons/mywidget.png)
.. snapshotqt:: orangecontrib/id06workflow/widgets/screenshots/geometry_screenshot.py
Signals
-------
- (Data)
- (Experiment)
**Outputs**:
- (Data)
- (Experiment)
Description
-----------
TODO
Define the geometry of the experiment.
Used especially to feat dimension and define missing metadata
Mapping
=======
.. snapshotqt:: orangecontrib/id06workflow/widgets/screenshots/metadata_table_screenshot.py
Signals
-------
- (Experiment)
**Outputs**:
- no output
Description
-----------
Display the metadata contained in the dataset
Shift Correction
================
.. snapshotqt:: orangecontrib/id06workflow/widgets/screenshots/shift.py
.. snapshotqt:: orangecontrib/id06workflow/widgets/screenshots/shift_screenshot.py
......@@ -12,9 +12,9 @@ Signals
**Outputs**:
- (Data)
- (Data, Image)
Description
-----------
TODO
generate image shift
......@@ -63,7 +63,7 @@ class GeometryMainWidget(qt.QWidget):
self.layout().addWidget(self._twoThetaGeo)
def setSetupGeometry(self, geometry):
# TODO: in the futur will depend on the geometry type
# TODO: in the future will depend on the geometry type
self._twoThetaGeo.setSetupGeometry(geometry)
def getSetupGeometry(self):
......
from silx.gui import qt
def screenshot():
from orangecontrib.id06workflow.widgets.geometry import GeometryMainWidget
import os
from id06workflow.core.Dataset import Dataset
from id06workflow.core.experiment import Experiment
app = qt.QApplication.instance() or qt.QApplication([])
widget = GeometryMainWidget(parent=None)
# TODO: create a more realsitic dataset or store one on edna-site
try:
root_folder = '/nobackup/linazimov/payno/datasets/id06/strain_scan'
data_file_pattern = os.path.join(root_folder,
'reduced_strain/strain_0000.edf')
data_bb_files = []
bb_folder = os.path.join(root_folder, 'bg_ff_5s_1x1')
for _file in os.listdir(bb_folder):
data_bb_files.append(os.path.join(bb_folder, _file))
dataset = Dataset(data_files_pattern=data_file_pattern,
ff_files=data_bb_files)
experiment = Experiment(dataset=dataset, geometry=None)
widget.setExperiment(experiment)
except:
pass
widget.resize(500, 800)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
from orangecontrib.id06workflow.widgets.mapping import MappingOW
from id06workflow.test import utils
app = qt.QApplication.instance() or qt.QApplication([])
widget = MappingOW()
# TODO: create a more realsitic dataset or store one on edna-site
_map = utils.createRandomMap((200, 200))
widget._process(_map)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
from orangecontrib.id06workflow.widgets.metadatatable import MetadataTableOW
import os
from id06workflow.core.Dataset import Dataset
from id06workflow.core.experiment import Experiment
app = qt.QApplication.instance() or qt.QApplication([])
widget = MetadataTableOW()
# TODO: create a more realsitic dataset or store one on edna-site
try:
root_folder = '/nobackup/linazimov/payno/datasets/id06/strain_scan'
data_file_pattern = os.path.join(root_folder,
'reduced_strain/strain_0000.edf')
data_bb_files = []
bb_folder = os.path.join(root_folder, 'bg_ff_5s_1x1')
for _file in os.listdir(bb_folder):
data_bb_files.append(os.path.join(bb_folder, _file))
dataset = Dataset(data_files_pattern=data_file_pattern,
ff_files=data_bb_files)
experiment = Experiment(dataset=dataset, geometry=None)
widget._process(experiment)
except:
pass
widget.resize(800, 400)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
from orangecontrib.id06workflow.widgets.shiftcorrection import ShiftCorrectionOW
import os
from id06workflow.core.Dataset import Dataset
from id06workflow.core.experiment import Experiment
app = qt.QApplication.instance() or qt.QApplication([])
widget = ShiftCorrectionOW()
# TODO: create a more realsitic dataset or store one on edna-site
try:
root_folder = '/nobackup/linazimov/payno/datasets/id06/strain_scan'
data_file_pattern = os.path.join(root_folder,
'reduced_strain/strain_0000.edf')
data_bb_files = []
bb_folder = os.path.join(root_folder, 'bg_ff_5s_1x1')
for _file in os.listdir(bb_folder):
data_bb_files.append(os.path.join(bb_folder, _file))
dataset = Dataset(data_files_pattern=data_file_pattern,
ff_files=data_bb_files)
experiment = Experiment(dataset=dataset, geometry=None)
widget._process(experiment)
widget._widget._stack._browser.setValue(46)
except:
pass
widget.resize(800, 800)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
Markdown is supported
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