mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-11-02 11:07:57 +00:00
Computes reference input power in fiber during design
input power is computed at design time: so let's record it and use it instead of p_span_i for reference channel fiber loss computation. Note that this loss parameter is only used for visualisation purpose. Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I16bd792bd6079ce521aafadcf5e21922aa3b4c81
This commit is contained in:
@@ -483,6 +483,7 @@ class Fiber(_Node):
|
||||
f"({1e-3 * self.params.length} km), boundaries excluded.")
|
||||
self.lumped_losses = db2lin(- lumped_losses_power) # [linear units]
|
||||
self.z_lumped_losses = array(z_lumped_losses) * 1e3 # [m]
|
||||
self.ref_pch_in_dbm = None
|
||||
|
||||
@property
|
||||
def to_json(self):
|
||||
@@ -691,6 +692,12 @@ class Fiber(_Node):
|
||||
self._psig_in = sum(spectral_info.signal)
|
||||
self.propagate(spectral_info)
|
||||
self.update_pref(spectral_info)
|
||||
# In case of Raman, the resulting loss of the fiber is not equivalent to self.loss
|
||||
# because of Raman gain. The resulting loss is:
|
||||
# power_out - power_in. We use the total signal power (sum on all channels) to compute
|
||||
# this loss.
|
||||
loss = round(lin2db(self._psig_in / sum(spectral_info.signal)), 2)
|
||||
self.pch_out_db = self.ref_pch_in_dbm - loss
|
||||
return spectral_info
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user