From fbb2f2c587d4bcd30421884ad28b0a2083ecc808 Mon Sep 17 00:00:00 2001 From: EstherLerouzic Date: Sat, 1 Jun 2024 09:12:33 +0200 Subject: [PATCH] fix missing to_json export of computed_number_of_channels The parameter was introduced in commit 9736f7c032fb6d19ef61151509c723082cc9f545 but the export to_json was not added. In the next commits, it is necessary to compute Raman gain during the design phase. The sim-params used for this computation are updated during the design phase for speed reasons. To ensure the proper restoration of user settings for propagation, the export must include all parameters. Therefore, this commit adds 'computed_number_of_channels' to the JSON export. This allows for the accurate recording of all user settings locally and enables their restoration. Signed-off-by: EstherLerouzic Change-Id: I221a6f614010edea9cf46c3a7d43c5be064ff09c --- gnpy/core/parameters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnpy/core/parameters.py b/gnpy/core/parameters.py index 851ee6e3e..76735c8e9 100644 --- a/gnpy/core/parameters.py +++ b/gnpy/core/parameters.py @@ -74,7 +74,8 @@ def to_json(self): return {"method": self.method, "dispersion_tolerance": self.dispersion_tolerance, "phase_shift_tolerance": self.phase_shift_tolerance, - "computed_channels": self.computed_channels} + "computed_channels": self.computed_channels, + "computed_number_of_channels": self.computed_number_of_channels} class SimParams(Parameters):