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
f74c53c5
Commit
f74c53c5
authored
Aug 10, 2021
by
Julia Garriga Ferrer
Browse files
[app][ows_to_script] Set first filename directory as _dir if it's not given
parent
4fd2295c
Pipeline
#52388
passed with stage
in 5 minutes and 2 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
darfix/app/ows_to_script.py
View file @
f74c53c5
...
...
@@ -120,6 +120,7 @@ if __name__ == '__main__':
filenames=filenames,
copy_files=True, in_memory=not options.in_disk)
else:
_dir = _dir if _dir != None else os.path.dirname(options.first_filename)
dataset = Dataset(_dir=_dir,
first_filename=options.first_filename,
copy_files=True, in_memory=not options.in_disk)
...
...
darfix/core/dataset.py
View file @
f74c53c5
...
...
@@ -1302,7 +1302,7 @@ class Dataset():
H
,
W
=
self
.
get_data
(
0
).
shape
if
self
.
dims
.
ndim
==
1
and
kind
==
"rsm"
:
if
self
.
dims
.
ndim
==
1
and
kind
==
"rsm"
:
ffz
=
self
.
get_metadata_values
(
POSITIONER_METADATA
,
"ffz"
)[
0
]
mainx
=
-
self
.
get_metadata_values
(
POSITIONER_METADATA
,
"mainx"
)[
0
]
self
.
transformation
=
compute_rsm
(
H
,
W
,
d
,
ffz
,
mainx
)
...
...
orangecontrib/darfix/widgets/transformation.py
View file @
f74c53c5
...
...
@@ -120,17 +120,16 @@ class TransformationWidgetOW(OWWidget):
self
.
controlArea
.
layout
().
addWidget
(
self
.
_widget
)
self
.
_widget
.
setDataset
(
*
self
.
_dataset
)
def
_sendSignal
(
self
):
"""
Emits the signal with the new dataset.
"""
if
hasattr
(
self
.
_widget
,
'magnification'
):
self
.
magnification
=
self
.
_widget
.
magnification
self
.
kind
=
False
self
.
kind
=
False
elif
hasattr
(
self
.
_widget
,
'pixelSize'
):
self
.
pixelSize
=
self
.
_widget
.
pixelSize
self
.
rotate
=
self
.
_widget
.
rotate
self
.
kind
=
True
self
.
kind
=
True
self
.
close
()
self
.
Outputs
.
dataset
.
send
(
self
.
_widget
.
getDataset
())
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