This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
def pdm(x): | |
n = len(x) | |
y = np.zeros(n) | |
error = np.zeros(n+1) | |
for i in range(n): | |
y[i] = 1 if x[i] >= error[i] else 0 | |
error[i+1] = y[i] - x[i] + error[i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from matplotlib import pyplot as plt | |
R0 = 10E3 # Ohm | |
# https://www.thorlabs.com/drawings/781769f975857712-CFFE0B13-BE04-E334-3F539B30BADD4590/TH10K-SpecSheet.pdf | |
a = 3.3540170E-3 | |
b = 2.5617244E-4 | |
c = 2.1400943E-6 | |
d = -7.2405219E-9 |