57 Commits

Author SHA1 Message Date
EstherLerouzic
f2039fbe1c fix: use loaded json instead of Path for extra configs
In order to be used by API.

Co-authored-by: Renato Ambrosone <renato.ambrosone@polito.it>

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I12111427c8a90b85b3158cdd95f4ee771cb39316
2025-09-26 11:17:45 +02:00
EstherLerouzic
56e615c713 Feat: Use a reference channel per OMS instead of total power for design
Correctly uses the oms band and spacing for computing the nb of channel
and total power for design per band.
In order to keep the SI values as reference, introduce a new parameter
in SI to indicate wether to use this feature or not.

If "use_si_channel_count_for_design": true, then the f_min, f_max and spacing
from SI are used for all OMSes
else, the f_min, f_max, spacing defined per OMS (design_bands) is used.

This impacts tests where the artificial C-band boudaries were hardcoded, and
it also has an impact on performances when SI's defined nb of channels is larger
than the one defined per OMS. In this case the design was considering a larger
total power than the one finally propagated which resulted in reduced performance.
This feature now corrects this case (if "use_si_channel_count_for_design": false
which is the default setting). Overall autodesign are thus improved.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I471a2c45200894ca354c90b46b662f42414b48ad

tous les test marche et les jeu de tests aussi.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If25b47aa10f97301fde7f17daa2a9478aed46db2
2025-09-03 10:34:15 +02:00
EstherLerouzic
6c5d11d86c Implement in_voa of amplifiers
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I24feed756586a104e829275244f0868a272e5f6b
2025-09-03 10:34:15 +02:00
EstherLerouzic
b0ac41e2d5 fix: PMD was not correctly read from excel or exported from json
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I1069b07dfb62bf94d4f591908c034df4e49ce22a
2025-03-21 15:42:45 +01:00
EstherLerouzic
8717156712 feat: Read a list of optional extra equipement files
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ic521bbacd38b3bb60da3a364a069abfd1895d337
2025-01-30 17:23:18 +01:00
EstherLerouzic
1722fbec13 feat: add more warnings on amplifiers
when user settings do not match library

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id387b7781d9637f1d18c453dae75330962229902
2024-12-06 16:35:46 +01:00
EstherLerouzic
f621ca6fe7 Add tilt computation for design targets
Compute the tilts only if raman-flag in sim_params is turned on.
Use actual input power in fiber (according to expected propagation
during design).
Creates a function that computes the expected tilt after propagation
in a span, and returns the normalized power difference at the center
frequency of each band, and the tilt experenced between lower and
upper frequency in each band.
Include the expected tilt when computing target gains of amplifiers.
Current function requires that the bands remain in the same order.
(ordering is ensured when creating the objects).

Change-Id: I28bdf13f2010153175e8b6d199fd8eea15d7b292
2024-10-16 17:46:59 +00:00
EstherLerouzic
c2f6f9c6a0 Add an invocation test with multiband case
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0a98175f0c6b4333fae6bea40dac826032a25233
2024-10-16 17:39:13 +00:00
EstherLerouzic
5277ae2005 Add a redesign option
redesign True means that network is redesigned using each request
as reference channel. When False it means that the design is made
once and successive propagation use the settings computed with this
design.

Default propogation is without redesign, so that path-request-script
must use the ----redesign-per-request option to behave as before this
commit.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0084185106d14659a846136620cd17791d551a7d
2024-10-16 17:15:20 +00:00
EstherLerouzic
30ead40e76 Creates a set of functions to be called by CLI and API
Instead of copying the CLI script in API code, use functions shared
by CLI and API

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I3f9b30b8700b68237d0e80768db015d8dec3deb5
2024-10-16 17:13:25 +00:00
EstherLerouzic
0d236fd31e fix: remove unused invocation test file
Wrongly added by commit #4a071c5

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I337b8d4560cd7f2634fca7d242783da327127de5
2024-10-16 16:42:09 +00:00
EstherLerouzic
4a071c53d7 feat: transform roadm-paths into list indexed with frequency band
to be conformed with ietf + to prepare for next multiband case

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If71857ef7dff9eaaa4c16e3837d3500bcef2fa72
2024-06-02 19:26:33 +02:00
EstherLerouzic
38cc0e3cc5 feat: separate span power from tx power
gnpy currently uses the same parameter for tx output power and span
input power: this prevents from modelling low tx power effect.
This patch introduces a new tx-cannel-power and uses it to
propagate in ROADM.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id3ac75e2cb617b513bdb38b51a52e05d15af46f5
2024-06-02 19:26:33 +02:00
EstherLerouzic
f950a6aee8 Feat: add detailed ROADM impairments per roadm-path
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I09c55dcff53ffb264609654cde0f1d8b9dc7fe9b
2024-06-02 19:26:33 +02:00
EstherLerouzic
fb4195c775 Feat: Enable multiple type_varieties for ROADM
This commit introduces the 'type_variety' attribute for ROADM elements,
allowing the use of different types of ROADM specifications instead of
being limited to the default one.

If no type variety name is provided in the eqpt_config, the 'default'
name is used for backward compatibility with libraries. Additionally,
if no type variety is defined in the ROADM element in the topology,
the default one is used for backward compatibility with topologies.

The 'type_variety' attribute is included in the 'to_json' and
'display' methods for ROADM elements.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I61a2491f994e47ad0b08cf8eaef30d6d855aa706
2024-06-02 19:26:33 +02:00
EstherLerouzic
2b4a4ab72c fix Raman gain estimation during design
- Replaced multiple calls to the span_loss function
  with recording the span loss result in the fiber elements,
  reducing computation time.
- Updated Raman gain estimation based on design target powers to ensure
  accurate Edfa gain calculation or gain reduction during design.
- display the computed and design Raman gain in RamanFiber string output
- do not add padding on Raman fibers
- Added to_json function to preserve user input SimParams values,
  which were previously overwritten by initializing SimParams
  with fake values during design.

Next step is to allow users to balance computation time and
target accuracy of the design by inputing their own SimParams
and ref channels design values.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I1ca4954d0621858cefb3d776a538131992cae3e3
2024-04-12 08:58:16 +02:00
EstherLerouzic
c69c2a3af2 add invocation test with the 3 equalization settings
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0aee8da7bbf71991c68e163c7188efe1ddf29ff9
2023-11-20 17:07:53 +01:00
EstherLerouzic
87211b35e9 Use design delta_p and gains instead of p_spani
Remove the visualisation of the effective_pch in amp because actual
and target are the relevant ones. effective_pch was artificially
related to a mix of reference channel and noisy channel (mixed between
on the fly redesign but using actual ROADM equalisation which includes noise
in its actual loss).

the change does no more rely on the target power (which is rounded)
but on the designed gain, which is not rounded.

Propagations are slightly changed for openroadm simulations because of that.
(I verified)

The gain of amp was estimated on the fly with p_spni also in case of
RamanFiber preceding elements. removing p_spani requies that an estimation
of Raman gain be done during design.

This commit also adds this estimation.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I960b85e99f85a7d168ac5349e325c4928fa5673b
2023-11-20 17:07:46 +01:00
EstherLerouzic
e9f9ddb4d6 restore initial power sweep behaviour
if user define a delta_p that is reduced because of saturation,
then this initial setting is still kept for power sweep to be sure
that the full amplitude of sweep is used.

SI power = 0 dBm
max power amp1 = 20 dBm,
user_defined_delta_p set by user = 3
80 channels, so pch_max = 20 - 10log10(80) = 0.96 dBm
power_sweep -> power range [-3, 0] dBm

then for initial design,
   pref = 0 dBm
   computed_delta_p =
      min(pch_max, pref + user_defined_delta_p) - pref = 0.96

but for -3 power sweep
   pref = -3 dBm
   computed_delta_p =
      min(pch_max, pref + user_defined_delta_p) - pref =
      min(0.96,    -3 + 3) - (-3) = 3
   so the user defined delta_p is applied as much as possible

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I8fd459c29aa9754ff9d4868af1d8be8642a31913
2023-11-20 11:10:07 +01:00
EstherLerouzic
07fd89351b Computes reference input power in ROADM during design
input power is computed at design time: so let's record it and
use it instead of p_span_i for ROADM reference channel loss computation.
Note that this loss parameter is only used for visualisation purpose.
No impact on propagation.

Since this loss is computed for the reference channel used for
design, we need to record input power based on input degrees,
and indicate this information within the call function.

Note that this will be also usefull later on to implement ROADM
parameters

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I64d510fc20df72f07158f400964d592d76dc0ce4
2023-11-20 10:23:21 +01:00
EstherLerouzic
3510d59250 Correct design: apply saturation in all cases
Previously saturation was not checked during design if amp type was set.
This commit also applies saturation for these amplifiers.

This changes some of the autodesign result (since range for selection
is changed). For example, this changes some of the gains, or type variety
of amplifier of test files.

The commit also removes one of the rounding in the design phase, and
applies rounding only for printing purpose.

It also adds minor refactor on a function

In order to keep power sweep behaviour in case of saturation, the saturation
check in amplifier element uses initial power targets set by user instead
of a possible autodesign delta_p result.

Note that gain_mode is unchanged: design in gain mode means that delta_p
is set to None during the build process, even if the user defined a value
in operational.delta_p.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Idc5cfc8263cf678473acb6ec490207d9d6ba5c0a
2023-11-20 10:21:38 +01:00
EstherLerouzic
4ba77d0a0a Change rq.N and rq.M from scalar to list
Prepare for the next step, to be able to handle lists of candidate assignment

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I2bd78606ce4502f68efb60f85892df5f76d52bb5
2023-11-17 16:23:48 +01:00
EstherLerouzic
064d3af8e0 Remove line number from invocation logs
line numbers are useful for debugging, but the benefit does not
compensate for the painful update of lines in files at each commit
that changes line numbers.
So I have removed those lines only for the test_invocation logs case.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ic1f628d80b204a9a098f3902ebdfd10b480c7613
2023-11-17 11:56:06 +01:00
AndreaDAmico
4ab5bac45f EDFA Parameters restructuring
The parameters of the EDFA are explicitely retrieved in the EDFAParams class.
All the defaults are set instead in the gnpy.tool.json_io.AMP class.
Where required, the AMP.default_values are used instead of an empty dictionary.

Change-Id: Iba80a6a56bc89feb7e959b54b9bd424ec9b0bf06
Co-authored-by: Vittorio Gatto <vittoriogatto98@gmail.com>
2023-11-17 09:08:00 +01:00
AndreaDAmico
edf1eec072 Nonlinear coefficient scaling along frequency
The nonlinear coefficient can be expressed at the reference frequency and will be scaled in frequency using the scaling rule of the effective area

Change-Id: Id103b227472702776bda17ab0a2a120ecfbf7473
2023-11-17 08:53:58 +01:00
AndreaDAmico
c20e6fb320 Effective Area and Raman Gain Coefficient Scaling
1. Effective area scaling along frequency is implemented by means of a technological model.
2. Raman gain coefficient is extended coherently, including the scaling due to the pump frequency.

Change-Id: I4e8b79697500ef0f73ba2f969713d9bdb3e9949c
Co-authored-by: Giacomo Borraccini <giacomo.borraccini@polito.it>
2023-11-17 08:51:26 +01:00
EstherLerouzic
f2cc9f7225 Add more logs
and test them

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I05ffc3a75354fa8d8f3a668973ab7f4cbcfa1a98
2023-11-02 10:01:38 +01:00
AndreaDAmico
a3b1157e38 Fiber latency calculation
Fiber latency evaluated during propagation. The speed of ligth in fiber is evaluated as the vacuum speed of ligth  divided by the core reflective index n1.
The latency in the transceiver is evaluated in ms.

Change-Id: I7a3638c49f346aecaf1d4897cecf96d345fdb26c
2023-08-07 18:29:03 +02:00
EstherLerouzic
41b94cc888 fix: don't crash if PMD, PDL or CD penalties are missing in transceivers
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Iafc248af3ecfcd4da4c1135fd3a37da796cdfb5f
2023-05-09 10:11:26 +02:00
EstherLerouzic
54a3725e17 Add a -spectrum option to input external file to define spectrum
The option is only set for gnpy-transmission-main.

The spectrum file is a list of spectrum objects, each defining
f_min, f_max and spectrum attributes using the same meaning as SI
in eqpt_config.json for baud_rate, roll_off, tx_osnr. slot_width is
used for the occupation of each carrier around their central frequency,
so slot_width corresponds to spacing of SI.
Unlike SI, the frequencies are defined includint f_min and f_max.
The partitions must be contiguous not overlapping.

Pref.p_span0 object records the req_power, while
ref_carrier records info that will be useful for equalization ie baud_rate.

For now, I have not integrated the possibility to directly use
transceivers type and mode in the list.

User can define sets of contiguous channels and a label to identify
the spectrum bands. If no label are defined, the program justs uses
the index + baud rate of the spectrum bands as label.

Print results per spectrum label

If propagated spectrum has mixed rates, then prints results (GSNR and OSNR)
for each propagated spectrum type according to its label.

Print per label channel power of elements

Per channel power prints were previously only showing the noiseless
reference channel power and only an average power.
With this change, we add a new information on the print:
the average total power (signal + noise + non-linear noise).
If there are several spectrum types propagating, the average per
spectrum is displayed using the label.
For this purpose, label and total power are recorded in each element
upon propagation

Note that the difference between this total power and the existing
channel power represents the added noise for the considered OMS.
Indeed ROADMs equalize per channel total power, so that power displayed
in 'actual pch (dBm)' may contain some noise contribution accumulated
with previous propagation.
Because 'reference pch out (dBm)' is for the noiseless reference,
it is exactly set to the target power and 'actual pch (dBm)' is always
matching 'reference pch out (dBm)' in ROADM prints.

Add examples and tests for -spectrum option

initial_spectrum1.json reproduces exactly the case of SI
initial_spectrum2.json sets half of the spectrum with 50GHz 32Gbauds and
half with 75GHz 64 Gbauds. Power setting is not set for the second half,
So that equalization will depend on ROADM settings.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ibc01e59e461e5e933e95d23dacbc5289e275ccf7
2022-11-09 14:39:25 +01:00
EstherLerouzic
cb85b8fe2b Add a test with long propagation
Existing tests only cover short distances, and effect on accumulated
noise, especially when crossing ROADMs with equalization, are not well
reported on elements power prints.
With this long path, I can catch more printing inconsistencies.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I2d0e8ccbbd387a2cd6c645c07f4b5f75e4617c30
2022-11-02 12:05:26 +01:00
EstherLerouzic
b842898baf Change precision of --show-channels to 5 digits
Flexgrid precision is 6.25GHz so --show-channels should be at least 5 digits

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I7de4254ab18508320133371e0d8cc8b5e08f0d2f
2022-10-28 00:38:28 +00:00
EstherLerouzic
33c6038921 Change saturation verification to total input power
Previous check was made on reference channel computation.
Now we use the actual total input power to compute the actual gain.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I3e0db72fdb030a49e2b06cdcfb442b5e642c1777
2022-08-17 14:13:38 +02:00
gborrach
09dba8a166 Fix: Raman pumps SRS solver
In the previous version, when the values of the counter-propagating Raman pump profiles were flipped, the pumps resulted flipped also in frequency.

Change-Id: I66f7c2aff35c72f5dcb4fb11f7a82fe1df2ee3f2
Co-authored-by: Andrea D'Amico <andrea.damico@polito.it>
2022-07-27 00:20:47 +02:00
Jonas Mårtensson
62fa9ab0b0 Add PMD and PDL in amplifiers
Both PMD and PDL is set to 0 by default. Values from the OpenROADM MSA
for ILAs are included in corresponding eqpt files.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I79611db3ae798e9dadc47ee39161dc1e242f2595
2022-01-18 12:35:59 +01:00
Jonas Mårtensson
14591c7a11 Introduce PDL accumulation and penalty calculation
This fixes #421

As a first step PDL is specified in the eqpt library for ROADMs only.
In a later step, PDL (as well as PMD) should be specified also for amps
and possibly for fibers. PDL values from the OpenROADM MSA for ROADMs
are included in the corresponding eqpt files.

The acculumation rule for PDL is the same as for PMD as shown in:

"The statistics of polarization-dependent loss in optical communication
systems", A. Mecozzi and M. Shtaif, IEEE Photon. Technol. Lett., vol.
14, pp. 313-315, Mar 2002.

PDL penalty is specified and calculated in the same way as for CD and
PMD, i.e. linear interpolation between impairment_value/penalty_value
pairs. This patch includes penalty specification for OpenROADM trx
modes according to the MSA.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: Ib0ab383bcaee7d7523ffc3fa9a949d76c8c86ff7
2022-01-18 12:35:59 +01:00
Jonas Mårtensson
82b148eb87 Set PMD for ROADMs in OpenROADM eqpt_config according to MSA spec
Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: Ic19aff08ea0da51656ba81e04f34a405413f7b54
2022-01-18 12:35:59 +01:00
AndreaDAmico
77925b218e Raman Solver restructuring and speed up
In this change, the RamanSolver is completely restructured in order to obtain a simplified and faster solution of the Raman equation. Additionally, the inter-channel Raman effect can be evaluated also in the standard fiber, when no Raman pumping is present. The same is true for the GGN model.

The Raman pump parameter pumps_loss_coef has been removed as it was not used. The loss coefficient value evaluated at the pump frequency can be included within the fiber loss_coef parameter.

This change induces variations in some expected test results as the Raman profile solution is calculated by a completely distinct algorithm. Nevertheless, these variations are negligible being lower than 0.1dB.

Change-Id: Iaa40fbb23c555571497e1ff3bf19dbcbfcadf96b
2022-01-12 19:37:10 +01:00
AndreaDAmico
4621ac12bf Effective area included in fiber parameters
Gamma and the raman efficiency are calculated using the effective area if not provided. Both these parameters are managed as optional in json_io.py for backward compatibility.

Change-Id: Id7f1403ae33aeeff7ec464e4c7f9c1dcfa946827
2022-01-06 12:00:00 +01:00
Jan Kundrát
6bb9ae8336 tests: Fix after merging two incompatible changes
Oops. We are not using gating, which means that changes are tested
against the "current tip of the branch" and might pass fine there, but
once they are merged, there can well be a conflict between them. This
has just happened.

The EDFA which reported a difference had its VOA set to 0.5. Previously,
this was not taken into assumption.

Fixes: ce51a4d1 Take explicitly set out_voa value into account in power calculation
Fixes: 280443f1 add an invocation test with power saturation
Change-Id: Icebbb16d2ef5886d2c9c04cc9a300a6aa08bf245
2021-09-15 15:31:20 +02:00
Jan Kundrát
0dc7d853ef Merge changes I7f6cc553,I0a6a8442,I34fe2dcf
* changes:
  requests: avoid TypeError
  add an invocation test with power saturation
  Update a roadm test to include more cases for power handling
2021-09-15 13:09:32 +00:00
EstherLerouzic
280443f17f add an invocation test with power saturation
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0a6a8442326fdfb9c9922abf05aeee52cfa42090
2021-09-15 14:59:59 +02:00
Jan Kundrát
825d37c05c tests: add OpenROADMv5 example propagation
These numbers "appear to look sane" as per [1]. Let's make sure that the
config files are CI-tested.

[1] https://review.gerrithub.io/c/Telecominfraproject/oopt-gnpy/+/522340/1#message-b40ac2c839f138237139407374452f254c3b0b0d

Change-Id: Iad346a14ed12b984f90a40629c0339fa0823290e
2021-09-15 12:33:18 +02:00
Jan Kundrát
3ac9f90914 OpenROADM: mark example config files as v4 explicitly
The recent commit has added support for OpenROADM v5, the latest
published optical spec sheet. Given that the upstream project has
released v10 YANG files (but still just v3, v4 and v5 XLS sheets with
optical performance numbers), I think it would be rather misleading to
have both versioned and non-versioned config files -- especially when
the unversioned one refers to the oldest release, not the newest one.

Change-Id: I04109341724b51d276660d400c923dc28561aef2
2021-09-15 12:31:05 +02:00
Jan Kundrát
3fa53adc4d Don't print file name when handling requests
We have a test which compares the raw output of GNPy against a fixed
expected output. That comparison of course chokes when forward slashes
and backslashes are used, which breaks the test suite on Windows. Let's
try to solve this by always using forward slashes if possible. The way
to go is via pathlib's as_posix(), but that one can possibly return an
absolute path -- which cannot work in a test suite, obviously. So one
can workaround that via calling a Path.relative_to(), but that one
chokes on paths which require at least one "path up" component (`..`).
I posted a patch which use brute force here, but Jonas is right, better
just don't print that output in the test suite in the first place.

Change-Id: I762ddb58a2042120c7b20414152a06a3ed72048d
Bug: https://github.com/Telecominfraproject/oopt-gnpy/issues/358
2021-06-17 16:20:38 +02:00
Jan Kundrát
225cafa8b7 Floating point formatting of elements' operational parameters
The current JSON data loader preserves (some) integers as integers. When
printed, the value might not contain any decimal points. The YANG patch
series, however, forces floats when floats are expected (while still
allowing None). This makes the output subtly different.

Change-Id: I0e0c013eb3abddb4aeac1ba43bf0d473fed731d4
2021-06-04 23:10:09 +02:00
Jonas Mårtensson
581b4a726f Use the term GSNR in result outputs
The term "GSNR" is well established by now. I think it's time we start
using it in our own result outputs instead of alternatives like "total
SNR" or just "SNR".

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I1fc65f6db1e3b2d7cfe974875174132fe5b28d3b
2021-06-04 12:48:50 +02:00
Jan Kundrát
b6daa15356 tests: include the OpenROADM amplifiers
Change-Id: I26d6ad422917fa6fd5943ffaa5da933c2acec80e
2021-05-31 16:41:13 +02:00
EstherLerouzic
60b9256f22 Change example file meshTopologyExampleV2.xls
Previous file imposed equipment types inconsistantly with required gain

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If19c5a0a710edf280fde146bca94c431bb5fe836
2021-04-06 11:53:07 +02:00
EstherLerouzic
94b9c16d67 add warning in case gain over max_flat_gain + extended_gain_range
This is an old pull request rebased and restricted to only raising warning.
The initial work also limited gain, which is finally not a desired behaviour:
an advanced user might want to have this high gain.

the only impact on test is that it raises warnings on almost all amplifiers
on the mesh_topology_exampleV2.xls: indeed all of them are set to low_gain
but without gain specified and the result of autodesign results in higher gains
than supported by this amplifier variety.

This may be confusing for users to see these warnings on an example from gnpy
so I will push a new commit changing the amp types to avoid this.
The alternative would be to push the warnings into the logger, so they
remain invisible, but I think that the example change makes more sense.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Idf0c67137b5b466b07ddc7817f53a82f92a21a5b
2021-04-06 11:52:36 +02:00