From 9c95fd6b69d81a59869217efff2c51f33d3237ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Mon, 27 May 2019 18:35:14 +0200 Subject: [PATCH] Do not mix THz and Hz While the `itufl()` function uses THz by default, its values depend on the frequency range that is passed via arguments. In this context, the f_min and f_max come from the default SpectralInformation which is in Hz. Thanks to @ojnas for reporting this. fixes #243 --- gnpy/core/elements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnpy/core/elements.py b/gnpy/core/elements.py index a845b150..c22bb39e 100644 --- a/gnpy/core/elements.py +++ b/gnpy/core/elements.py @@ -573,7 +573,7 @@ class Edfa(Node): self.channel_freq, self.nf, self.interpol_dgt and self.interpol_gain_ripple """ # TODO|jla: read amplifier actual frequencies from additional params in json - amplifier_freq = itufl(len(self.params.dgt), self.params.f_min, self.params.f_max) * 1e12 # Hz + amplifier_freq = itufl(len(self.params.dgt), self.params.f_min, self.params.f_max) # Hz self.channel_freq = frequencies self.interpol_dgt = interp(self.channel_freq, amplifier_freq, self.params.dgt)