Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
fb901cf3
Commit
fb901cf3
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
repair plot_diff_int
parent
56a9a8a4
No related branches found
No related tags found
1 merge request
!1022
repair image viewer scripts
Pipeline
#74818
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devtools/view/plot_diff_int.py
+8
-8
8 additions, 8 deletions
devtools/view/plot_diff_int.py
with
8 additions
and
8 deletions
devtools/view/plot_diff_int.py
+
8
−
8
View file @
fb901cf3
...
...
@@ -11,10 +11,10 @@ import sys
def
plot_diff_int
(
filename1
,
filename2
):
intensity_ref
=
ba
.
IOFactory
.
read
IntensityData
(
filename1
)
intensity_other
=
ba
.
IOFactory
.
read
IntensityData
(
filename2
)
data
=
2
*
np
.
abs
(
intensity_ref
.
a
rray
()
-
intensity_other
.
a
rray
())
\
/
(
np
.
abs
(
intensity_ref
.
a
rray
())
+
np
.
abs
(
intensity_other
.
a
rray
()))
intensity_ref
=
ba
.
IOFactory
.
read
Datafield
(
filename1
)
intensity_other
=
ba
.
IOFactory
.
read
Datafield
(
filename2
)
data
=
2
*
np
.
abs
(
intensity_ref
.
npA
rray
()
-
intensity_other
.
npA
rray
())
\
/
(
np
.
abs
(
intensity_ref
.
npA
rray
())
+
np
.
abs
(
intensity_other
.
npA
rray
()))
if
data
.
max
()
==
0
:
exit
(
"
Both data sets are equal, there is nothing to plot.
"
)
vmax
=
data
.
max
()
...
...
@@ -24,10 +24,10 @@ def plot_diff_int(filename1, filename2):
rank
=
intensity_ref
.
rank
()
if
rank
==
2
:
pid
.
plot_raw_data_2d
(
data
,
[
intensity_ref
.
x
M
in
()
/
ba
.
deg
,
intensity_ref
.
x
M
ax
()
/
ba
.
deg
,
intensity_ref
.
y
M
in
()
/
ba
.
deg
,
intensity_ref
.
y
M
ax
()
/
ba
.
deg
intensity_ref
.
x
Axis
().
m
in
()
/
ba
.
deg
,
intensity_ref
.
x
Axis
().
m
ax
()
/
ba
.
deg
,
intensity_ref
.
y
Axis
().
m
in
()
/
ba
.
deg
,
intensity_ref
.
y
Axis
().
m
ax
()
/
ba
.
deg
],
True
,
vmin
,
vmax
)
elif
rank
==
1
:
axis_values
=
np
.
asarray
(
intensity_ref
.
xAxis
().
binCenters
())
/
ba
.
deg
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment