Skip to content
Snippets Groups Projects
Commit b13de559 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

corr

parent 15644d14
No related branches found
No related tags found
1 merge request!773new mechanism to steer simulation size in examples and tests, based on command-line argument sim_n
...@@ -19,12 +19,14 @@ def get_sample(): ...@@ -19,12 +19,14 @@ def get_sample():
return std_samples.alternating_layers() return std_samples.alternating_layers()
def get_simulation(sample, scan_size=500): def get_simulation(sample, **simargs):
""" """
Defines and returns specular simulation Defines and returns specular simulation
with a qz-defined beam with a qz-defined beam
""" """
qzs = np.linspace(0.01, 1, scan_size) # qz-values n = simargs['n']
qzs = np.linspace(0.01, 1, n) # qz-values
dq = 0.03*qzs dq = 0.03*qzs
n_sig = 2.0 n_sig = 2.0
n_samples = 25 n_samples = 25
...@@ -42,7 +44,7 @@ def get_simulation(sample, scan_size=500): ...@@ -42,7 +44,7 @@ def get_simulation(sample, scan_size=500):
if __name__ == '__main__': if __name__ == '__main__':
plotargs, simargs = bp.kwargs_from_cmdline(sim_n=0) plotargs, simargs = bp.kwargs_from_cmdline(sim_n=500)
sample = get_sample() sample = get_sample()
simulation = get_simulation(sample, **simargs) simulation = get_simulation(sample, **simargs)
result = simulation.simulate() result = simulation.simulate()
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment