Skip to content

Commit

Permalink
fix science utils doc and missing json attribute
Browse files Browse the repository at this point in the history
Signed-off-by: EstherLerouzic <[email protected]>
Change-Id: I9a77763d4464bb19095faa47288e3248aea6dd63
  • Loading branch information
EstherLerouzic committed May 24, 2024
1 parent ee9af69 commit 87f27dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ See ``delta_power_range_db`` for more explaination.
| | | from `arXiv:1710.02225 |
| | | <https://arxiv.org/abs/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. |
Expand Down
5 changes: 4 additions & 1 deletion gnpy/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 87f27dc

Please sign in to comment.