We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use case without one:
from scipy.stats import linregress import matplotlib.pyplot as plt I_V = MeasuredFunction(swp.data['Voltage (V)'], swp.data['Current (mA)']) def get_R_parallel(I_V): linear_region = I_V.crop([0, 0.3]) slope, intercept, r_value, p_value, std_err = linregress(linear_region.absc, linear_region.ordi) return 1 / slope * 1000 R_mod = get_R_mod(I_V) print(f"Modulator's parallel resistance: {R_mod:.2f}Ω") I_V_mod = I_V - MeasuredFunction(swp.data['Voltage (V)'], swp.data['Voltage (V)'] / R_mod * 1000) I_V_mod.simplePlot() plt.xlabel('Voltage (V)') plt.ylabel('Current (mA)') plt.show() plt.figure() plt.semilogy(I_V_mod.absc, np.abs(I_V_mod.ordi)) plt.xlabel('Voltage (V)') plt.ylabel('Current (mA)') plt.show() def get_R_series(I_V): linear_region = I_V.crop([1.1, 1.2]) slope, intercept, r_value, p_value, std_err = linregress(linear_region.absc, linear_region.ordi) return 1 / slope * 1000 R_series = get_R_series(I_V) print(f"Modulator's series resistance: {R_series:.2f}Ω")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Use case without one:
The text was updated successfully, but these errors were encountered: