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/939829fd7148731a6bd945dc6396665f98ba8a938d6feaf61085ae002ea8aac7.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/6279535387d3cfd46d77f9341287510f48e6f3490a3173e9036484fdcf1602fc.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/9ddfd4123f7aab77ae25d1f0457e8d8c9ec6a8bbfc5776c4eccf66d52556714e.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/1e47b9d3a51348a79a3229e993b1cdc973d5bd094d78ab3604482cb28ade889b.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/cb0f6b63b49ba5e7f46c5d1e17e693026061b7ccab3699419f211f3c4125d9ce.png