Skip to content

Commit

Permalink
fix missing to_json export of computed_number_of_channels
Browse files Browse the repository at this point in the history
The parameter was introduced in commit 9736f7c
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 <[email protected]>
Change-Id: I221a6f614010edea9cf46c3a7d43c5be064ff09c
  • Loading branch information
EstherLerouzic committed Jun 1, 2024
1 parent 44040c4 commit fbb2f2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gnpy/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fbb2f2c

Please sign in to comment.