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/89a36c4478b10d545acbdf53bf11d55a6e3e2c80c945d5c24e12a41743c2aa81.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/1ac6ccfb0cd1256e8cd116d81c3ebc50c94a97043ef457f9d0e1672e07cf236c.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/49c16c3a20e8b338714ee7b5b5324213d2afebe8b7094cb6d4ce60de862646a6.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/b02c9f83303095fd48101e52c081b3bcf76159e826aa283c29e370b569378157.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/9df7d4f75a39732b0f3eee3981f3a47a54068430f6d8c83b2c124b98acdc1e6f.png