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
1837c6a9
Commit
1837c6a9
authored
8 months ago
by
AlQuemist
Browse files
Options
Downloads
Patches
Plain Diff
fx Wrap/Python/src/bornagain/ba_fitmonitor.py
parent
feee844e
No related branches found
No related tags found
1 merge request
!2718
Introduce a new Numpy interface (Major change)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Wrap/Python/src/bornagain/ba_fitmonitor.py
+6
-4
6 additions, 4 deletions
Wrap/Python/src/bornagain/ba_fitmonitor.py
with
6 additions
and
4 deletions
Wrap/Python/src/bornagain/ba_fitmonitor.py
+
6
−
4
View file @
1837c6a9
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
import
bornagain
as
ba
import
bornagain
as
ba
from
bornagain
import
ba_plot
as
bp
from
bornagain
import
ba_plot
as
bp
from
bornagain.numpyutil
import
Arrayf64Converter
as
dac
try
:
# workaround for build servers
try
:
# workaround for build servers
import
numpy
as
np
import
numpy
as
np
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
...
@@ -80,7 +82,7 @@ class PlotterGISAS(Plotter):
...
@@ -80,7 +82,7 @@ class PlotterGISAS(Plotter):
self
.
make_subplot
(
1
)
self
.
make_subplot
(
1
)
# same limits for both plots
# same limits for both plots
arr
=
da
ta
.
np
Array
()
arr
=
da
c
.
asNpArray
(
data
.
data
Array
()
)
zmax
=
np
.
amax
(
arr
)
if
self
.
_zmax
is
None
else
self
.
_zmax
zmax
=
np
.
amax
(
arr
)
if
self
.
_zmax
is
None
else
self
.
_zmax
zmin
=
zmax
*
1e-6
if
self
.
_zmin
is
None
else
self
.
_zmin
zmin
=
zmax
*
1e-6
if
self
.
_zmin
is
None
else
self
.
_zmin
...
@@ -154,9 +156,9 @@ class PlotterSpecular:
...
@@ -154,9 +156,9 @@ class PlotterSpecular:
sim_data
=
fit_objective
.
simulationResult
().
plottableField
()
sim_data
=
fit_objective
.
simulationResult
().
plottableField
()
# data values
# data values
sim_values
=
sim_data
.
np
Array
()
sim_values
=
dac
.
asNpArray
(
sim_data
.
data
Array
()
)
exp_values
=
exp_data
.
np
Array
()
exp_values
=
dac
.
asNpArray
(
exp_data
.
data
Array
()
)
unc_values
=
exp_data
.
npE
rrors
()
unc_values
=
dac
.
asNpArray
(
exp_data
.
e
rrors
()
)
# default font properties dictionary to use
# default font properties dictionary to use
font
=
{
'
size
'
:
16
}
font
=
{
'
size
'
:
16
}
...
...
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