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
08a9fa8d
"auto/Examples/ff/SphericalSegment.py" did not exist on "588d19399695cb2c4c6bae2ed5ae127278f0ff2a"
Commit
08a9fa8d
authored
4 years ago
by
Wuttke, Joachim
Committed by
Wuttke, Joachim
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
corr run_and_plot, persistence..py
parent
983aae48
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tests/Functional/Python/PyPersistence/PyPersistence.py.in
+6
-5
6 additions, 5 deletions
Tests/Functional/Python/PyPersistence/PyPersistence.py.in
Wrap/Python/plot_utils.py
+2
-2
2 additions, 2 deletions
Wrap/Python/plot_utils.py
with
8 additions
and
7 deletions
Tests/Functional/Python/PyPersistence/PyPersistence.py.in
+
6
−
5
View file @
08a9fa8d
...
...
@@ -33,7 +33,7 @@ def get_simulation_DepthProbe():
"""
Returns custom simulation in the case of depth probe.
"""
simulation = example.get_simulation()
simulation = example.get_simulation(
example.get_sample()
)
beam = simulation.beam()
wavelength = beam.wavelength()
incl_axis = simulation.getAlphaAxis()
...
...
@@ -50,7 +50,7 @@ def get_simulation_RectangularGrating():
Returns custom simulation for RectangularGrating.py.
Contains smaller detector to make MC integration happy on all platforms
"""
simulation = example.get_simulation()
simulation = example.get_simulation(
example.get_sample()
)
simulation.setDetectorParameters(5, -0.01*ba.deg, 0.01*ba.deg, 6, 0.0, 0.02*ba.deg)
return simulation
...
...
@@ -61,7 +61,7 @@ def get_simulation_GenericExample():
The idea is that all other example's setting related to the simulation (MC integration flags,
threads settings etc) remains intact.
"""
simulation = example.get_simulation()
simulation = example.get_simulation(
example.get_sample()
)
detector = simulation.detector()
# preserving axes range, making less bins
...
...
@@ -107,11 +107,12 @@ def run_simulation():
# create minified simulation object
global simulationObject
simulation
Object
= get_minified_simulation()
simulation = get_minified_simulation()
# INJECTION HERE: replacing get_simulation() method of example with local method
example.get_simulation = adjusted_simulation
return example.run_simulation()
simulation.runSimulation()
return simulation.result()
def get_reffile_name(example_name):
...
...
This diff is collapsed.
Click to expand it.
Wrap/Python/plot_utils.py
+
2
−
2
View file @
08a9fa8d
...
...
@@ -213,6 +213,6 @@ def plot_simulation_result(result, **kwargs):
if
not
(
postpone_show
):
plt
.
show
()
def
run_and_plot
(
simulation
):
def
run_and_plot
(
simulation
,
**
kwargs
):
simulation
.
runSimulation
()
ba
.
plot_simulation_result
(
simulation
.
result
())
plot_simulation_result
(
simulation
.
result
()
,
**
kwargs
)
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