def plotscans_overlay_lu(autofit): for f in autofit: plt.plot( autofit[f][4][: len(autofit[f][4].Field) // 4].Field, ap.model(autofit[f][3][2][0], autofit[f][4][: len(autofit[f][4].Field) // 4].Field, f), autofit[f][4][: len(autofit[f][4].Field) // 4].Field, autofit[f][4][: len(autofit[f][4].Field) // 4].X, ) plt.ylabel("Vmix ($\mu$V)") plt.xlabel("Field (T)") plt.title("Negative field sweep and fit") plt.show() for f in autofit: plt.plot( autofit[f][4][len(autofit[f][4].Field) // 2 : len(autofit[f][4].Field) // 4 * 3].Field, ap.model( autofit[f][3][1][0], autofit[f][4][len(autofit[f][4].Field) // 2 : len(autofit[f][4].Field) // 4 * 3].Field, f, ), autofit[f][4][len(autofit[f][4].Field) // 2 : len(autofit[f][4].Field) // 4 * 3].Field, autofit[f][4][len(autofit[f][4].Field) // 2 : len(autofit[f][4].Field) // 4 * 3].X, ) plt.ylabel("Vmix ($\mu$V)") plt.xlabel("Field (T)") plt.title("Positive field sweep and fit") plt.show()
def plotscans(autofit, f): plt.plot( autofit[f][4][: len(autofit[f][4].Field) // 2].Field, ap.model(autofit[f][3][2][0], autofit[f][4][: len(autofit[f][4].Field) // 2].Field, f), autofit[f][4][: len(autofit[f][4].Field) // 2].Field, autofit[f][4][: len(autofit[f][4].Field) // 2].X, ) plt.ylabel("Vmix ($\mu$V)") plt.xlabel("Field (T)") plt.title("Negative field sweep and fit") plt.show() r = ( ap.model(autofit[f][3][2][0], autofit[f][4].Field, f)[: len(autofit[f][4].Field) // 2] - autofit[f][4][: len(autofit[f][4].Field) // 2].X ) plt.hist(r.values, bins=25, histtype="stepfilled") plt.title("Fit Residuals") plt.show() plt.plot( autofit[f][4][len(autofit[f][4].Field) // 2 :].Field, ap.model(autofit[f][3][1][0], autofit[f][4][len(autofit[f][4].Field) // 2 :].Field, f), autofit[f][4][len(autofit[f][4].Field) // 2 :].Field, autofit[f][4][len(autofit[f][4].Field) // 2 :].X, ) plt.ylabel("Vmix ($\mu$V)") plt.xlabel("Field (T)") plt.title("Positive field sweep and fit") plt.show() r = ( ap.model(autofit[f][3][1][0], autofit[f][4][len(autofit[f][4].Field) // 2 :].Field, f) - autofit[f][4][len(autofit[f][4].Field) // 2 :].X ) plt.hist(r.values, bins=25, histtype="stepfilled") plt.title("Fit Residuals") plt.show()