[solver]
km = 0.6
kr =  0.6
use pop mult = False
pop mult = 3
pop size = 50
use max generations = False
max generations = 500
max generation mult = 6
use start guess = True
use boundaries = True
sleep time = 0.5
max log elements = 100000
use parallel processing = False
parallel processes = 2
parallel chunksize = 1
use autosave = False
save all evals = False
autosave interval = 10
create trial = best_1_bin
errorbar level = 1.05
allowed fom discrepancy = 1e-10
ignore fom nan = True
ignore fom inf = True

[data commands]
names = A Example; Default; Simulation
x commands = x+33; x; arange(0.01, 6, 0.01)
y commands = y/1e5; y; arange(0.01, 6, 0.01)*0
e commands = e/2.; e; arange(0.01, 6, 0.01)*0

[data handling]
toggle show = True
data loader = default

[parameters]
registred classes = Layer;Stack;Sample;Instrument;UserVars;Surface;Bulk
set func = set

[plugins]
loaded plugins = Reflectivity;SimpleLayer

[data plot]
zoom = True
autoscale = True
y scale = log
x scale = lin

[fom plot]
zoom = False
autoscale = True
y scale = lin
x scale = lin

[pars plot]
zoom = False
autoscale = True
y scale = lin
x scale = lin

[fom scan plot]
zoom = False
autoscale = True
y scale = lin
x scale = lin

[startup]
show profiles = True
script = 	['from numpy import *',
	'import models.spec_nx as model',
	'from models.utils import UserVars, fp, fw, bc, bw',
	'',
	'# BEGIN Instrument DO NOT CHANGE',
	'from models.utils import create_fp, create_fw',
	"inst = model.Instrument(probe='x-ray', wavelength=1.54, coords='tth', I0=1.0, res=0.001, restype='no conv', respoints=5, resintrange=2, beamw=0.01, footype='no corr', samplelen=10.0, incangle=0.0, pol='uu', Ibkg=0.0, tthoff=0.0,)",
	'inst_fp = create_fp(inst.wavelength); inst_fw = create_fw(inst.wavelength)',
	'',
	'fp.set_wavelength(inst.wavelength); fw.set_wavelength(inst.wavelength)',
	'# END Instrument',
	'',
	'# BEGIN Sample DO NOT CHANGE',
	'Amb = model.Layer(sigma=0.0, dens=1.0, d=0.0, f=(1e-20+1e-20j), b=0j, xs_ai=0.0, magn=0.0, magn_ang=0.0)',
	'Fe = model.Layer(sigma=0.0, dens=6.0/80.4475, d=200.0, f=fp.Fe*1, b=bc.Fe*1, xs_ai=0.0, magn=0.0, magn_ang=0.0)',
	'Sub = model.Layer(sigma=0.0, dens=46.0/(10.227**3), d=0.0, f=fp.Si*1, b=bc.Si*1, xs_ai=0.0, magn=0.0, magn_ang=0.0)',
	'',
	'ML = model.Stack(Layers=[Fe], Repetitions = 1)',
	'',
	'sample = model.Sample(Stacks = [ML], Ambient = Amb, Substrate = Sub)',
	'# END Sample',
	'',
	'# BEGIN Parameters DO NOT CHANGE',
	'cp = UserVars()',
	'# END Parameters',
	'',
	'SLD = []',
	'def Sim(data):',
	'    I = []',
	'    SLD[:] = []',
	'    # BEGIN Dataset 0 DO NOT CHANGE',
	'    d = data[0]',
	'    I.append(sample.SimSpecular(d.x, inst))',
	'    if _sim: SLD.append(sample.SimSLD(None, None, inst))',
	'    # END Dataset 0',
	'    return I']
