m = pars[0] b = pars[1] # unpack model constants # N/A return mxplusb(x, m, b) myOBE.model_function = mxplsub_wrapper # settings, parameters and constants # define the measurement setting space # 101 possible x values xsettings = np.linspace(0, 1, 201) # sent it to myOBE packaged as a tuple myOBE.sets = (xsettings, ) # define the parameter space mvals = np.linspace(-1, 1, 501) bvals = np.linspace(-1, 1, 501) # package as a tuple and send myOBE.pars = (mvals, bvals) # Settings, parameters, constants all defined, so set it all up myOBE.config() """ MEASUREMENT SIMULATION """ # secret stuff - to be used only by the measurement simulator # pick the parameters of the true resonance
# unpack model constants d = cons[0] return lorentz_peak(x, x0, A, B, d) """Connect it to myOBE""" myOBE.model_function = my_model_function """ Settings and Parameters and Constants (oh My!) """ # define the measurement setting space # 50 values between 1.5 and 4.5 (GHz) xvals = np.linspace(1.5, 4.5, 200) # tell it to the BOE # sets, pars, cons are all expected to be tuples myOBE.sets = (xvals, ) # define the parameter space where the peak could be found # resonance values x0 (like NV frequency) around 3 GHz x0min = 2 x0max = 4 x0vals = np.linspace(x0min, x0max, 201) # peak amplitude Amin = -2000 Amax = -40000 Avals = np.linspace(Amin, Amax, 101) # background Bmin = 275000 Bmax = 225000 Bvals = np.linspace(Bmin, Bmax, 151)
return rabicounts(pulsetime, delta_f, B1, f_center, baseline, contrast, T1) myOBE.model_function = my_model_function """ settings and parameter and constants """ # define the measurement setting space # 101 delay times up to 1 us pulsetime = np.linspace(0, 1, 101) # 101 detunings (MHz) detune = np.linspace(-10, 10, 101) # tell it to the BOE myOBE.sets = (pulsetime, detune) # define the parameter space where the peak could be found # Rabi freuquency B1min = 1 B1max = 5 B1 = np.linspace(B1min, B1max, 71) fc_min = -7 fc_max = 7 f_center = np.linspace(fc_min, fc_max, 71) # baseline = np.linspace(50000, 60000, 51) # contrast = np.linspace(.05, .15, 11) myOBE.pars = (B1, f_center) param_extent = (B1min, B1max, fc_min, fc_max) baseline = 100000