From 87f27dc88649ee933a08748f08973ee531a1d0c1 Mon Sep 17 00:00:00 2001 From: EstherLerouzic Date: Fri, 24 May 2024 10:11:36 +0200 Subject: [PATCH] fix science utils doc and missing json attribute Signed-off-by: EstherLerouzic Change-Id: I9a77763d4464bb19095faa47288e3248aea6dd63 --- docs/json.rst | 6 ++++++ gnpy/core/parameters.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/json.rst b/docs/json.rst index 6e536e6b7..ef09cbf35 100644 --- a/docs/json.rst +++ b/docs/json.rst @@ -337,6 +337,12 @@ See ``delta_power_range_db`` for more explaination. | | | from `arXiv:1710.02225 | | | | `_). | +---------------------------------------------+-----------+---------------------------------------------+ +| ``dispersion_tolerance`` | (number) | Optional. In ? Tuning parameter for ggn | +| | | model solution. Default value: 1 | ++---------------------------------------------+-----------+---------------------------------------------+ +| ``phase_shift_tolerance`` | (number) | Optional. In ? Tuning parameter for ggn | +| | | model solution. Defaut value: 0.1 | ++---------------------------------------------+-----------+---------------------------------------------+ | ``nli_params.computed_channels`` | (list | Optional. The exact channel indices | | | of | (starting from 1) on which the NLI is | | | numbers) | explicitly evaluated. | diff --git a/gnpy/core/parameters.py b/gnpy/core/parameters.py index 1689c644c..28bfc1089 100644 --- a/gnpy/core/parameters.py +++ b/gnpy/core/parameters.py @@ -61,6 +61,8 @@ def __init__(self, method='gn_model_analytic', dispersion_tolerance=1, phase_shi :params dispersion_tolerance: tuning parameter for ggn model solution :params phase_shift_tolerance: tuning parameter for ggn model solution :params computed_channels: the NLI is evaluated for these channels and extrapolated for the others + :params computed_number_of_channels: the NLI is evaluated for this nb of channels equally distributed + in the spectrum and extrapolated for the others """ self.method = method.lower() self.dispersion_tolerance = dispersion_tolerance @@ -72,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):