from typing import List import numpy as np import optcom as oc medium: str = "sio2" dopant: str = "yb" A_doped: float = oc.PI * 25.0 # With float omega: float = oc.lambda_to_omega(1000) core_radius: float = 5.0 sellmeier: oc.Sellmeier = oc.Sellmeier(medium) n_clad: float = 1.44 NA_inst: oc.NumericalAperture = oc.NumericalAperture(sellmeier, n_clad) v_nbr_inst: oc.VNumber = oc.VNumber(NA_inst, core_radius) A_eff_inst: oc.EffectiveArea = oc.EffectiveArea(v_nbr_inst, core_radius) sigma_a_inst: oc.AbsorptionSection = oc.AbsorptionSection(dopant, medium) of_inst: oc.OverlapFactor = oc.OverlapFactor(A_eff_inst, A_doped) N: float = 0.01 gain: oc.DopedFiberGain = oc.DopedFiberGain(sigma_a_inst, of_inst, N) print(gain(omega)) sigma_a: float = sigma_a_inst(omega) of: float = of_inst(omega) print(oc.DopedFiberGain.calc_doped_fiber_gain(sigma_a, of, N)) # With np.ndarray N_0 = 0.01 N_1 = 0.011 absorp_inst: oc.DopedFiberGain = oc.DopedFiberGain(sigma_a_inst, of_inst, N_0)
import numpy as np import optcom as oc medium: str = "sio2" dopant: str = "yb" A_doped: float = oc.PI * 25.0 # um^2 A_core: float = A_doped # um^2 P_pump: float = 0.001 # W tau: float = 840.0 # us # With float omega: float = oc.lambda_to_omega(1000) core_radius: float = 5.0 # um n_core: oc.Sellmeier = oc.Sellmeier(medium) n_clad: float = 1.44 NA_inst: oc.NumericalAperture = oc.NumericalAperture(n_core, n_clad) v_nbr_inst: oc.VNumber = oc.VNumber(NA_inst, core_radius) A_eff_inst: oc.EffectiveArea = oc.EffectiveArea(v_nbr_inst, core_radius) of_inst: oc.OverlapFactor = oc.OverlapFactor(A_eff_inst, A_doped) sigma_a_inst: oc.AbsorptionSection = oc.AbsorptionSection(dopant=dopant, medium=medium) T: float = 293.1 # K sigma_e_inst: oc.EmissionSection = oc.EmissionSection(dopant=dopant, medium=medium, T=T, sigma_a=sigma_a_inst) recov_t: oc.FiberRecoveryTime = oc.FiberRecoveryTime( A_core, sigma_a_inst, sigma_e_inst, of_inst, P_pump, tau) print(recov_t(omega)) A_eff: float = A_eff_inst(omega) sigma_a: float = sigma_a_inst(omega)