<jupyter_start><jupyter_text>Data Processing Part one Laser<jupyter_code>from matplotlib import pyplot as plt
import pandas as pd
import numpy as np
from scipy.optimize import curve_fit

def linear(x, k, b):
    return np.multiply(k, x) + b

df = pd.read_excel("Experimental data.xlsx",index_col=None, header=None)
tableOneLaser = np.array(df.iloc[3:11,2:4].values).T.tolist()

popt, pcov = curve_fit(linear, tableOneLaser[0], tableOneLaser[1])
plt.plot(tableOneLaser[0], linear(tableOneLaser[0], popt[0], popt[1]), 'r-', label='fit: k=%5.3f, b=%5.3f' % tuple(popt))
plt.plot(tableOneLaser[0],tableOneLaser[1],'o')
plt.legend()
plt.xlabel('P, мощность накачки')
plt.ylabel('I, ток генерации')
plt.title('Лазер')
plt.show()<jupyter_output><empty_output><jupyter_text>Red LED<jupyter_code>tableOneRed = np.array(df.iloc[18:23,2:4].values).T.tolist()
popt, pcov = curve_fit(linear, tableOneRed[0], tableOneRed[1])
plt.plot(tableOneRed[0], linear(tableOneRed[0], popt[0], popt[1]), 'r-', label='fit: k=%5.3f, b=%5.3f' % tuple(popt))
plt.plot(tableOneRed[0],tableOneRed[1],'o')
plt.legend()
plt.xlabel('P, мощность накачки')
plt.ylabel('I, ток генерации')
plt.title('Красный светодиод')
plt.show()
tableOneGreen = np.array(df.iloc[33:38,2:4].values).T.tolist()
popt, pcov = curve_fit(linear, tableOneGreen[0], tableOneGreen[1])
plt.plot(tableOneGreen[0],linear(tableOneGreen[0],popt[0], popt[1]),'r-',label='fit: k=%5.3f, b=%5.3f' % tuple(popt))
plt.plot(tableOneGreen[0], tableOneGreen[1], 'o')
plt.legend()
plt.xlabel('P, мощность накачки')
plt.ylabel('I, ток генерации')
plt.title('Зеленый светодиод')
plt.show()<jupyter_output><empty_output><jupyter_text>Part two Laser<jupyter_code>tablesLaser1=np.array(df.iloc[7:16,11:13].values).T.tolist()
tablesLaser2=np.array(df.iloc[21:37,11:13].values).T.tolist()
tablesLaser3=np.array(df.iloc[42:54,11:13].values).T.tolist()<jupyter_output><empty_output><jupyter_text>Sine we approximate ou points with Gaussian fit, we have to bring the formula<jupyter_code>def model(x, ampl, x0, sigma):
    return ampl * np.exp( - ((x - x0) / sigma) ** 2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19063386944181646, 'fraction_numerical': 0.03878902554399243, 'mean_word_length': 8.0, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '356355', 'license': 'MIT', 'n_tokens_mistral': 955, 'n_tokens_neox': 921, 'n_words': 140, 'path': 'Photonics_Labs/7_sem/Semiconductor Injection Laser/Data processing.ipynb', 'repo_name': 'BotirShox/Labs', 'size': '2114'}