Add tx_osnr in spectral information

This change enables to use a different tx_osnr per carrier.

If tx_osnr is defined via spectrum then use it to define a tx_osnr per
carrier in si else use the tx_osnr of request to set tx_osnr of si.

Then, the propagate function for requests is changed to update OSNR with
tx_OSNR per carrier defined in si.

TODO: The tx_osnr defined in spectrum is not yet taken into account for
the propagate_and_optimize function, because the loop that optimizes
the choice for the mode only loops on baudrate.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0fcdf559d4f1f8f0047faa257076084ec7adcc77
This commit is contained in:
EstherLerouzic
2022-08-18 11:20:17 +02:00
parent e143d25339
commit bd6b278dd1
7 changed files with 46 additions and 25 deletions

View File

@@ -28,7 +28,7 @@ def test_fiber():
# fix grid spectral information generation
spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15,
baud_rate=32e9, power=1e-3, spacing=50e9)
baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0)
# propagation
spectral_info_out = fiber(spectral_info_input)
@@ -49,7 +49,7 @@ def test_fiber():
spectral_info_input = create_arbitrary_spectral_information(frequency=frequency, slot_width=slot_width,
signal=signal, baud_rate=baud_rate, roll_off=0.15,
delta_pdb_per_channel=delta_pdb_per_channel,
ref_power=pref)
tx_osnr=40.0, ref_power=pref)
# propagation
spectral_info_out = fiber(spectral_info_input)
@@ -67,7 +67,7 @@ def test_raman_fiber():
""" Test the accuracy of propagating the RamanFiber."""
# spectral information generation
spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15,
baud_rate=32e9, power=1e-3, spacing=50e9)
baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0)
SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json'))
fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json'))
@@ -104,7 +104,7 @@ def test_fiber_lumped_losses_srs(set_sim_params):
""" Test the accuracy of Fiber with lumped losses propagation."""
# spectral information generation
spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15,
baud_rate=32e9, power=1e-3, spacing=50e9)
baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0)
SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json'))
fiber = Fiber(**load_json(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber_config.json'))