def residualFunc(pars, hPocket, ePocket, rzz_0, rzz_15, rzz_30, rzz_45): h_gamma_0 = pars["h_gamma_0"].value e_gamma_0 = pars["e_gamma_0"].value gamma_dos = pars["gamma_dos"].value gamma_k = pars["gamma_k"].value power = pars["power"].value mu = pars["mu"].value M = pars["M"].value print("h_gamma_0 = ", h_gamma_0) print("e_gamma_0 = ", e_gamma_0) print("gamma_dos = ", gamma_dos) print("gamma_k = ", gamma_k) print("power = ", power) print("mu = ", mu) print("M = ", M) power = int(power) if power % 2 == 1: power += 1 start_total_time = time.time() # hPocket hPocket.mu = mu hPocket.M = M hPocket.discretize_FS(mesh_xy_rough=501) hPocket.dos_k_func() hPocket.doping() hPocketCondObject = Conductivity(hPocket, Bamp=45, gamma_0=h_gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) # ePocket ePocket.mu = mu ePocket.M = M ePocket.discretize_FS(mesh_xy_rough=501) ePocket.dos_k_func() ePocket.doping() ePocketCondObject = Conductivity(ePocket, Bamp=45, gamma_0=e_gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) ADMRObject = ADMR([hPocketCondObject, ePocketCondObject]) ADMRObject.Btheta_array = Btheta_array ADMRObject.runADMR() print("ADMR time : %.6s seconds \n" % (time.time() - start_total_time)) diff_0 = rzz_0 - ADMRObject.rzz_array[0, :] diff_15 = rzz_15 - ADMRObject.rzz_array[1, :] diff_30 = rzz_30 - ADMRObject.rzz_array[2, :] diff_45 = rzz_45 - ADMRObject.rzz_array[3, :] return np.concatenate((diff_0, diff_15, diff_30, diff_45))
def residualFunc(pars, bandObject, rzz_0, rzz_15, rzz_30, rzz_45): gamma_0 = pars["gamma_0"].value gamma_dos = pars["gamma_dos"].value gamma_k = pars["gamma_k"].value power = pars["power"].value mu = pars["mu"].value M = pars["M"].value print("gamma_0 = ", gamma_0) print("gamma_dos = ", gamma_dos) print("gamma_k = ", gamma_k) print("power = ", power) print("mu = ", mu) print("M = ", M) power = int(power) if power % 2 == 1: power += 1 start_total_time = time.time() bandObject.mu = mu bandObject.M = M bandObject.discretize_FS() bandObject.dos_k_func() bandObject.doping() condObject = Conductivity(bandObject, Bamp=45, gamma_0=gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) ADMRObject = ADMR([condObject]) ADMRObject.Btheta_array = Btheta_array ADMRObject.runADMR() print("ADMR time : %.6s seconds" % (time.time() - start_total_time)) diff_0 = rzz_0 - ADMRObject.rzz_array[0, :] diff_15 = rzz_15 - ADMRObject.rzz_array[1, :] diff_30 = rzz_30 - ADMRObject.rzz_array[2, :] diff_45 = rzz_45 - ADMRObject.rzz_array[3, :] return np.concatenate((diff_0, diff_15, diff_30, diff_45))
power = out.params["power"].value mu = out.params["mu"].value ## Compute ADMR with final parameters from the fit bandObject.mu = mu bandObject.discretize_FS() bandObject.dos_k_func() bandObject.doping() condObject = Conductivity(bandObject, Bamp=45, gamma_0=gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) ADMRObject = ADMR([condObject]) ADMRObject.Btheta_array = Btheta_array ADMRObject.runADMR() ADMRObject.fileADMR(folder="data_NdLSCO_0p21") #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<# ## Figures ////////////////////////////////////////////////////////////////# #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>># #///// RC Parameters //////# mpl.rcdefaults() mpl.rcParams['font.size'] = 24. # change the size of the font in every figure mpl.rcParams['font.family'] = 'Arial' # font Arial in every figure mpl.rcParams['axes.labelsize'] = 24. mpl.rcParams['xtick.labelsize'] = 24 mpl.rcParams['ytick.labelsize'] = 24 mpl.rcParams['xtick.direction'] = "in"