Update the program because the same Path_request class is called
that now includes this bidir field
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
As agreed upon during today's coders call, this is something that is
needed by actual users in the field, so let's prioritize their needs
over clarity of output for demo purposes.
Esther and Jonas pointed out that it is much more common to work with
OSNR measurements per 0.1nm rather than per signal bandwidth. This is in
line with what OSAs usually report and what transponder datasheets
specify.
cc #307
Various presentations from Polito are slowly changing to use "GSNR" as a
"Generalized SNR", but it's true that our code does not use this term
anywhere, and that it is not properly explained. Let's wait a bit for
this term to become a bit more mainstream and for updated docs on our
side; then this commit can be safely reverted.
Thanks to Jonas for reporting this.
I think that this SNR value represents the most important output of this
example. There's plenty of debugging info on display already, so let's
make this one more prominent.
I was thinking about moving the highlighting to elements' each __str__()
function, but that felt a bit like layering violation to me. I could
have also changed just the transponder's __str__(). In the end, I think
that repeating just the final GSNR at the link-end transponder makes
most sense here. This is aligned with what we talked about at
yesterday's (on 2019-09-18 -- note that this is a backport from #261)
demo for Microsoft, after all.
This is inspired by #293. The original issue was that the transponder
OSNR was not accounted for. Rather than making the propagate() and
propagate2() more complex, let's move the actual path printing to the
demo code. There's no secret sauce in there, it's just a simple
for-each-print thingy, so let's remove it from the library code.
fixes#262
- Avoid recalculating SNRs in transmission main example since they are already calculated and stored in the Transceiver class
- Also include per channel power (useful for checking tilt) and OSNR ASE in the output
As Jonas pointed out, the code used to contain a check for non-nan
values, effectively skipping channels where the Raman gain was not
explicitly computed.
Now that we do not introduce NaNs into some channels anymore, this
shortcut no longer works. We could either add explicit filtering for
only showing those channels which are covered by the Raman engine, but
then the result would be rather confusing in the non-Raman case. One
could also add another column with the simulated vs. approximated NLI,
but when I tried this, the output looked a bit cluttered.
I think that the best course of action for now is to just show info
about all channels (if asked by the user). So this is just a cleanup for
a condition which is now always on.
There were just these substantial differences:
- the Raman code showed a per-channel SNR summary, this is now
controlled via the `--show-channels` option
- when a Raman fiber is used the `--sim` option for specifying input
simulation parameters is now mandatory
I'm therefore merging these two files even though we've rpeviously
decided not to do this -- consult the review comment at
https://github.com/Telecominfraproject/oopt-gnpy/pull/263#discussion_r310506082
and the discussion during this Tuesday's coders call). If this turns out
to be a problem for autodesign, we can always revert this.
One possible catch is that the final "SNR total" shows NaN for the
default Raman example. That's just the way the simulation engine works
right now, I'm afraid. The `--show-channels` options helps a lot.
I have no idea which one of the existing pypi modules is best for these,
and given that we're using just two escape codes, I think it makes sense
not to bother with a more capable third-party module just for two magic
strings.
Once the actual config-parsing code start raising these exceptions
instead of directly calling sys.exit(), the user experience would
deteriorate due to raw exception traces. There's little value in the
trace itself, so just wrap the whole config loading with pretty error
formatting.
We still do not point to a specific place where that error is defined
(such as a line/column in a given JSON file) because that information is
already lost by the time we perform these checks.
Also, these checks are largely open-coded ad-hoc stuff. Some required
items are not covered, raising KeyError instead. We should get a formal
schema for these...
save and be able to retrieve the carrier information processed by Edfa
and Fiber elements:
@ input & output of the element
- channel power: ase, nli, signal and total
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
adding the counting feature on standard output
adding tsp nb in csv + small bug fixes
small fixes to improve stdout and csv printing
small bug fixes on service aggregation and automatic correction of names
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
-Promote incremental and iterative network design
-Automatic saving of a "network-name_auto_design.json" file
-Results of the autodesign (additional amplifiers, configuration) are
saved to this ..._auto_design.json file
-This file can then be used to run a new simulation just like a normal
json input file
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
align the behaviour of
eqpt_config[SI].power_range_db
with
eqpt_config[Spans].delta_power_range_db
so that the min and max excursions are taken into account (which was not the case
when using range or arange for the SI power excursion)
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
power range sweep fix
fix behaviour when power range length = 0
update eqpt_config json default values
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
restore verbose off for power sweep
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
separate in the code:
* add egress amplifier
* vs setting the amplifier parameters
=> prepare improvments in select_edfa and target_power code
regroup all network optimization operations in network.py (remove from
transmission_main)
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* automatic design (when amplifiers are missing from network topology
input) finds the optimum power difference between spans
* The range of this optimum power difference is defined in
eqpt_config[Spans][delta_power_range_db] = [min, max, step]
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
=> read power range [lower, upper, step] in eqpt_config.json
do not display intermediate NE info if range > 1
=> update eqpt_config.json data
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* apply to power_mode only
* bug caused by the previous merge
restore default connector loss in excel to json parser (convert.py) to
0dB
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
- adding relevant call in path_request_run
- unifying variable name: baudrat -> baud_rate
- correcting test with the new power features
- unifying naming of variables n_ch-> nb_channel, sink -> destination (this
follows the usual naming in yang path computation models)
- bug fix in novel trx_mode_params function , use of the function in
path_requests_un
- TODO : place roll-off in the tsp lib instead of SI
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
creation of modular functions to be called
use of the same propagate function in both examples
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>