Example #1
0
def plotdict(datadict, fitdict):
    for curr in sorted(datadict.keys()):
        for freq in sorted(datadict[curr].keys()):
            print(("DC current = %f A" % curr, "Frequency = %f GHz" % freq))
            plt.plot(
                datadict[curr][freq].field,
                ap.dlor_model(fitdict[curr][freq][0], datadict[curr][6].field),
                datadict[curr][freq].field,
                datadict[curr][6].l1x,
            )
            plt.ylabel(" dVmix/dB ($\mu$V)")
            plt.xlabel("Field (T)")
            plt.title("Negative field sweep and fit")
            plt.show()
            plt.hist(
                ap.dlor_model(fitdict[curr][freq][0], datadict[curr][6].field) - datadict[curr][6].l1x,
                bins=50,
                histtype="stepfilled",
            )
            plt.title("Fit Residuals")
            plt.show()
Example #2
0
def plotdict_overlay(datadict, fitdict, prescale=5000):
    for curr in sorted(datadict.keys()):
        for freq in sorted(datadict[curr].keys()):
            plt.plot(
                datadict[curr][freq].field,
                ap.dlor_model(fitdict[curr][freq][0], datadict[curr][6].field) + curr * prescale,
                datadict[curr][freq].field,
                datadict[curr][6].l1x + curr * prescale,
            )
            plt.ylabel(" dVmix/dB ($\mu$V)")
            plt.xlabel("Field (T)")
            plt.title("Negative field sweep and fit")
    plt.show()