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
XRD
darfix
Commits
d1f3e818
Commit
d1f3e818
authored
Jul 16, 2021
by
Julia Garriga Ferrer
Browse files
[core][process] Add _GrainPlot class
parent
748a2c3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/core/process.py
View file @
d1f3e818
...
...
@@ -31,13 +31,16 @@ Orange workflow and later be converted to a script without the GUI part needed.
__authors__
=
[
"J. Garriga"
]
__license__
=
"MIT"
__date__
=
"
23/11
/202
0
"
__date__
=
"
16/07
/202
1
"
import
numpy
from
collections
import
namedtuple
from
silx.gui
import
qt
from
darfix.core
import
utils
from
darfix.gui.blindSourceSeparationWidget
import
Method
from
darfix.gui.grainPlotWidget
import
GrainPlotWidget
_input_desc
=
namedtuple
(
"_input_desc"
,
[
"name"
,
"type"
,
"handler"
,
"doc"
])
...
...
@@ -241,3 +244,21 @@ class _RockingCurves:
def
set_properties
(
self
,
properties
):
self
.
_properties
=
properties
class
_GrainPlot
:
inputs
=
[
_input_desc
(
name
=
'dataset'
,
type
=
tuple
,
handler
=
'process'
,
doc
=
'dataset to process'
),
]
outputs
=
[
_output_desc
(
name
=
'dataset'
,
type
=
tuple
,
doc
=
'dataset to process'
),
]
def
process
(
self
,
dataset
):
app
=
qt
.
QApplication
([])
widget
=
GrainPlotWidget
()
if
dataset
:
widget
.
setDataset
(
*
dataset
)
widget
.
setAttribute
(
qt
.
Qt
.
WA_DeleteOnClose
)
widget
.
show
()
app
.
exec_
()
return
dataset
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