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
73f91de8
Commit
73f91de8
authored
Oct 29, 2020
by
myron
Browse files
corrected roi numbering in non regression script non_reg_testing_XRS.py
parent
b8712718
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
nonregressions/h2o_sum_lq_ref.dat
View file @
73f91de8
This diff is collapsed.
Click to expand it.
nonregressions/non_reg_testing_XRS.py
View file @
73f91de8
...
...
@@ -145,6 +145,17 @@ else:
roi
=
w4r
.
getRoiObj
()
roi
.
writeH5
(
os
.
path
.
join
(
rois_path
,
'ROI_widget_roi.H5'
))
###############################################################################################"
# reduce roi groups to those elements which are found in roi and with the right indexing
rois_there
=
list
(
roi
.
red_rois
.
keys
())
rois_there
.
sort
()
rois_there_num
=
list
(
map
(
int
,
[
""
.
join
(
[
c
for
c
in
rkey
if
c
.
isdigit
()
]
)
for
rkey
in
rois_there
]
)
)
highq
=
[
rois_there_num
.
index
(
rnum
)
for
rnum
in
highq
if
rnum
in
rois_there_num
]
medq
=
[
rois_there_num
.
index
(
rnum
)
for
rnum
in
medq
if
rnum
in
rois_there_num
]
lowq
=
[
rois_there_num
.
index
(
rnum
)
for
rnum
in
lowq
if
rnum
in
rois_there_num
]
##########################################################################
# load data, use sum-algorithm
##########################################################################
...
...
@@ -164,7 +175,7 @@ lw_ex = xrs_extraction.edge_extraction(lw,['H2O'],[1.0],{'O':['K']})
print
(
"QUI 1 "
)
# O edge low-q
lw_ex
.
analyzerAverage
(
lowq
,
errorweighing
=
False
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
250.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.07743447e+03
,
8.42895443e+02
,
4.99035465e+01
,
3193e+01
,
-
3.80090286e-07
,
2.73774370e-03
,
5.11920401e+03
],
scaling
=
1.2
,
show_plots
=
Tru
e
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
250.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.07743447e+03
,
8.42895443e+02
,
4.99035465e+01
,
3193e+01
,
-
3.80090286e-07
,
2.73774370e-03
,
5.11920401e+03
],
scaling
=
1.2
,
show_plots
=
Fals
e
)
lw_ex
.
save_average_Sqw
(
os
.
path
.
join
(
save_path
,
'h2o_sum_lq.dat'
),
emin
=
00.0
,
emax
=
610.0
,
normrange
=
[
520.
,
600.
])
print
(
"QUI OK"
)
...
...
nonregressions/non_reg_testing_XRS_small.py
View file @
73f91de8
...
...
@@ -177,7 +177,7 @@ lw_ex = xrs_extraction.edge_extraction(lw,['H2O'],[1.0],{'O':['K']})
lw_ex
.
analyzerAverage
(
lowq
,
errorweighing
=
False
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
250.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.07743447e+03
,
8.42895443e+02
,
4.99035465e+01
,
3193e+01
,
-
3.80090286e-07
,
2.73774370e-03
,
5.11920401e+03
],
scaling
=
1.2
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
250.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.07743447e+03
,
8.42895443e+02
,
4.99035465e+01
,
3193e+01
,
-
3.80090286e-07
,
2.73774370e-03
,
5.11920401e+03
],
scaling
=
1.2
,
show_plots
=
False
)
lw_ex
.
save_average_Sqw
(
os
.
path
.
join
(
save_path
,
'h2o_sum_lq_small.dat'
),
emin
=
00.0
,
emax
=
610.0
,
normrange
=
[
520.
,
600.
])
...
...
@@ -215,7 +215,7 @@ check_results( os.path.join(save_path,'h2o_sum_lq_small.dat') , "h2o_sum_lq_smal
# O edge med-q
lw_ex
.
analyzerAverage
(
medq
,
errorweighing
=
False
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
300.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.39664220e+03
,
1.03655696e+03
,
7.67728511e+02
,
7.30355600e+02
,
7.93995221e-04
,
-
4.76580011e-01
,
-
1.37652621e+03
],
scaling
=
1.2
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
300.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.39664220e+03
,
1.03655696e+03
,
7.67728511e+02
,
7.30355600e+02
,
7.93995221e-04
,
-
4.76580011e-01
,
-
1.37652621e+03
],
scaling
=
1.2
,
show_plots
=
False
)
lw_ex
.
save_average_Sqw
(
save_path
+
'/h2o_sum_mq_small.dat'
,
emin
=
0.0
,
emax
=
610.0
,
normrange
=
[
520.0
,
600.0
])
...
...
@@ -224,7 +224,7 @@ check_results( os.path.join(save_path,'h2o_sum_mq_small.dat') , "h2o_sum_mq_smal
# O edge high-q
lw_ex
.
analyzerAverage
(
highq
,
errorweighing
=
False
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
52.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
guess
=
[
3.40779687e+02
,
2.57030454e+02
,
1.27747244e+03
,
4.55875194e-01
,
-
8.59501907e-06
,
1.39969288e-02
,
2.60071705e+00
],
HFcore_shift
=-
5.0
,
scaling
=
1.55
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
52.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
guess
=
[
3.40779687e+02
,
2.57030454e+02
,
1.27747244e+03
,
4.55875194e-01
,
-
8.59501907e-06
,
1.39969288e-02
,
2.60071705e+00
],
HFcore_shift
=-
5.0
,
scaling
=
1.55
,
show_plots
=
False
)
lw_ex
.
save_average_Sqw
(
save_path
+
'/h2o_sum_hq_small.dat'
,
emin
=
0.0
,
emax
=
600.0
,
normrange
=
[
520.0
,
600.0
])
...
...
@@ -259,7 +259,7 @@ lw_ex = xrs_extraction.edge_extraction(lw,['H2O'],[1.0],{'O':['K']})
# O edge low-q
lw_ex
.
analyzerAverage
(
lowq
,
errorweighing
=
False
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
250.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.07743447e+03
,
8.42895443e+02
,
4.99035465e+01
,
3193e+01
,
-
3.80090286e-07
,
2.73774370e-03
,
5.11920401e+03
],
scaling
=
1.2
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
250.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.07743447e+03
,
8.42895443e+02
,
4.99035465e+01
,
3193e+01
,
-
3.80090286e-07
,
2.73774370e-03
,
5.11920401e+03
],
scaling
=
1.2
,
show_plots
=
False
)
lw_ex
.
save_average_Sqw
(
save_path
+
'/h2o_pixel_lq_small.dat'
,
emin
=
00.0
,
emax
=
610.0
,
normrange
=
[
520.
,
600.
])
check_results
(
os
.
path
.
join
(
save_path
,
'h2o_pixel_lq_small.dat'
)
,
"h2o_pixel_lq_small.dat.ref"
)
...
...
@@ -268,7 +268,7 @@ check_results( os.path.join(save_path,'h2o_pixel_lq_small.dat') , "h2o_pixel_lq_
# O edge med-q
lw_ex
.
analyzerAverage
(
medq
,
errorweighing
=
False
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
300.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.39664220e+03
,
1.03655696e+03
,
7.67728511e+02
,
7.30355600e+02
,
7.93995221e-04
,
-
4.76580011e-01
,
-
1.37652621e+03
],
scaling
=
1.2
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
300.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
HFcore_shift
=-
5.0
,
guess
=
[
-
1.39664220e+03
,
1.03655696e+03
,
7.67728511e+02
,
7.30355600e+02
,
7.93995221e-04
,
-
4.76580011e-01
,
-
1.37652621e+03
],
scaling
=
1.2
,
show_plots
=
False
)
lw_ex
.
save_average_Sqw
(
save_path
+
'/h2o_pixel_mq_small.dat'
,
emin
=
0.0
,
emax
=
610.0
,
normrange
=
[
520.0
,
600.0
])
check_results
(
os
.
path
.
join
(
save_path
,
'h2o_pixel_mq_small.dat'
)
,
"h2o_pixel_mq_small.dat.ref"
)
...
...
@@ -276,7 +276,7 @@ check_results( os.path.join(save_path,'h2o_pixel_mq_small.dat') , "h2o_pixel_mq_
# O edge high-q
lw_ex
.
analyzerAverage
(
highq
,
errorweighing
=
False
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
52.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
guess
=
[
3.40779687e+02
,
2.57030454e+02
,
1.27747244e+03
,
4.55875194e-01
,
-
8.59501907e-06
,
1.39969288e-02
,
2.60071705e+00
],
HFcore_shift
=-
5.0
,
scaling
=
1.55
)
lw_ex
.
removeCorePearsonAv
(
'O'
,
'K'
,[
52.0
,
534.0
],[
570.0
,
600.0
],
weights
=
[
2
,
1
],
guess
=
[
3.40779687e+02
,
2.57030454e+02
,
1.27747244e+03
,
4.55875194e-01
,
-
8.59501907e-06
,
1.39969288e-02
,
2.60071705e+00
],
HFcore_shift
=-
5.0
,
scaling
=
1.55
,
show_plots
=
False
)
lw_ex
.
save_average_Sqw
(
save_path
+
'/h2o_pixel_hq_small.dat'
,
emin
=
0.0
,
emax
=
600.0
,
normrange
=
[
520.0
,
600.0
])
check_results
(
os
.
path
.
join
(
save_path
,
'h2o_pixel_hq_small.dat'
)
,
"h2o_pixel_hq_small.dat.ref"
)
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