Data analysis DBR

Data analysis DBR#

We analyze the following DBR samples from the edx course

import matplotlib.pyplot as plt

import ubcpdk
from ubcpdk.data.dbr import dbrs
w, p = ubcpdk.data.read_mat(dbrs["1_10"], 1)
plt.plot(w * 1e9, p)
plt.xlim([1530, 1600])
(1530.0, 1600.0)
../_images/e09024c8c32bd44c7a3680fff15d176374648296b51007dc052e3e7e207d0614.png
for key in dbrs.keys():
    w, p = ubcpdk.data.read_mat(dbrs[key], 1)
    # plt.figure()
    # plt.title(key)
    plt.plot(w * 1e9, p, label=key)
    plt.xlim([1530, 1600])
../_images/88178643eaaf2900fda7108fc4a046371df03e4c2e1389ff4c8e8beb6d3d9214.png
import matplotlib.pyplot as plt
import numpy as np

from ubcpdk import data
from ubcpdk.data.dbr import dbrs

r1_names = [f"1_{i}" for i in list(range(1, 12, 2))]
r1_dw = [5, 10, 20, 40, 60, 80]
s1_names = [f"1_{i}" for i in list(range(2, 12, 2))]
s1_dw = [200, 180, 160, 140, 120]

r2_names = [f"2_{i}" for i in list(range(13, 24, 2))]
r2_dw = [100, 120, 140, 160, 180, 200]
s2_names = [f"2_{i}" for i in list(range(12, 25, 2))]
s2_dw = [100, 80, 60, 40, 20, 10, 5]

r4_names = [f"4_{i}" for i in list(range(1, 25, 2))]
r4_dw = list(range(20, 32))
s4_names = [f"4_{i}" for i in list(range(2, 25, 2))]
s4_dw = list(range(31, 19, -1))


def find_banwidths(names, dw, title=None):
    bw = np.zeros_like(names, dtype=float)
    for i, key in enumerate(names):
        w, p = data.read_mat(dbrs[key], port=1)
        wc, pc = data.chop(w, p, ymin=-60)
        pw = data.windowed_mean(pc)
        bw[i] = data.find_bandwidth(wc, pw)

    plt.plot(dw, bw * 1e9, ".-")
    plt.xlabel("dw (nm)")
    plt.ylabel("bandwidth (nm)")
    if title:
        plt.title(title)


bw = find_banwidths(r1_names, r1_dw, title="rectangular DBR")
../_images/cbf66ed9f9e87ed0652fbd8edb0b7b36d88cfcace9246825a087c3d474c50d3f.png
bw = find_banwidths(r1_names, r1_dw, title="rectangular DBR")
bw = find_banwidths(r2_names, r2_dw, title="rectangular DBR")
bw = find_banwidths(r4_names, r4_dw, title="rectangular DBR")
../_images/c277be01e4f010a1d83509ec5cf9cf813675290c28970343c278065172149199.png
bw = find_banwidths(s1_names, s1_dw, title="sinusoidal DBR")
bw = find_banwidths(s2_names, s2_dw, title="sinusoidal DBR")
bw = find_banwidths(s4_names, s4_dw, title="sinusoidal DBR")
../_images/96305200a54b1a89b52b2ca53d53deb55341124a20311f11f8ef6ea647142432.png