Skip to content
GitLab
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
6635dbbb
Commit
6635dbbb
authored
Nov 12, 2020
by
myron
Browse files
adjusted renormalisation of resynthetised reference scan for spots going outside the detector
parent
f74b6598
Changes
2
Hide whitespace changes
Inline
Side-by-side
XRStools/XRS_swissknife.py
View file @
6635dbbb
...
...
@@ -1288,18 +1288,25 @@ def loadscan_2Dimages_galaxies_foilscan(mydata):
hf
[
"image"
]
=
roiob
.
input_image
rois_dict_group
=
hf
.
require_group
(
"rois_dict"
)
for
roikey
,
(
origin
,
box
)
in
roiob
.
red_rois
.
items
():
roigroup
=
roikey
+
"/"
hf
.
require_group
(
roigroup
)
hf
[
roigroup
+
"origin"
]
=
origin
hf
[
roigroup
+
"mask"
]
=
box
if
roikey
in
rois_dict_group
:
del
rois_dict_group
[
roikey
]
rois_dict_group
[
roikey
]
=
h5py
.
SoftLink
(
"/"
+
roigroup
)
filename
,
dataname
=
split_hdf5_address
(
mydata
[
"expdata"
]
)
data
=
np
.
array
(
h5py
.
File
(
filename
,
"r"
)[
dataname
][:])
for
roikey
,
(
origin
,
box
)
in
roiob
.
red_rois
.
items
():
roigroup
=
roikey
[
3
:]
+
"/"
# with "ROI" removed, nly numerical part
...
...
@@ -3946,6 +3953,10 @@ def superR_recreate_rois(mydata):
## where new rois and bnew scan are written
target_filename : "newrois.h5:ROI_B_FIT8/"
## filter_rois=1 activates a filtering mechanism which discards ROIS according to a
## simple statistical criteria which is har coded in file reponse_percussionelle.py
## routine get_spots_list
filter_rois : 1
"""
foil_scan_address
=
mydata
[
"old_scan_address"
]
...
...
XRStools/reponse_percussionelle.py
View file @
6635dbbb
...
...
@@ -1433,7 +1433,9 @@ def DOROIS(filename = "../nonregressions/demo_imaging.hdf5" , groupname = "ROI_B
for
i
in
range
(
len
(
newspots
)):
newspots
[
i
]
=
newspots
[
i
]
/
newspots
[
i
].
sum
()
spot_sum
=
newspots
[
i
].
sum
()
if
spot_sum
:
newspots
[
i
]
=
newspots
[
i
]
/
spot_sum
h5
[
"matrix"
]
=
newspots
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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