-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagating partial spectral load #506
Comments
Dear @abhiman84 , GNPY does not currently consider more than one SI in the SI block. If you wish to propagate different types of channels within the spectrum you must use the --spectrum option. The definition in spectrum file is a bit different from SI (although similar): should be like that:
see documentation here for the detailed explanation of each attribute: I am not sure to understand correctly your example: the line command:
is missing the positional topology attribute : gnpy/example-data/raman_edfa_example_network.json, the sim_params.json file is missing the --sim-params option... I think the command should rather be something like:
with spectrum_file.json the file where you have defined the spectrum you want to propagate. Hope this help! regards |
Thank you for your comments. The issue is clarified. |
The issue reported here is similar to
#456
Instead of propagating full spectrum load, I want to propagate selective spectrum for my simulation. For this purpose, I modified the SI block in ./usr/local/lib/python3.9/site-packages/gnpy/example-data/eqpt_config.json as:
"SI":[{
"f_min": 191.3e12,
"baud_rate": 32e9,
"f_max":192.1e12,
"spacing": 50e9,
"power_dbm": 0,
"power_range_db": [0,0,1],
"roll_off": 0.15,
"tx_osnr": 40,
"sys_margins": 2
},{
"f_min": 193.3e12,
"baud_rate": 32e9,
"f_max":194.1e12,
"spacing": 50e9,
"power_dbm": 0,
"power_range_db": [0,0,1],
"roll_off": 0.15,
"tx_osnr": 40,
"sys_margins": 2
}
],
Then run the command : gnpy-transmission-example$(gnpy-example-data)/raman_edfa_example_network.json --sim $ (gnpy-example-data)/sim_params.json --show-channels
But, I get the following error :
gnpy-transmission-example
(gnpy-example-data)/sim_params.json --show-channels
There are 16 channels propagating
Power mode is set to True
=> it can be modified in eqpt_config.json - Span
<class 'numpy.ndarray'>
Traceback (most recent call last):
File "/usr/local/bin/gnpy-transmission-example", line 8, in
sys.exit(transmission_main_example())
File "/usr/local/lib/python3.9/site-packages/gnpy/tools/cli_examples.py", line 243, in transmission_main_example
design_network(ref_req, network, equipment, set_connector_losses=True, verbose=True)
File "/usr/local/lib/python3.9/site-packages/gnpy/core/network.py", line 775, in design_network
build_network(network, equipment, pref_ch_db, pref_total_db, set_connector_losses=set_connector_losses,
File "/usr/local/lib/python3.9/site-packages/gnpy/core/network.py", line 762, in build_network
set_egress_amplifier(network, roadm, equipment, pref_ch_db, pref_total_db, verbose)
File "/usr/local/lib/python3.9/site-packages/gnpy/core/network.py", line 318, in set_egress_amplifier
node_loss = span_loss(network, prev_node, equipment)
File "/usr/local/lib/python3.9/site-packages/gnpy/core/network.py", line 244, in span_loss
gain += sum(estimate_raman_gain(n, equipment) for n in prev_node_generator(network, node))
File "/usr/local/lib/python3.9/site-packages/gnpy/core/network.py", line 244, in
gain += sum(estimate_raman_gain(n, equipment) for n in prev_node_generator(network, node))
File "/usr/local/lib/python3.9/site-packages/gnpy/core/network.py", line 229, in estimate_raman_gain
spectral_info_out = n_copy(spectral_info_input)
File "/usr/local/lib/python3.9/site-packages/gnpy/core/elements.py", line 676, in call
self.propagate(spectral_info)
File "/usr/local/lib/python3.9/site-packages/gnpy/core/elements.py", line 724, in propagate
spectral_info.nli += NliSolver.compute_nli(spectral_info, stimulated_raman_scattering, self)
File "/usr/local/lib/python3.9/site-packages/gnpy/core/science_utils.py", line 311, in compute_nli
eta = NliSolver._ggn_spectrally_separated(cut_indices, spectral_info, fiber, srs)
File "/usr/local/lib/python3.9/site-packages/gnpy/core/science_utils.py", line 392, in _ggn_spectrally_separated
gamma = outer(fiber.gamma(frequency[cut_indices]), ones(nch))
IndexError: index 17 is out of bounds for axis 0 with size 16
I got same error when using -spectrum option in the command line and specifying the same channels as in SI block of eqpt_config.json as above.
Kindly advise, thanks
The text was updated successfully, but these errors were encountered: