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
ixstools
xrstools
Commits
5a39cd57
Commit
5a39cd57
authored
Oct 29, 2020
by
christoph
Browse files
difference image possible in SumDirect
parent
d0d105e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
XRStools/xrs_read.py
View file @
5a39cd57
...
@@ -434,7 +434,7 @@ class Hydra:
...
@@ -434,7 +434,7 @@ class Hydra:
print
(
"Integrating pixelwise "
+
scan
)
print
(
"Integrating pixelwise "
+
scan
)
self
.
scans
[
scan
].
apply_rois_pw
(
self
.
roi_obj
)
self
.
scans
[
scan
].
apply_rois_pw
(
self
.
roi_obj
)
def
SumDirect
(
self
,
scan_numbers
):
def
SumDirect
(
self
,
scan_numbers
,
index
=
None
):
""" **SumDirect**
""" **SumDirect**
Creates a summed 2D image of a given scan or list of scans.
Creates a summed 2D image of a given scan or list of scans.
...
@@ -463,9 +463,18 @@ class Hydra:
...
@@ -463,9 +463,18 @@ class Hydra:
en_column
=
en_column
,
moni_column
=
self
.
moni_column
)
en_column
=
en_column
,
moni_column
=
self
.
moni_column
)
if
im_sum
is
None
:
if
im_sum
is
None
:
im_sum
=
np
.
zeros
(
scan
.
edfmats
[
0
].
shape
,
"f"
)
im_sum1
=
np
.
zeros
(
scan
.
edfmats
[
0
].
shape
,
"f"
)
im_sum
[:]
+=
scan
.
edfmats
.
sum
(
axis
=
0
)
im_sum2
=
np
.
zeros
(
scan
.
edfmats
[
0
].
shape
,
"f"
)
return
im_sum
if
not
index
:
im_sum1
[:]
+=
scan
.
edfmats
.
sum
(
axis
=
0
)
else
:
im_sum1
[:]
+=
scan
.
edfmats
[
0
:
index
,:,:].
sum
(
axis
=
0
)
im_sum2
[:]
+=
scan
.
edfmats
[
index
:,:,:].
sum
(
axis
=
0
)
if
not
index
:
return
im_sum1
else
:
return
im_sum2
-
im_sum1
def
get_eloss_new
(
self
,
method
=
'sum'
):
def
get_eloss_new
(
self
,
method
=
'sum'
):
""" **get_eloss_new**
""" **get_eloss_new**
...
...
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