mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-11-01 10:38:10 +00:00
Fiber latency calculation
Fiber latency evaluated during propagation. The speed of ligth in fiber is evaluated as the vacuum speed of ligth divided by the core reflective index n1. The latency in the transceiver is evaluated in ms. Change-Id: I7a3638c49f346aecaf1d4897cecf96d345fdb26c
This commit is contained in:
@@ -158,6 +158,7 @@ class FiberParams(Parameters):
|
||||
self._beta3 = ((self.dispersion_slope - (4*pi*c/self.ref_wavelength**3) * self.beta2) /
|
||||
(2*pi*c/self.ref_wavelength**2)**2)
|
||||
self._effective_area = kwargs.get('effective_area') # m^2
|
||||
self._n1 = 1.468
|
||||
n2 = 2.6e-20 # m^2/W
|
||||
if self._effective_area:
|
||||
self._gamma = kwargs.get('gamma', 2 * pi * n2 / (self.ref_wavelength * self._effective_area)) # 1/W/m
|
||||
@@ -177,6 +178,7 @@ class FiberParams(Parameters):
|
||||
self._loss_coef = asarray(kwargs['loss_coef']) * 1e-3 # lineic loss dB/m
|
||||
self._f_loss_ref = asarray(self._ref_frequency) # Hz
|
||||
self._lumped_losses = kwargs['lumped_losses'] if 'lumped_losses' in kwargs else []
|
||||
self._latency = self._length / (c / self._n1) # s
|
||||
except KeyError as e:
|
||||
raise ParametersError(f'Fiber configurations json must include {e}. Configuration: {kwargs}')
|
||||
|
||||
@@ -261,6 +263,10 @@ class FiberParams(Parameters):
|
||||
def raman_efficiency(self):
|
||||
return self._raman_efficiency
|
||||
|
||||
@property
|
||||
def latency(self):
|
||||
return self._latency
|
||||
|
||||
def asdict(self):
|
||||
dictionary = super().asdict()
|
||||
dictionary['loss_coef'] = self.loss_coef * 1e3
|
||||
|
||||
Reference in New Issue
Block a user