Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- from scipy.interpolate import interp1d
- import matplotlib.pyplot as plt
- # Known QE points from a digitized curve (example values)
- wavelength = np.array([900, 1000, 1200, 1400, 1600, 1700]) # nm
- qe_values = np.array([0.1, 0.6, 0.85, 0.8, 0.5, 0.1]) # QE values (0 to 1)
- # Interpolate the curve
- qe_curve = interp1d(wavelength, qe_values, kind='cubic', fill_value="extrapolate")
- # Generate QE values for full range
- lambda_range = np.linspace(900, 1700, 500)
- qe_interpolated = qe_curve(lambda_range)
- # Plot the interpolated QE curve
- plt.plot(lambda_range, qe_interpolated, label="Interpolated QE Curve")
- plt.scatter(wavelength, qe_values, color='red', label="Known Points")
- plt.xlabel("Wavelength (nm)")
- plt.ylabel("Quantum Efficiency (QE)")
- plt.title("InGaAs QE Curve")
- plt.legend()
- plt.grid()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement