mirror of
				https://github.com/Telecominfraproject/oopt-gnpy.git
				synced 2025-10-31 18:18:00 +00:00 
			
		
		
		
	Compare commits
	
		
			67 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | a7ec7e2ed6 | ||
|   | 00ee102b3a | ||
|   | ce11524ad9 | ||
|   | 33c6038921 | ||
|   | 119c9eda90 | ||
|   | b63e146bf4 | ||
|   | 09dba8a166 | ||
|   | 7f5043622b | ||
|   | 6ad4593f41 | ||
|   | 706661d801 | ||
|   | a408d28911 | ||
|   | b86fe96032 | ||
|   | 43926518ad | ||
|   | 128a6e816b | ||
|   | 44db951261 | ||
|   | 3c3d919b77 | ||
|   | 2079d2bc5b | ||
|   | 062e2076ed | ||
|   | 1dd1bad273 | ||
|   | 5b104af296 | ||
|   | f170574abf | ||
|   | a68e8ff8d2 | ||
|   | d5a52d1b2b | ||
|   | 7ac6e058ec | ||
|   | 74ab3c1bcd | ||
|   | 1a2ff2d215 | ||
|   | aaf0480e9c | ||
|   | 5e50ffbbf6 | ||
|   | 243b701391 | ||
|   | bdbfe76aed | ||
|   | 541ec04444 | ||
|   | bf1522b047 | ||
|   | 3f4188a0fd | ||
|   | 8b387ef722 | ||
|   | cad9a0f18e | ||
|   | ab84c77363 | ||
|   | 62fa9ab0b0 | ||
|   | 14591c7a11 | ||
|   | 587932290d | ||
|   | 82b148eb87 | ||
|   | 8393daf67d | ||
|   | be61dfd094 | ||
|   | 77925b218e | ||
|   | 4621ac12bf | ||
|   | 09920c0af2 | ||
|   | e6a3d9ce5b | ||
|   | b9645702c8 | ||
|   | 9c2095b138 | ||
|   | cb42115230 | ||
|   | 5909da4bbf | ||
|   | 2ba1e86b28 | ||
|   | 3358c5eeb5 | ||
|   | 13e4c29bc1 | ||
|   | 4becc9060c | ||
|   | 32d8b2a4d8 | ||
|   | 399eb9700f | ||
|   | 82f83e1462 | ||
|   | 171450fa54 | ||
|   | 9f9f4c78fc | ||
|   | c469a8d9ba | ||
|   | 99b2a554dc | ||
|   | 57e98d7173 | ||
|   | 78b45a3958 | ||
|   | 64b6b486a9 | ||
|   | 65cb46f479 | ||
|   | f94d06f124 | ||
|   | e1f2c55942 | 
| @@ -1,47 +0,0 @@ | |||||||
| #!/bin/bash |  | ||||||
|  |  | ||||||
| set -e |  | ||||||
|  |  | ||||||
| IMAGE_NAME=telecominfraproject/oopt-gnpy |  | ||||||
| IMAGE_TAG=$(git describe --tags) |  | ||||||
|  |  | ||||||
| ALREADY_FOUND=0 |  | ||||||
| docker pull ${IMAGE_NAME}:${IMAGE_TAG} && ALREADY_FOUND=1 |  | ||||||
|  |  | ||||||
| if [[ $ALREADY_FOUND == 0 ]]; then |  | ||||||
|   docker build . -t ${IMAGE_NAME} |  | ||||||
|   docker tag ${IMAGE_NAME} ${IMAGE_NAME}:${IMAGE_TAG} |  | ||||||
|  |  | ||||||
|   # shared directory setup: do not clobber the real data |  | ||||||
|   mkdir trash |  | ||||||
|   cd trash |  | ||||||
|   docker run -it --rm --volume $(pwd):/shared ${IMAGE_NAME} gnpy-transmission-example |  | ||||||
| else |  | ||||||
|   echo "Image ${IMAGE_NAME}:${IMAGE_TAG} already available, will just update the other tags" |  | ||||||
| fi |  | ||||||
|  |  | ||||||
| docker images |  | ||||||
|  |  | ||||||
| do_docker_login() { |  | ||||||
|   echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin |  | ||||||
| } |  | ||||||
|  |  | ||||||
| if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then |  | ||||||
|   if [[ "${TRAVIS_BRANCH}" == "develop" || "${TRAVIS_BRANCH}" == "docker" ]]; then |  | ||||||
|     echo "Publishing latest" |  | ||||||
|     docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:latest |  | ||||||
|     do_docker_login |  | ||||||
|     if [[ $ALREADY_FOUND == 0 ]]; then |  | ||||||
|       docker push ${IMAGE_NAME}:${IMAGE_TAG} |  | ||||||
|     fi |  | ||||||
|     docker push ${IMAGE_NAME}:latest |  | ||||||
|   elif [[ "${TRAVIS_BRANCH}" == "master" ]]; then |  | ||||||
|     echo "Publishing stable" |  | ||||||
|     docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:stable |  | ||||||
|     do_docker_login |  | ||||||
|     if [[ $ALREADY_FOUND == 0 ]]; then |  | ||||||
|       docker push ${IMAGE_NAME}:${IMAGE_TAG} |  | ||||||
|     fi |  | ||||||
|     docker push ${IMAGE_NAME}:stable |  | ||||||
|   fi |  | ||||||
| fi |  | ||||||
							
								
								
									
										22
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							| @@ -23,10 +23,12 @@ jobs: | |||||||
|         with: |         with: | ||||||
|           files: ${{ github.workspace }}/cover/coverage.xml |           files: ${{ github.workspace }}/cover/coverage.xml | ||||||
|     strategy: |     strategy: | ||||||
|  |       fail-fast: false | ||||||
|       matrix: |       matrix: | ||||||
|         tox_env: |         tox_env: | ||||||
|           - py38 |           - py38 | ||||||
|           - py39-cover |           - py39 | ||||||
|  |           - py310-cover | ||||||
|         include: |         include: | ||||||
|           - tox_env: docs |           - tox_env: docs | ||||||
|             dnf_install: graphviz |             dnf_install: graphviz | ||||||
| @@ -43,7 +45,7 @@ jobs: | |||||||
|       - uses: actions/setup-python@v2 |       - uses: actions/setup-python@v2 | ||||||
|         name: Install Python |         name: Install Python | ||||||
|         with: |         with: | ||||||
|           python-version: '3.9' |           python-version: '3.10' | ||||||
|       - uses: casperdcl/deploy-pypi@bb869aafd89f657ceaafe9561d3b5584766c0f95 |       - uses: casperdcl/deploy-pypi@bb869aafd89f657ceaafe9561d3b5584766c0f95 | ||||||
|         with: |         with: | ||||||
|           password: ${{ secrets.PYPI_API_TOKEN }} |           password: ${{ secrets.PYPI_API_TOKEN }} | ||||||
| @@ -91,9 +93,9 @@ jobs: | |||||||
|             telecominfraproject/oopt-gnpy:${{ steps.extract_tag_name.outputs.GIT_DESC }} |             telecominfraproject/oopt-gnpy:${{ steps.extract_tag_name.outputs.GIT_DESC }} | ||||||
|             telecominfraproject/oopt-gnpy:latest |             telecominfraproject/oopt-gnpy:latest | ||||||
|  |  | ||||||
|   windows: |   other-platforms: | ||||||
|     name: Tests on Windows |     name: Tests on other platforms | ||||||
|     runs-on: windows-2019 |     runs-on: ${{ matrix.os }} | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v2 |       - uses: actions/checkout@v2 | ||||||
|         with: |         with: | ||||||
| @@ -102,10 +104,14 @@ jobs: | |||||||
|         with: |         with: | ||||||
|           python-version: ${{ matrix.python_version }} |           python-version: ${{ matrix.python_version }} | ||||||
|       - run: | |       - run: | | ||||||
|  |           pip install -r tests/requirements.txt | ||||||
|           pip install --editable . |           pip install --editable . | ||||||
|           pip install 'pytest>=5.0.0,<6' |  | ||||||
|           pytest -vv |           pytest -vv | ||||||
|     strategy: |     strategy: | ||||||
|  |       fail-fast: false | ||||||
|       matrix: |       matrix: | ||||||
|         python_version: |         include: | ||||||
|           - "3.9" |           - os: windows-2019 | ||||||
|  |             python_version: "3.10" | ||||||
|  |           - os: macos-12 | ||||||
|  |             python_version: "3.10" | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								.lgtm.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.lgtm.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | queries: | ||||||
|  | - exclude: py/clear-text-logging-sensitive-data | ||||||
|  | - exclude: py/clear-text-storage-sensitive-data | ||||||
							
								
								
									
										27
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -1,27 +0,0 @@ | |||||||
| dist: focal |  | ||||||
| os: linux |  | ||||||
| language: python |  | ||||||
| services: docker |  | ||||||
| python: |  | ||||||
|   - "3.8" |  | ||||||
|   - "3.9" |  | ||||||
| before_install: |  | ||||||
|   - sudo apt-get -y install graphviz |  | ||||||
| install: skip |  | ||||||
| script: |  | ||||||
|   - pip install --editable . |  | ||||||
|   - pip install pytest-cov rstcheck |  | ||||||
|   - pytest --cov-report=xml --cov=gnpy -v |  | ||||||
|   - pip install -r docs/requirements.txt |  | ||||||
|   - rstcheck --ignore-roles cite *.rst |  | ||||||
|   - sphinx-build -W --keep-going docs/ x-throwaway-location |  | ||||||
| after_success: |  | ||||||
|   - bash <(curl -s https://codecov.io/bash) |  | ||||||
| jobs: |  | ||||||
|   include: |  | ||||||
|     - stage: test |  | ||||||
|       name: Docker image |  | ||||||
|       script: |  | ||||||
|         - git fetch --unshallow |  | ||||||
|         - ./.docker-travis.sh |  | ||||||
|         - docker images |  | ||||||
							
								
								
									
										22
									
								
								.zuul.yaml
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								.zuul.yaml
									
									
									
									
									
								
							| @@ -2,25 +2,21 @@ | |||||||
| - project: | - project: | ||||||
|     check: |     check: | ||||||
|       jobs: |       jobs: | ||||||
|         - tox-py38-f34 |         - tox-py38 | ||||||
|         - tox-py39-cover |         - tox-py39 | ||||||
|         - tox-docs-f34 |         - tox-py310-cover | ||||||
|  |         - tox-docs-f35 | ||||||
|         - coverage-diff: |         - coverage-diff: | ||||||
|             voting: false |             voting: false | ||||||
|             dependencies: |             dependencies: | ||||||
|               - tox-py39-cover-previous |               - tox-py310-cover-previous | ||||||
|               - tox-py39-cover |               - tox-py310-cover | ||||||
|             vars: |             vars: | ||||||
|               coverage_job_name_previous: tox-py39-cover-previous |               coverage_job_name_previous: tox-py310-cover-previous | ||||||
|               coverage_job_name_current: tox-py39-cover |               coverage_job_name_current: tox-py310-cover | ||||||
|         - tox-linters-diff-n-report: |         - tox-linters-diff-n-report: | ||||||
|             voting: false |             voting: false | ||||||
|         - tox-py39-cover-previous |         - tox-py310-cover-previous | ||||||
|     gate: |  | ||||||
|       jobs: |  | ||||||
|         - tox-py38-f34 |  | ||||||
|         - tox-py39-f34 |  | ||||||
|         - tox-docs-f34 |  | ||||||
|     tag: |     tag: | ||||||
|       jobs: |       jobs: | ||||||
|         - oopt-release-python: |         - oopt-release-python: | ||||||
|   | |||||||
| @@ -26,4 +26,6 @@ This example demonstrates how GNPy can be used to check the expected SNR at the | |||||||
|  |  | ||||||
|  |  | ||||||
| GNPy can do much more, including acting as a Path Computation Engine, tracking bandwidth requests, or advising the SDN controller about a best possible path through a large DWDM network. | GNPy can do much more, including acting as a Path Computation Engine, tracking bandwidth requests, or advising the SDN controller about a best possible path through a large DWDM network. | ||||||
| Learn more about this [in the documentation](https://gnpy.readthedocs.io/). | Learn more about this [in the documentation](https://gnpy.readthedocs.io/), or give it a [try online at `gnpy.app`](https://gnpy.app/): | ||||||
|  |  | ||||||
|  | [](https://gnpy.app/) | ||||||
|   | |||||||
| @@ -7,6 +7,7 @@ There are weekly calls about our progress. | |||||||
| Newcomers, users and telecom operators are especially welcome there. | Newcomers, users and telecom operators are especially welcome there. | ||||||
| We encourage all interested people outside the TIP to [join the project](https://telecominfraproject.com/apply-for-membership/) and especially to [get in touch with us](https://github.com/Telecominfraproject/oopt-gnpy/discussions). | We encourage all interested people outside the TIP to [join the project](https://telecominfraproject.com/apply-for-membership/) and especially to [get in touch with us](https://github.com/Telecominfraproject/oopt-gnpy/discussions). | ||||||
|  |  | ||||||
|  | (contributing)= | ||||||
| ## Contributing | ## Contributing | ||||||
|  |  | ||||||
| `gnpy` is looking for additional contributors, especially those with experience planning and maintaining large-scale, real-world mesh optical networks. | `gnpy` is looking for additional contributors, especially those with experience planning and maintaining large-scale, real-world mesh optical networks. | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ This path is directional, and all "GNPy elements" along the path match the unidi | |||||||
|  |  | ||||||
| The network topology contains not just the physical topology of the network, but also references to the :ref:`equipment library<concepts-equipment>` and a set of *operating parameters* for each entity. | The network topology contains not just the physical topology of the network, but also references to the :ref:`equipment library<concepts-equipment>` and a set of *operating parameters* for each entity. | ||||||
| These parameters include the **fiber length** of each fiber, the connector **attenutation losses**, or an amplifier's specific **gain setting**. | These parameters include the **fiber length** of each fiber, the connector **attenutation losses**, or an amplifier's specific **gain setting**. | ||||||
| The topology is specified via :ref:`XLS files<excel>` or via :ref:`JSON<json>`. | The topology is specified via :ref:`XLS files<excel>` or via :ref:`JSON<legacy-json>`. | ||||||
|  |  | ||||||
| .. _complete-vs-incomplete: | .. _complete-vs-incomplete: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -190,3 +190,5 @@ autodoc_default_options = { | |||||||
| } | } | ||||||
|  |  | ||||||
| graphviz_output_format = 'svg' | graphviz_output_format = 'svg' | ||||||
|  |  | ||||||
|  | bibtex_bibfiles = ['biblio.bib'] | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ Extending GNPy with vendor-specific data | |||||||
| ======================================== | ======================================== | ||||||
|  |  | ||||||
| GNPy ships with an :ref:`equipment library<concepts-equipment>` containing machine-readable datasheets of networking equipment. | GNPy ships with an :ref:`equipment library<concepts-equipment>` containing machine-readable datasheets of networking equipment. | ||||||
| Vendors who are willing to contribute descriptions of their supported products are encouraged to `submit a patch <https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html>`__. | Vendors who are willing to contribute descriptions of their supported products are encouraged to `submit a patch <https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html>`__ -- or just :ref:`get in touch with us directly<contributing>`. | ||||||
|  |  | ||||||
| This chapter discusses option for modeling performance of :ref:`EDFA amplifiers<extending-edfa>`, :ref:`Raman amplifiers<extending-raman>`, :ref:`transponders<extending-transponder>` and :ref:`ROADMs<extending-roadm>`. | This chapter discusses option for modeling performance of :ref:`EDFA amplifiers<extending-edfa>`, :ref:`Raman amplifiers<extending-raman>`, :ref:`transponders<extending-transponder>` and :ref:`ROADMs<extending-roadm>`. | ||||||
|  |  | ||||||
| @@ -29,7 +29,7 @@ The NF is expressed as a third-degree polynomial: | |||||||
|  |  | ||||||
|        f(x) &= \text{a}x^3 + \text{b}x^2 + \text{c}x + \text{d} |        f(x) &= \text{a}x^3 + \text{b}x^2 + \text{c}x + \text{d} | ||||||
|  |  | ||||||
|   \text{NF} &= f(G_\text{max} - G) |   \text{NF} &= f(G - G_\text{max}) | ||||||
|  |  | ||||||
| This model can be also used for fixed-gain fixed-NF amplifiers. | This model can be also used for fixed-gain fixed-NF amplifiers. | ||||||
| In that case, use: | In that case, use: | ||||||
| @@ -100,10 +100,10 @@ Raman Amplifiers | |||||||
|  |  | ||||||
| An accurate simulation of Raman amplification requires knowledge of: | An accurate simulation of Raman amplification requires knowledge of: | ||||||
|  |  | ||||||
| - the *power* and *wavelength* of all Raman pumping lasers, | * the *power* and *wavelength* of all Raman pumping lasers, | ||||||
| - the *direction*, whether it is co-propagating or counter-propagating, | * the *direction*, whether it is co-propagating or counter-propagating, | ||||||
| - the Raman efficiency of the fiber, | * the Raman efficiency of the fiber, | ||||||
| - the fiber temperature. | * the fiber temperature. | ||||||
|  |  | ||||||
| Under certain scenarios it is useful to be able to run a simulation without an accurate Raman description. | Under certain scenarios it is useful to be able to run a simulation without an accurate Raman description. | ||||||
| For these purposes, it is possible to approximate a Raman amplifier via a fixed-gain EDFA with the :ref:`polynomial NF<ext-nf-model-polynomial-NF>` model using :math:`\text{a} = \text{b} = \text{c} = 0`, and a desired effective :math:`\text{d} = NF`. | For these purposes, it is possible to approximate a Raman amplifier via a fixed-gain EDFA with the :ref:`polynomial NF<ext-nf-model-polynomial-NF>` model using :math:`\text{a} = \text{b} = \text{c} = 0`, and a desired effective :math:`\text{d} = NF`. | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								docs/images/2022-04-12-gnpy-app.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/images/2022-04-12-gnpy-app.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 288 KiB | 
							
								
								
									
										105
									
								
								docs/json.rst
									
									
									
									
									
								
							
							
						
						
									
										105
									
								
								docs/json.rst
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| .. _json: | .. _legacy-json: | ||||||
|  |  | ||||||
| JSON Input Files | JSON Input Files | ||||||
| ================ | ================ | ||||||
| @@ -73,13 +73,57 @@ The fiber library currently describes SSMF and NZDF but additional fiber types c | |||||||
| | ``dispersion_slope`` | (number)  | In :math:`s \times m^{-1} \times m^{-1}  | | | ``dispersion_slope`` | (number)  | In :math:`s \times m^{-1} \times m^{-1}  | | ||||||
| |                      |           | \times m^{-1}`                           | | |                      |           | \times m^{-1}`                           | | ||||||
| +----------------------+-----------+------------------------------------------+ | +----------------------+-----------+------------------------------------------+ | ||||||
| | ``gamma``            | (number)  | :math:`2\pi\times n^2/(\lambda*A_{eff})`,| | | ``effective_area``   | (number)  | Effective area of the fiber (not just    | | ||||||
| |                      |           | in :math:`w^{-1} \times m^{-1}`.         | | |                      |           | the MFD circle). This is the             | | ||||||
|  | |                      |           | :math:`A_{eff}`, see e.g., the           | | ||||||
|  | |                      |           | `Corning whitepaper on MFD/EA`_.         | | ||||||
|  | |                      |           | Specified in :math:`m^{2}`.              | | ||||||
|  | +----------------------+-----------+------------------------------------------+ | ||||||
|  | | ``gamma``            | (number)  | Coefficient :math:`\gamma = 2\pi\times   | | ||||||
|  | |                      |           | n^2/(\lambda*A_{eff})`.                  | | ||||||
|  | |                      |           | If not provided, this will be derived    | | ||||||
|  | |                      |           | from the ``effective_area``              | | ||||||
|  | |                      |           | :math:`A_{eff}`.                         | | ||||||
|  | |                      |           | In :math:`w^{-1} \times m^{-1}`.         | | ||||||
| +----------------------+-----------+------------------------------------------+ | +----------------------+-----------+------------------------------------------+ | ||||||
| | ``pmd_coef``         | (number)  | Polarization mode dispersion (PMD)       | | | ``pmd_coef``         | (number)  | Polarization mode dispersion (PMD)       | | ||||||
| |                      |           | coefficient. In                          | | |                      |           | coefficient. In                          | | ||||||
| |                      |           | :math:`s\times\sqrt{m}^{-1}`.            | | |                      |           | :math:`s\times\sqrt{m}^{-1}`.            | | ||||||
| +----------------------+-----------+------------------------------------------+ | +----------------------+-----------+------------------------------------------+ | ||||||
|  | | ``lumped_losses``    | (array)   | Places along the fiber length with extra | | ||||||
|  | |                      |           | losses. Specified as a loss in dB at     | | ||||||
|  | |                      |           | each relevant position (in km):          | | ||||||
|  | |                      |           | ``{"position": 10, "loss": 1.5}``)       | | ||||||
|  | +----------------------+-----------+------------------------------------------+ | ||||||
|  |  | ||||||
|  | .. _Corning whitepaper on MFD/EA: https://www.corning.com/microsites/coc/oem/documents/specialty-fiber/WP7071-Mode-Field-Diam-and-Eff-Area.pdf | ||||||
|  |  | ||||||
|  | RamanFiber | ||||||
|  | ~~~~~~~~~~ | ||||||
|  |  | ||||||
|  | The RamanFiber can be used to simulate Raman amplification through dedicated Raman pumps. The Raman pumps must be listed | ||||||
|  | in the key ``raman_pumps`` within the RamanFiber ``operational`` dictionary. The description of each Raman pump must | ||||||
|  | contain the following: | ||||||
|  |  | ||||||
|  | +---------------------------+-----------+------------------------------------------------------------+ | ||||||
|  | | field                     | type      | description                                                | | ||||||
|  | +===========================+===========+============================================================+ | ||||||
|  | | ``power``                 | (number)  | Total pump power in :math:`W`                              | | ||||||
|  | |                           |           | considering a depolarized pump                             | | ||||||
|  | +---------------------------+-----------+------------------------------------------------------------+ | ||||||
|  | | ``frequency``             | (number)  | Pump central frequency in :math:`Hz`                       | | ||||||
|  | +---------------------------+-----------+------------------------------------------------------------+ | ||||||
|  | | ``propagation_direction`` | (number)  | The pumps can propagate in the same or opposite direction  | | ||||||
|  | |                           |           | with respect the signal. Valid choices are ``coprop`` and  | | ||||||
|  | |                           |           | ``counterprop``, respectively                              | | ||||||
|  | +---------------------------+-----------+------------------------------------------------------------+ | ||||||
|  |  | ||||||
|  | Beside the list of Raman pumps, the RamanFiber ``operational`` dictionary must include the ``temperature`` that affects | ||||||
|  | the amplified spontaneous emission noise generated by the Raman amplification. | ||||||
|  | As the loss coefficient significantly varies outside the C-band, where the Raman pumps are usually placed, | ||||||
|  | it is suggested to include an estimation of the loss coefficient for the Raman pump central frequencies within | ||||||
|  | a dictionary-like definition of the ``RamanFiber.params.loss_coef`` | ||||||
|  | (e.g. ``loss_coef = {"value": [0.18, 0.18, 0.20, 0.20], "frequency": [191e12, 196e12, 200e12, 210e12]}``). | ||||||
|  |  | ||||||
| Transceiver | Transceiver | ||||||
| ~~~~~~~~~~~ | ~~~~~~~~~~~ | ||||||
| @@ -176,6 +220,61 @@ Only the EDFA that are marked ``'allowed_for_design': true`` are considered. | |||||||
|  |  | ||||||
| For amplifiers defined in the topology JSON input but whose ``gain = 0`` (placeholder), auto-design will set its gain automatically: see ``power_mode`` in the ``Spans`` library to find out how the gain is calculated. | For amplifiers defined in the topology JSON input but whose ``gain = 0`` (placeholder), auto-design will set its gain automatically: see ``power_mode`` in the ``Spans`` library to find out how the gain is calculated. | ||||||
|  |  | ||||||
|  | The file ``sim_params.json`` contains the tuning parameters used within both the ``gnpy.science_utils.RamanSolver`` and | ||||||
|  | the ``gnpy.science_utils.NliSolver`` for the evaluation of the Raman profile and the NLI generation, respectively. | ||||||
|  |  | ||||||
|  | +---------------------------------------------+-----------+---------------------------------------------+ | ||||||
|  | | field                                       |   type    | description                                 | | ||||||
|  | +=============================================+===========+=============================================+ | ||||||
|  | | ``raman_params.flag``                       | (boolean) | Enable/Disable the Raman effect that        | | ||||||
|  | |                                             |           | produces a power transfer from higher to    | | ||||||
|  | |                                             |           | lower frequencies.                          | | ||||||
|  | |                                             |           | In general, considering the Raman effect    | | ||||||
|  | |                                             |           | provides more accurate results. It is       | | ||||||
|  | |                                             |           | mandatory when Raman amplification is       | | ||||||
|  | |                                             |           | included in the simulation                  | | ||||||
|  | +---------------------------------------------+-----------+---------------------------------------------+ | ||||||
|  | | ``raman_params.result_spatial_resolution``  | (number)  | Spatial resolution of the output            | | ||||||
|  | |                                             |           | Raman profile along the entire fiber span.  | | ||||||
|  | |                                             |           | This affects the accuracy and the           | | ||||||
|  | |                                             |           | computational time of the NLI               | | ||||||
|  | |                                             |           | calculation when the GGN method is used:    | | ||||||
|  | |                                             |           | smaller the spatial resolution higher both  | | ||||||
|  | |                                             |           | the accuracy and the computational time.    | | ||||||
|  | |                                             |           | In C-band simulations, with input power per | | ||||||
|  | |                                             |           | channel around 0 dBm, a suggested value of  | | ||||||
|  | |                                             |           | spatial resolution is 10e3 m                | | ||||||
|  | +---------------------------------------------+-----------+---------------------------------------------+ | ||||||
|  | | ``raman_params.solver_spatial_resolution``  | (number)  | Spatial step for the iterative solution     | | ||||||
|  | |                                             |           | of the first order differential equation    | | ||||||
|  | |                                             |           | used to calculate the Raman profile         | | ||||||
|  | |                                             |           | along the entire fiber span.                | | ||||||
|  | |                                             |           | This affects the accuracy and the           | | ||||||
|  | |                                             |           | computational time of the evaluated         | | ||||||
|  | |                                             |           | Raman profile:                              | | ||||||
|  | |                                             |           | smaller the spatial resolution higher both  | | ||||||
|  | |                                             |           | the accuracy and the computational time.    | | ||||||
|  | |                                             |           | In C-band simulations, with input power per | | ||||||
|  | |                                             |           | channel around 0 dBm, a suggested value of  | | ||||||
|  | |                                             |           | spatial resolution is 100 m                 | | ||||||
|  | +---------------------------------------------+-----------+---------------------------------------------+ | ||||||
|  | | ``nli_params.method``                       | (string)  | Model used for the NLI evaluation. Valid    | | ||||||
|  | |                                             |           | choices are ``gn_model_analytic`` (see      | | ||||||
|  | |                                             |           | eq. 120 from `arXiv:1209.0394               | | ||||||
|  | |                                             |           | <https://arxiv.org/abs/1209.0394>`_) and    | | ||||||
|  | |                                             |           | ``ggn_spectrally_separated`` (see eq. 21    | | ||||||
|  | |                                             |           | from `arXiv:1710.02225                      | | ||||||
|  | |                                             |           | <https://arxiv.org/abs/1710.02225>`_).      | | ||||||
|  | +---------------------------------------------+-----------+---------------------------------------------+ | ||||||
|  | | ``nli_params.computed_channels``            | (number)  | The channels on which the NLI is            | | ||||||
|  | |                                             |           | explicitly evaluated.                       | | ||||||
|  | |                                             |           | The NLI of the other channels is            | | ||||||
|  | |                                             |           | interpolated using ``numpy.interp``.        | | ||||||
|  | |                                             |           | In a C-band simulation with 96 channels in  | | ||||||
|  | |                                             |           | a 50 GHz spacing fix-grid we recommend at   | | ||||||
|  | |                                             |           | one computed channel every 20 channels.     | | ||||||
|  | +---------------------------------------------+-----------+---------------------------------------------+ | ||||||
|  |  | ||||||
| Span | Span | ||||||
| ~~~~ | ~~~~ | ||||||
|  |  | ||||||
|   | |||||||
| @@ -145,4 +145,4 @@ Raman Scattering in order to give a proper estimation for all channels | |||||||
| :cite:`cantono2018modeling`.  This will be the main upgrade required within the | :cite:`cantono2018modeling`.  This will be the main upgrade required within the | ||||||
| PSE framework. | PSE framework. | ||||||
|  |  | ||||||
| .. bibliography:: biblio.bib   | .. bibliography:: | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| alabaster>=0.7.12,<1 | alabaster>=0.7.12,<1 | ||||||
| docutils>=0.15.2,<1 | docutils>=0.17.1,<1 | ||||||
| myst-parser>=0.14.0,<1 | myst-parser>=0.16.1,<1 | ||||||
| Pygments>=2.7.4,<3 | Pygments>=2.11.2,<3 | ||||||
| rstcheck | rstcheck | ||||||
| Sphinx>=3.5.0,<4 | Sphinx>=4.4.0,<5 | ||||||
| sphinxcontrib-bibtex>=0.4.2,<1 | sphinxcontrib-bibtex>=2.4.1,<3 | ||||||
|   | |||||||
| @@ -20,13 +20,17 @@ unique identifier and a printable name, and provide the :py:meth:`__call__` meth | |||||||
| instance as a result. | instance as a result. | ||||||
| """ | """ | ||||||
|  |  | ||||||
| from numpy import abs, arange, array, divide, errstate, ones, interp, mean, pi, polyfit, polyval, sum, sqrt | from numpy import abs, array, errstate, ones, interp, mean, pi, polyfit, polyval, sum, sqrt, log10, exp, asarray, full,\ | ||||||
|  |     squeeze, zeros, append, flip, outer | ||||||
| from scipy.constants import h, c | from scipy.constants import h, c | ||||||
|  | from scipy.interpolate import interp1d | ||||||
| from collections import namedtuple | from collections import namedtuple | ||||||
|  |  | ||||||
| from gnpy.core.utils import lin2db, db2lin, arrange_frequencies, snr_sum | from gnpy.core.utils import lin2db, db2lin, arrange_frequencies, snr_sum, watt2dbm | ||||||
| from gnpy.core.parameters import FiberParams, PumpParams | from gnpy.core.parameters import RoadmParams, FusedParams, FiberParams, PumpParams, EdfaParams, EdfaOperational | ||||||
| from gnpy.core.science_utils import NliSolver, RamanSolver, propagate_raman_fiber, _psi | from gnpy.core.science_utils import NliSolver, RamanSolver | ||||||
|  | from gnpy.core.info import SpectralInformation | ||||||
|  | from gnpy.core.exceptions import NetworkTopologyError, SpectrumError | ||||||
|  |  | ||||||
|  |  | ||||||
| class Location(namedtuple('Location', 'latitude longitude city region')): | class Location(namedtuple('Location', 'latitude longitude city region')): | ||||||
| @@ -79,32 +83,47 @@ class Transceiver(_Node): | |||||||
|         self.baud_rate = None |         self.baud_rate = None | ||||||
|         self.chromatic_dispersion = None |         self.chromatic_dispersion = None | ||||||
|         self.pmd = None |         self.pmd = None | ||||||
|  |         self.pdl = None | ||||||
|  |         self.penalties = {} | ||||||
|  |         self.total_penalty = 0 | ||||||
|  |  | ||||||
|     def _calc_cd(self, spectral_info): |     def _calc_cd(self, spectral_info): | ||||||
|         """ Updates the Transceiver property with the CD of the received channels. CD in ps/nm. |         """ Updates the Transceiver property with the CD of the received channels. CD in ps/nm. | ||||||
|         """ |         """ | ||||||
|         self.chromatic_dispersion = [carrier.chromatic_dispersion * 1e3 for carrier in spectral_info.carriers] |         self.chromatic_dispersion = spectral_info.chromatic_dispersion * 1e3 | ||||||
|  |  | ||||||
|     def _calc_pmd(self, spectral_info): |     def _calc_pmd(self, spectral_info): | ||||||
|         """Updates the Transceiver property with the PMD of the received channels. PMD in ps. |         """Updates the Transceiver property with the PMD of the received channels. PMD in ps. | ||||||
|         """ |         """ | ||||||
|         self.pmd = [carrier.pmd*1e12 for carrier in spectral_info.carriers] |         self.pmd = spectral_info.pmd * 1e12 | ||||||
|  |  | ||||||
|  |     def _calc_pdl(self, spectral_info): | ||||||
|  |         """Updates the Transceiver property with the PDL of the received channels. PDL in dB. | ||||||
|  |         """ | ||||||
|  |         self.pdl = spectral_info.pdl | ||||||
|  |  | ||||||
|  |     def _calc_penalty(self, impairment_value, boundary_list): | ||||||
|  |         return interp(impairment_value, boundary_list['up_to_boundary'], boundary_list['penalty_value'], | ||||||
|  |                       left=float('inf'), right=float('inf')) | ||||||
|  |  | ||||||
|  |     def calc_penalties(self, penalties): | ||||||
|  |         """Updates the Transceiver property with penalties (CD, PMD, etc.) of the received channels in dB. | ||||||
|  |            Penalties are linearly interpolated between given points and set to 'inf' outside interval. | ||||||
|  |         """ | ||||||
|  |         self.penalties = {impairment: self._calc_penalty(getattr(self, impairment), boundary_list) | ||||||
|  |                           for impairment, boundary_list in penalties.items()} | ||||||
|  |         self.total_penalty = sum(list(self.penalties.values()), axis=0) | ||||||
|  |  | ||||||
|     def _calc_snr(self, spectral_info): |     def _calc_snr(self, spectral_info): | ||||||
|         with errstate(divide='ignore'): |         with errstate(divide='ignore'): | ||||||
|             self.baud_rate = [c.baud_rate for c in spectral_info.carriers] |             self.baud_rate = spectral_info.baud_rate | ||||||
|             ratio_01nm = [lin2db(12.5e9 / b_rate) for b_rate in self.baud_rate] |             ratio_01nm = lin2db(12.5e9 / self.baud_rate) | ||||||
|             # set raw values to record original calculation, before update_snr() |             # set raw values to record original calculation, before update_snr() | ||||||
|             self.raw_osnr_ase = [lin2db(divide(c.power.signal, c.power.ase)) |             self.raw_osnr_ase = lin2db(spectral_info.signal / spectral_info.ase) | ||||||
|                                  for c in spectral_info.carriers] |             self.raw_osnr_ase_01nm = self.raw_osnr_ase - ratio_01nm | ||||||
|             self.raw_osnr_ase_01nm = [ase - ratio for ase, ratio |             self.raw_osnr_nli = lin2db(spectral_info.signal / spectral_info.nli) | ||||||
|                                       in zip(self.raw_osnr_ase, ratio_01nm)] |             self.raw_snr = lin2db(spectral_info.signal / (spectral_info.ase + spectral_info.nli)) | ||||||
|             self.raw_osnr_nli = [lin2db(divide(c.power.signal, c.power.nli)) |             self.raw_snr_01nm = self.raw_snr - ratio_01nm | ||||||
|                                  for c in spectral_info.carriers] |  | ||||||
|             self.raw_snr = [lin2db(divide(c.power.signal, c.power.nli + c.power.ase)) |  | ||||||
|                             for c in spectral_info.carriers] |  | ||||||
|             self.raw_snr_01nm = [snr - ratio for snr, ratio |  | ||||||
|                                  in zip(self.raw_snr, ratio_01nm)] |  | ||||||
|  |  | ||||||
|             self.osnr_ase = self.raw_osnr_ase |             self.osnr_ase = self.raw_osnr_ase | ||||||
|             self.osnr_ase_01nm = self.raw_osnr_ase_01nm |             self.osnr_ase_01nm = self.raw_osnr_ase_01nm | ||||||
| @@ -124,14 +143,10 @@ class Transceiver(_Node): | |||||||
|         for s in args: |         for s in args: | ||||||
|             snr_added += db2lin(-s) |             snr_added += db2lin(-s) | ||||||
|         snr_added = -lin2db(snr_added) |         snr_added = -lin2db(snr_added) | ||||||
|         self.osnr_ase = list(map(lambda x, y: snr_sum(x, y, snr_added), |         self.osnr_ase = snr_sum(self.raw_osnr_ase, self.baud_rate, snr_added) | ||||||
|                                  self.raw_osnr_ase, self.baud_rate)) |         self.snr = snr_sum(self.raw_snr, self.baud_rate, snr_added) | ||||||
|         self.snr = list(map(lambda x, y: snr_sum(x, y, snr_added), |         self.osnr_ase_01nm = snr_sum(self.raw_osnr_ase_01nm, 12.5e9, snr_added) | ||||||
|                             self.raw_snr, self.baud_rate)) |         self.snr_01nm = snr_sum(self.raw_snr_01nm, 12.5e9, snr_added) | ||||||
|         self.osnr_ase_01nm = list(map(lambda x: snr_sum(x, 12.5e9, snr_added), |  | ||||||
|                                       self.raw_osnr_ase_01nm)) |  | ||||||
|         self.snr_01nm = list(map(lambda x: snr_sum(x, 12.5e9, snr_added), |  | ||||||
|                                  self.raw_snr_01nm)) |  | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def to_json(self): |     def to_json(self): | ||||||
| @@ -150,7 +165,9 @@ class Transceiver(_Node): | |||||||
|                 f'osnr_nli={self.osnr_nli!r}, ' |                 f'osnr_nli={self.osnr_nli!r}, ' | ||||||
|                 f'snr={self.snr!r}, ' |                 f'snr={self.snr!r}, ' | ||||||
|                 f'chromatic_dispersion={self.chromatic_dispersion!r}, ' |                 f'chromatic_dispersion={self.chromatic_dispersion!r}, ' | ||||||
|                 f'pmd={self.pmd!r})') |                 f'pmd={self.pmd!r}, ' | ||||||
|  |                 f'pdl={self.pdl!r}, ' | ||||||
|  |                 f'penalties={self.penalties!r})') | ||||||
|  |  | ||||||
|     def __str__(self): |     def __str__(self): | ||||||
|         if self.snr is None or self.osnr_ase is None: |         if self.snr is None or self.osnr_ase is None: | ||||||
| @@ -162,46 +179,58 @@ class Transceiver(_Node): | |||||||
|         snr_01nm = round(mean(self.snr_01nm), 2) |         snr_01nm = round(mean(self.snr_01nm), 2) | ||||||
|         cd = mean(self.chromatic_dispersion) |         cd = mean(self.chromatic_dispersion) | ||||||
|         pmd = mean(self.pmd) |         pmd = mean(self.pmd) | ||||||
|  |         pdl = mean(self.pdl) | ||||||
|  |  | ||||||
|         return '\n'.join([f'{type(self).__name__} {self.uid}', |         result = '\n'.join([f'{type(self).__name__} {self.uid}', | ||||||
|  |  | ||||||
|                           f'  GSNR (0.1nm, dB):          {snr_01nm:.2f}', |                           f'  GSNR (0.1nm, dB):          {snr_01nm:.2f}', | ||||||
|                           f'  GSNR (signal bw, dB):      {snr:.2f}', |                           f'  GSNR (signal bw, dB):      {snr:.2f}', | ||||||
|                           f'  OSNR ASE (0.1nm, dB):      {osnr_ase_01nm:.2f}', |                           f'  OSNR ASE (0.1nm, dB):      {osnr_ase_01nm:.2f}', | ||||||
|                           f'  OSNR ASE (signal bw, dB):  {osnr_ase:.2f}', |                           f'  OSNR ASE (signal bw, dB):  {osnr_ase:.2f}', | ||||||
|                           f'  CD (ps/nm):                {cd:.2f}', |                           f'  CD (ps/nm):                {cd:.2f}', | ||||||
|                           f'  PMD (ps):                  {pmd:.2f}']) |                           f'  PMD (ps):                  {pmd:.2f}', | ||||||
|  |                           f'  PDL (dB):                  {pdl:.2f}']) | ||||||
|  |  | ||||||
|  |         cd_penalty = self.penalties.get('chromatic_dispersion') | ||||||
|  |         if cd_penalty is not None: | ||||||
|  |             result += f'\n  CD penalty (dB):           {mean(cd_penalty):.2f}' | ||||||
|  |         pmd_penalty = self.penalties.get('pmd') | ||||||
|  |         if pmd_penalty is not None: | ||||||
|  |             result += f'\n  PMD penalty (dB):          {mean(pmd_penalty):.2f}' | ||||||
|  |         pdl_penalty = self.penalties.get('pdl') | ||||||
|  |         if pdl_penalty is not None: | ||||||
|  |             result += f'\n  PDL penalty (dB):          {mean(pdl_penalty):.2f}' | ||||||
|  |  | ||||||
|  |         return result | ||||||
|  |  | ||||||
|     def __call__(self, spectral_info): |     def __call__(self, spectral_info): | ||||||
|         self._calc_snr(spectral_info) |         self._calc_snr(spectral_info) | ||||||
|         self._calc_cd(spectral_info) |         self._calc_cd(spectral_info) | ||||||
|         self._calc_pmd(spectral_info) |         self._calc_pmd(spectral_info) | ||||||
|  |         self._calc_pdl(spectral_info) | ||||||
|         return spectral_info |         return spectral_info | ||||||
|  |  | ||||||
|  |  | ||||||
| RoadmParams = namedtuple('RoadmParams', 'target_pch_out_db add_drop_osnr pmd restrictions per_degree_pch_out_db') |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class Roadm(_Node): | class Roadm(_Node): | ||||||
|     def __init__(self, *args, params, **kwargs): |     def __init__(self, *args, params=None, **kwargs): | ||||||
|         if 'per_degree_pch_out_db' not in params.keys(): |         if not params: | ||||||
|             params['per_degree_pch_out_db'] = {} |             params = {} | ||||||
|         super().__init__(*args, params=RoadmParams(**params), **kwargs) |         super().__init__(*args, params=RoadmParams(**params), **kwargs) | ||||||
|  |         self.ref_pch_out_dbm = self.params.target_pch_out_db | ||||||
|         self.loss = 0  # auto-design interest |         self.loss = 0  # auto-design interest | ||||||
|         self.effective_loss = None |         self.effective_loss = None | ||||||
|         self.effective_pch_out_db = self.params.target_pch_out_db |  | ||||||
|         self.passive = True |         self.passive = True | ||||||
|         self.restrictions = self.params.restrictions |         self.restrictions = self.params.restrictions | ||||||
|         self.per_degree_pch_out_db = self.params.per_degree_pch_out_db |         self.per_degree_pch_out_dbm = self.params.per_degree_pch_out_db | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def to_json(self): |     def to_json(self): | ||||||
|         return {'uid': self.uid, |         return {'uid': self.uid, | ||||||
|                 'type': type(self).__name__, |                 'type': type(self).__name__, | ||||||
|                 'params': { |                 'params': { | ||||||
|                     'target_pch_out_db': self.effective_pch_out_db, |                     'target_pch_out_db': self.ref_pch_out_dbm, | ||||||
|                     'restrictions': self.restrictions, |                     'restrictions': self.restrictions, | ||||||
|                     'per_degree_pch_out_db': self.per_degree_pch_out_db |                     'per_degree_pch_out_db': self.per_degree_pch_out_dbm | ||||||
|                     }, |                     }, | ||||||
|                 'metadata': { |                 'metadata': { | ||||||
|                     'location': self.metadata['location']._asdict() |                     'location': self.metadata['location']._asdict() | ||||||
| @@ -217,9 +246,9 @@ class Roadm(_Node): | |||||||
|  |  | ||||||
|         return '\n'.join([f'{type(self).__name__} {self.uid}', |         return '\n'.join([f'{type(self).__name__} {self.uid}', | ||||||
|                           f'  effective loss (dB):  {self.effective_loss:.2f}', |                           f'  effective loss (dB):  {self.effective_loss:.2f}', | ||||||
|                           f'  pch out (dBm):        {self.effective_pch_out_db:.2f}']) |                           f'  pch out (dBm):        {self.ref_pch_out_dbm:.2f}']) | ||||||
|  |  | ||||||
|     def propagate(self, pref, *carriers, degree): |     def propagate(self, spectral_info, degree): | ||||||
|         # pin_target and loss are read from eqpt_config.json['Roadm'] |         # pin_target and loss are read from eqpt_config.json['Roadm'] | ||||||
|         # all ingress channels in xpress are set to this power level |         # all ingress channels in xpress are set to this power level | ||||||
|         # but add channels are not, so we define an effective loss |         # but add channels are not, so we define an effective loss | ||||||
| @@ -229,38 +258,39 @@ class Roadm(_Node): | |||||||
|         # if the input power is lower than the target one, use the input power instead because |         # if the input power is lower than the target one, use the input power instead because | ||||||
|         # a ROADM doesn't amplify, it can only attenuate |         # a ROADM doesn't amplify, it can only attenuate | ||||||
|         # TODO maybe add a minimum loss for the ROADM |         # TODO maybe add a minimum loss for the ROADM | ||||||
|         per_degree_pch = self.per_degree_pch_out_db[degree] if degree in self.per_degree_pch_out_db.keys() else self.params.target_pch_out_db |         per_degree_pch = self.per_degree_pch_out_dbm.get(degree, self.ref_pch_out_dbm) | ||||||
|         self.effective_pch_out_db = min(pref.p_spani, per_degree_pch) |         # Definition of ref_pch_out_dbm for the reference channel: | ||||||
|         self.effective_loss = pref.p_spani - self.effective_pch_out_db |         # Depending on propagation upstream from this ROADM, the input power (p_spani) might be smaller than | ||||||
|         carriers_power = array([c.power.signal + c.power.nli + c.power.ase for c in carriers]) |         # the target power out configured for this ROADM degree's egress. Since ROADM does not amplify, | ||||||
|         carriers_att = list(map(lambda x: lin2db(x * 1e3) - per_degree_pch, carriers_power)) |         # the power out of the ROADM for the ref channel is the min value between target power and input power. | ||||||
|         exceeding_att = -min(list(filter(lambda x: x < 0, carriers_att)), default=0) |         # (TODO add a minimum loss for the ROADM crossing) | ||||||
|         carriers_att = list(map(lambda x: db2lin(x + exceeding_att), carriers_att)) |         self.ref_pch_out_dbm = min(spectral_info.pref.p_spani, per_degree_pch) | ||||||
|         for carrier_att, carrier in zip(carriers_att, carriers): |         # Definition of effective_loss: | ||||||
|             pwr = carrier.power |         # Optical power of carriers are equalized by the ROADM, so that the experienced loss is not the same for | ||||||
|             pwr = pwr._replace(signal=pwr.signal / carrier_att, |         # different carriers. effective_loss records the loss for a reference carrier. | ||||||
|                                nli=pwr.nli / carrier_att, |         self.effective_loss = spectral_info.pref.p_spani - self.ref_pch_out_dbm | ||||||
|                                ase=pwr.ase / carrier_att) |         input_power = spectral_info.signal + spectral_info.nli + spectral_info.ase | ||||||
|             pmd = sqrt(carrier.pmd**2 + self.params.pmd**2) |         min_power = min(lin2db(input_power * 1e3)) | ||||||
|             yield carrier._replace(power=pwr, pmd=pmd) |         per_degree_pch = per_degree_pch if per_degree_pch < min_power else min_power | ||||||
|  |         delta_power = lin2db(input_power * 1e3) - per_degree_pch | ||||||
|  |         spectral_info.apply_attenuation_db(delta_power) | ||||||
|  |         spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.params.pmd ** 2) | ||||||
|  |         spectral_info.pdl = sqrt(spectral_info.pdl ** 2 + self.params.pdl ** 2) | ||||||
|  |  | ||||||
|     def update_pref(self, pref): |     def update_pref(self, spectral_info): | ||||||
|         return pref._replace(p_span0=pref.p_span0, p_spani=self.effective_pch_out_db) |         spectral_info.pref = spectral_info.pref._replace(p_span0=spectral_info.pref.p_span0, | ||||||
|  |                                                          p_spani=self.ref_pch_out_dbm) | ||||||
|  |  | ||||||
|     def __call__(self, spectral_info, degree): |     def __call__(self, spectral_info, degree): | ||||||
|         carriers = tuple(self.propagate(spectral_info.pref, *spectral_info.carriers, degree=degree)) |         self.propagate(spectral_info, degree=degree) | ||||||
|         pref = self.update_pref(spectral_info.pref) |         self.update_pref(spectral_info) | ||||||
|         return spectral_info._replace(carriers=carriers, pref=pref) |         return spectral_info | ||||||
|  |  | ||||||
|  |  | ||||||
| FusedParams = namedtuple('FusedParams', 'loss') |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class Fused(_Node): | class Fused(_Node): | ||||||
|     def __init__(self, *args, params=None, **kwargs): |     def __init__(self, *args, params=None, **kwargs): | ||||||
|         if params is None: |         if not params: | ||||||
|             # default loss value if not mentioned in loaded network json |             params = {} | ||||||
|             params = {'loss': 1} |  | ||||||
|         super().__init__(*args, params=FusedParams(**params), **kwargs) |         super().__init__(*args, params=FusedParams(**params), **kwargs) | ||||||
|         self.loss = self.params.loss |         self.loss = self.params.loss | ||||||
|         self.passive = True |         self.passive = True | ||||||
| @@ -284,23 +314,17 @@ class Fused(_Node): | |||||||
|         return '\n'.join([f'{type(self).__name__} {self.uid}', |         return '\n'.join([f'{type(self).__name__} {self.uid}', | ||||||
|                           f'  loss (dB): {self.loss:.2f}']) |                           f'  loss (dB): {self.loss:.2f}']) | ||||||
|  |  | ||||||
|     def propagate(self, *carriers): |     def propagate(self, spectral_info): | ||||||
|         attenuation = db2lin(self.loss) |         spectral_info.apply_attenuation_db(self.loss) | ||||||
|  |  | ||||||
|         for carrier in carriers: |     def update_pref(self, spectral_info): | ||||||
|             pwr = carrier.power |         spectral_info.pref = spectral_info.pref._replace(p_span0=spectral_info.pref.p_span0, | ||||||
|             pwr = pwr._replace(signal=pwr.signal / attenuation, |                                                          p_spani=spectral_info.pref.p_spani - self.loss) | ||||||
|                                nli=pwr.nli / attenuation, |  | ||||||
|                                ase=pwr.ase / attenuation) |  | ||||||
|             yield carrier._replace(power=pwr) |  | ||||||
|  |  | ||||||
|     def update_pref(self, pref): |  | ||||||
|         return pref._replace(p_span0=pref.p_span0, p_spani=pref.p_spani - self.loss) |  | ||||||
|  |  | ||||||
|     def __call__(self, spectral_info): |     def __call__(self, spectral_info): | ||||||
|         carriers = tuple(self.propagate(*spectral_info.carriers)) |         self.propagate(spectral_info) | ||||||
|         pref = self.update_pref(spectral_info.pref) |         self.update_pref(spectral_info) | ||||||
|         return spectral_info._replace(carriers=carriers, pref=pref) |         return spectral_info | ||||||
|  |  | ||||||
|  |  | ||||||
| class Fiber(_Node): | class Fiber(_Node): | ||||||
| @@ -309,7 +333,28 @@ class Fiber(_Node): | |||||||
|             params = {} |             params = {} | ||||||
|         super().__init__(*args, params=FiberParams(**params), **kwargs) |         super().__init__(*args, params=FiberParams(**params), **kwargs) | ||||||
|         self.pch_out_db = None |         self.pch_out_db = None | ||||||
|         self.nli_solver = NliSolver(self) |         self.passive = True | ||||||
|  |  | ||||||
|  |         # Raman efficiency matrix function of the delta frequency constructed such that each row is related to a | ||||||
|  |         # fixed frequency: positive elements represent a gain (from higher frequency) and negative elements represent | ||||||
|  |         # a loss (to lower frequency) | ||||||
|  |         if self.params.raman_efficiency: | ||||||
|  |             frequency_offset = self.params.raman_efficiency['frequency_offset'] | ||||||
|  |             frequency_offset = append(-flip(frequency_offset[1:]), frequency_offset) | ||||||
|  |             cr = self.params.raman_efficiency['cr'] | ||||||
|  |             cr = append(- flip(cr[1:]), cr) | ||||||
|  |             self._cr_function = lambda frequency: interp(frequency, frequency_offset, cr) | ||||||
|  |         else: | ||||||
|  |             self._cr_function = lambda frequency: zeros(squeeze(frequency).shape) | ||||||
|  |  | ||||||
|  |         # Lumped losses | ||||||
|  |         z_lumped_losses = array([lumped['position'] for lumped in self.params.lumped_losses])  # km | ||||||
|  |         lumped_losses_power = array([lumped['loss'] for lumped in self.params.lumped_losses])  # dB | ||||||
|  |         if not ((z_lumped_losses > 0) * (z_lumped_losses < 1e-3 * self.params.length)).all(): | ||||||
|  |             raise NetworkTopologyError("Lumped loss positions must be between 0 and the fiber length " | ||||||
|  |                                        f"({1e-3 * self.params.length} km), boundaries excluded.") | ||||||
|  |         self.lumped_losses = db2lin(- lumped_losses_power)  # [linear units] | ||||||
|  |         self.z_lumped_losses = array(z_lumped_losses) * 1e3  # [m] | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def to_json(self): |     def to_json(self): | ||||||
| @@ -319,7 +364,7 @@ class Fiber(_Node): | |||||||
|                 'params': { |                 'params': { | ||||||
|                     # have to specify each because namedtupple cannot be updated :( |                     # have to specify each because namedtupple cannot be updated :( | ||||||
|                     'length': round(self.params.length * 1e-3, 6), |                     'length': round(self.params.length * 1e-3, 6), | ||||||
|                     'loss_coef': self.params.loss_coef * 1e3, |                     'loss_coef': round(self.params.loss_coef * 1e3, 6), | ||||||
|                     'length_units': 'km', |                     'length_units': 'km', | ||||||
|                     'att_in': self.params.att_in, |                     'att_in': self.params.att_in, | ||||||
|                     'con_in': self.params.con_in, |                     'con_in': self.params.con_in, | ||||||
| @@ -348,43 +393,56 @@ class Fiber(_Node): | |||||||
|                           f'  (conn loss out includes EOL margin defined in eqpt_config.json)', |                           f'  (conn loss out includes EOL margin defined in eqpt_config.json)', | ||||||
|                           f'  pch out (dBm): {self.pch_out_db:.2f}']) |                           f'  pch out (dBm): {self.pch_out_db:.2f}']) | ||||||
|  |  | ||||||
|  |     def loss_coef_func(self, frequency): | ||||||
|  |         frequency = asarray(frequency) | ||||||
|  |         if self.params.loss_coef.size > 1: | ||||||
|  |             try: | ||||||
|  |                 loss_coef = interp1d(self.params.f_loss_ref, self.params.loss_coef)(frequency) | ||||||
|  |             except ValueError: | ||||||
|  |                 raise SpectrumError('The spectrum bandwidth exceeds the frequency interval used to define the fiber ' | ||||||
|  |                                     f'loss coefficient in "{type(self).__name__} {self.uid}".' | ||||||
|  |                                     f'\nSpectrum f_min-f_max: {round(frequency[0]*1e-12,2)}-' | ||||||
|  |                                     f'{round(frequency[-1]*1e-12,2)}' | ||||||
|  |                                     f'\nLoss coefficient f_min-f_max: {round(self.params.f_loss_ref[0]*1e-12,2)}-' | ||||||
|  |                                     f'{round(self.params.f_loss_ref[-1]*1e-12,2)}') | ||||||
|  |         else: | ||||||
|  |             loss_coef = full(frequency.size, self.params.loss_coef) | ||||||
|  |         return squeeze(loss_coef) | ||||||
|  |  | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def loss(self): |     def loss(self): | ||||||
|         """total loss including padding att_in: useful for polymorphism with roadm loss""" |         """total loss including padding att_in: useful for polymorphism with roadm loss""" | ||||||
|         return self.params.loss_coef * self.params.length + self.params.con_in + self.params.con_out + self.params.att_in |         return self.loss_coef_func(self.params.ref_frequency) * self.params.length + \ | ||||||
|  |             self.params.con_in + self.params.con_out + self.params.att_in | ||||||
|  |  | ||||||
|     @property |     def alpha(self, frequency): | ||||||
|     def passive(self): |         """Returns the linear exponent attenuation coefficient such that | ||||||
|         return True |         :math: `lin_attenuation = e^{- alpha length}` | ||||||
|  |  | ||||||
|     def alpha(self, frequencies): |         :param frequency: the frequency at which alpha is computed [Hz] | ||||||
|         """It returns the values of the series expansion of attenuation coefficient alpha(f) for all f in frequencies |         :return: alpha: power attenuation coefficient for f in frequency [Neper/m] | ||||||
|  |  | ||||||
|         :param frequencies: frequencies of series expansion [Hz] |  | ||||||
|         :return: alpha: power attenuation coefficient for f in frequencies [Neper/m] |  | ||||||
|         """ |         """ | ||||||
|         if type(self.params.loss_coef) == dict: |         return self.loss_coef_func(frequency) / (10 * log10(exp(1))) | ||||||
|             alpha = interp(frequencies, self.params.f_loss_ref, self.params.lin_loss_exp) |  | ||||||
|         else: |  | ||||||
|             alpha = self.params.lin_loss_exp * ones(frequencies.shape) |  | ||||||
|  |  | ||||||
|         return alpha |     def cr(self, frequency): | ||||||
|  |         """Returns the raman efficiency matrix including the vibrational loss | ||||||
|  |  | ||||||
|     def alpha0(self, f_ref=193.5e12): |         :param frequency: the frequency at which cr is computed [Hz] | ||||||
|         """It returns the zero element of the series expansion of attenuation coefficient alpha(f) in the |         :return: cr: raman efficiency matrix [1 / (W m)] | ||||||
|         reference frequency f_ref |  | ||||||
|  |  | ||||||
|         :param f_ref: reference frequency of series expansion [Hz] |  | ||||||
|         :return: alpha0: power attenuation coefficient in f_ref [Neper/m] |  | ||||||
|         """ |         """ | ||||||
|         return self.alpha(f_ref * ones(1))[0] |         df = outer(ones(frequency.shape), frequency) - outer(frequency, ones(frequency.shape)) | ||||||
|  |         cr = self._cr_function(df) | ||||||
|  |         vibrational_loss = outer(frequency, ones(frequency.shape)) / outer(ones(frequency.shape), frequency) | ||||||
|  |         return cr * (cr >= 0) + cr * (cr < 0) * vibrational_loss  # Raman efficiency [1/(W m)] | ||||||
|  |  | ||||||
|     def chromatic_dispersion(self, freq=193.5e12): |     def chromatic_dispersion(self, freq=None): | ||||||
|         """Returns accumulated chromatic dispersion (CD). |         """Returns accumulated chromatic dispersion (CD). | ||||||
|  |  | ||||||
|         :param freq: the frequency at which the chromatic dispersion is computed |         :param freq: the frequency at which the chromatic dispersion is computed | ||||||
|         :return: chromatic dispersion: the accumulated dispersion [s/m] |         :return: chromatic dispersion: the accumulated dispersion [s/m] | ||||||
|         """ |         """ | ||||||
|  |         freq = self.params.ref_frequency if freq is None else freq | ||||||
|         beta2 = self.params.beta2 |         beta2 = self.params.beta2 | ||||||
|         beta3 = self.params.beta3 |         beta3 = self.params.beta3 | ||||||
|         ref_f = self.params.ref_frequency |         ref_f = self.params.ref_frequency | ||||||
| @@ -398,147 +456,103 @@ class Fiber(_Node): | |||||||
|         """differential group delay (PMD) [s]""" |         """differential group delay (PMD) [s]""" | ||||||
|         return self.params.pmd_coef * sqrt(self.params.length) |         return self.params.pmd_coef * sqrt(self.params.length) | ||||||
|  |  | ||||||
|     def _gn_analytic(self, carrier, *carriers): |     def propagate(self, spectral_info: SpectralInformation): | ||||||
|         r"""Computes the nonlinear interference power on a single carrier. |         """Modifies the spectral information computing the attenuation, the non-linear interference generation, | ||||||
|         The method uses eq. 120 from `arXiv:1209.0394 <https://arxiv.org/abs/1209.0394>`__. |         the CD and PMD accumulation. | ||||||
|  |  | ||||||
|         :param carrier: the signal under analysis |  | ||||||
|         :param \*carriers: the full WDM comb |  | ||||||
|         :return: carrier_nli: the amount of nonlinear interference in W on the under analysis |  | ||||||
|         """ |         """ | ||||||
|  |         # apply the attenuation due to the input connector loss | ||||||
|  |         attenuation_in_db = self.params.con_in + self.params.att_in | ||||||
|  |         spectral_info.apply_attenuation_db(attenuation_in_db) | ||||||
|  |  | ||||||
|         g_nli = 0 |         # inter channels Raman effect | ||||||
|         for interfering_carrier in carriers: |         stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering(spectral_info, self) | ||||||
|             psi = _psi(carrier, interfering_carrier, beta2=self.params.beta2, |  | ||||||
|                        asymptotic_length=self.params.asymptotic_length) |  | ||||||
|             g_nli += (interfering_carrier.power.signal / interfering_carrier.baud_rate)**2 \ |  | ||||||
|                 * (carrier.power.signal / carrier.baud_rate) * psi |  | ||||||
|  |  | ||||||
|         g_nli *= (16 / 27) * (self.params.gamma * self.params.effective_length)**2 \ |         # NLI noise evaluated at the fiber input | ||||||
|             / (2 * pi * abs(self.params.beta2) * self.params.asymptotic_length) |         spectral_info.nli += NliSolver.compute_nli(spectral_info, stimulated_raman_scattering, self) | ||||||
|  |  | ||||||
|         carrier_nli = carrier.baud_rate * g_nli |         # chromatic dispersion and pmd variations | ||||||
|         return carrier_nli |         spectral_info.chromatic_dispersion += self.chromatic_dispersion(spectral_info.frequency) | ||||||
|  |         spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.pmd ** 2) | ||||||
|  |  | ||||||
|     def propagate(self, *carriers): |         # apply the attenuation due to the fiber losses | ||||||
|         r"""Generator that computes the fiber propagation: attenuation, non-linear interference generation, CD |         attenuation_fiber = stimulated_raman_scattering.loss_profile[:, -1] | ||||||
|         accumulation and PMD accumulation. |         spectral_info.apply_attenuation_lin(attenuation_fiber) | ||||||
|  |  | ||||||
|         :param: \*carriers: the channels at the input of the fiber |         # apply the attenuation due to the output connector loss | ||||||
|         :yield: carrier: the next channel at the output of the fiber |         attenuation_out_db = self.params.con_out | ||||||
|         """ |         spectral_info.apply_attenuation_db(attenuation_out_db) | ||||||
|  |  | ||||||
|         # apply connector_att_in on all carriers before computing gn analytics  premiere partie pas bonne |     def update_pref(self, spectral_info): | ||||||
|         attenuation = db2lin(self.params.con_in + self.params.att_in) |         # in case of Raman, the resulting loss of the fiber is not equivalent to self.loss | ||||||
|  |         # because of Raman gain. In order to correctly update pref, we need the resulting loss: | ||||||
|         chan = [] |         # power_out - power_in. We use the total signal power (sum on all channels) to compute | ||||||
|         for carrier in carriers: |         # this loss, because pref is a noiseless reference. | ||||||
|             pwr = carrier.power |         loss = round(lin2db(self._psig_in / sum(spectral_info.signal)), 2) | ||||||
|             pwr = pwr._replace(signal=pwr.signal / attenuation, |         self.pch_out_db = spectral_info.pref.p_spani - loss | ||||||
|                                nli=pwr.nli / attenuation, |         spectral_info.pref = spectral_info.pref._replace(p_span0=spectral_info.pref.p_span0, | ||||||
|                                ase=pwr.ase / attenuation) |                                                          p_spani=self.pch_out_db) | ||||||
|             carrier = carrier._replace(power=pwr) |  | ||||||
|             chan.append(carrier) |  | ||||||
|  |  | ||||||
|         carriers = tuple(f for f in chan) |  | ||||||
|  |  | ||||||
|         # propagate in the fiber and apply attenuation out |  | ||||||
|         attenuation = db2lin(self.params.con_out) |  | ||||||
|         for carrier in carriers: |  | ||||||
|             pwr = carrier.power |  | ||||||
|             carrier_nli = self._gn_analytic(carrier, *carriers) |  | ||||||
|             pwr = pwr._replace(signal=pwr.signal / self.params.lin_attenuation / attenuation, |  | ||||||
|                                nli=(pwr.nli + carrier_nli) / self.params.lin_attenuation / attenuation, |  | ||||||
|                                ase=pwr.ase / self.params.lin_attenuation / attenuation) |  | ||||||
|             chromatic_dispersion = carrier.chromatic_dispersion + self.chromatic_dispersion(carrier.frequency) |  | ||||||
|             pmd = sqrt(carrier.pmd**2 + self.pmd**2) |  | ||||||
|             yield carrier._replace(power=pwr, chromatic_dispersion=chromatic_dispersion, pmd=pmd) |  | ||||||
|  |  | ||||||
|     def update_pref(self, pref): |  | ||||||
|         self.pch_out_db = round(pref.p_spani - self.loss, 2) |  | ||||||
|         return pref._replace(p_span0=pref.p_span0, p_spani=self.pch_out_db) |  | ||||||
|  |  | ||||||
|     def __call__(self, spectral_info): |     def __call__(self, spectral_info): | ||||||
|         carriers = tuple(self.propagate(*spectral_info.carriers)) |         # _psig_in records the total signal power of the spectral information before propagation. | ||||||
|         pref = self.update_pref(spectral_info.pref) |         self._psig_in = sum(spectral_info.signal) | ||||||
|         return spectral_info._replace(carriers=carriers, pref=pref) |         self.propagate(spectral_info) | ||||||
|  |         self.update_pref(spectral_info) | ||||||
|  |         return spectral_info | ||||||
|  |  | ||||||
|  |  | ||||||
| class RamanFiber(Fiber): | class RamanFiber(Fiber): | ||||||
|     def __init__(self, *args, params=None, **kwargs): |     def __init__(self, *args, params=None, **kwargs): | ||||||
|         super().__init__(*args, params=params, **kwargs) |         super().__init__(*args, params=params, **kwargs) | ||||||
|         if self.operational and 'raman_pumps' in self.operational: |         if not self.operational: | ||||||
|             self.raman_pumps = tuple(PumpParams(p['power'], p['frequency'], p['propagation_direction']) |             raise NetworkTopologyError(f'Fiber element uid:{self.uid} ' | ||||||
|                                      for p in self.operational['raman_pumps']) |                                        'defined as RamanFiber without operational parameters') | ||||||
|         else: |  | ||||||
|             self.raman_pumps = None |         if 'raman_pumps' not in self.operational: | ||||||
|         self.raman_solver = RamanSolver(self) |             raise NetworkTopologyError(f'Fiber element uid:{self.uid} ' | ||||||
|  |                                        'defined as RamanFiber without raman pumps description in operational') | ||||||
|  |  | ||||||
|  |         if 'temperature' not in self.operational: | ||||||
|  |             raise NetworkTopologyError(f'Fiber element uid:{self.uid} ' | ||||||
|  |                                        'defined as RamanFiber without temperature in operational') | ||||||
|  |  | ||||||
|  |         pump_loss = db2lin(self.params.con_out) | ||||||
|  |         self.raman_pumps = tuple(PumpParams(p['power'] / pump_loss, p['frequency'], p['propagation_direction']) | ||||||
|  |                                  for p in self.operational['raman_pumps']) | ||||||
|  |         self.temperature = self.operational['temperature'] | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def to_json(self): |     def to_json(self): | ||||||
|         return dict(super().to_json, operational=self.operational) |         return dict(super().to_json, operational=self.operational) | ||||||
|  |  | ||||||
|     def update_pref(self, pref, *carriers): |     def propagate(self, spectral_info: SpectralInformation): | ||||||
|         pch_out_db = lin2db(mean([carrier.power.signal for carrier in carriers])) + 30 |         """Modifies the spectral information computing the attenuation, the non-linear interference generation, | ||||||
|         self.pch_out_db = round(pch_out_db, 2) |         the CD and PMD accumulation. | ||||||
|         return pref._replace(p_span0=pref.p_span0, p_spani=self.pch_out_db) |         """ | ||||||
|  |         # apply the attenuation due to the input connector loss | ||||||
|  |         attenuation_in_db = self.params.con_in + self.params.att_in | ||||||
|  |         spectral_info.apply_attenuation_db(attenuation_in_db) | ||||||
|  |  | ||||||
|     def __call__(self, spectral_info): |         # Raman pumps and inter channel Raman effect | ||||||
|         carriers = tuple(self.propagate(*spectral_info.carriers)) |         stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering(spectral_info, self) | ||||||
|         pref = self.update_pref(spectral_info.pref, *carriers) |         spontaneous_raman_scattering = \ | ||||||
|         return spectral_info._replace(carriers=carriers, pref=pref) |             RamanSolver.calculate_spontaneous_raman_scattering(spectral_info, stimulated_raman_scattering, self) | ||||||
|  |  | ||||||
|     def propagate(self, *carriers): |         # nli and ase noise evaluated at the fiber input | ||||||
|         for propagated_carrier in propagate_raman_fiber(self, *carriers): |         spectral_info.nli += NliSolver.compute_nli(spectral_info, stimulated_raman_scattering, self) | ||||||
|             chromatic_dispersion = propagated_carrier.chromatic_dispersion + \ |         spectral_info.ase += spontaneous_raman_scattering | ||||||
|                                    self.chromatic_dispersion(propagated_carrier.frequency) |  | ||||||
|             pmd = sqrt(propagated_carrier.pmd**2 + self.pmd**2) |  | ||||||
|             propagated_carrier = propagated_carrier._replace(chromatic_dispersion=chromatic_dispersion, pmd=pmd) |  | ||||||
|             yield propagated_carrier |  | ||||||
|  |  | ||||||
|  |         # chromatic dispersion and pmd variations | ||||||
|  |         spectral_info.chromatic_dispersion += self.chromatic_dispersion(spectral_info.frequency) | ||||||
|  |         spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.pmd ** 2) | ||||||
|  |  | ||||||
| class EdfaParams: |         # apply the attenuation due to the fiber losses | ||||||
|     def __init__(self, **params): |         attenuation_fiber = stimulated_raman_scattering.loss_profile[:spectral_info.number_of_channels, -1] | ||||||
|         self.update_params(params) |  | ||||||
|         if params == {}: |  | ||||||
|             self.type_variety = '' |  | ||||||
|             self.type_def = '' |  | ||||||
|             # self.gain_flatmax = 0 |  | ||||||
|             # self.gain_min = 0 |  | ||||||
|             # self.p_max = 0 |  | ||||||
|             # self.nf_model = None |  | ||||||
|             # self.nf_fit_coeff = None |  | ||||||
|             # self.nf_ripple = None |  | ||||||
|             # self.dgt = None |  | ||||||
|             # self.gain_ripple = None |  | ||||||
|             # self.out_voa_auto = False |  | ||||||
|             # self.allowed_for_design = None |  | ||||||
|  |  | ||||||
|     def update_params(self, kwargs): |         spectral_info.apply_attenuation_lin(attenuation_fiber) | ||||||
|         for k, v in kwargs.items(): |  | ||||||
|             setattr(self, k, self.update_params(**v) if isinstance(v, dict) else v) |  | ||||||
|  |  | ||||||
|  |         # apply the attenuation due to the output connector loss | ||||||
| class EdfaOperational: |         attenuation_out_db = self.params.con_out | ||||||
|     default_values = { |         spectral_info.apply_attenuation_db(attenuation_out_db) | ||||||
|         'gain_target': None, |  | ||||||
|         'delta_p': None, |  | ||||||
|         'out_voa': None, |  | ||||||
|         'tilt_target': 0 |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     def __init__(self, **operational): |  | ||||||
|         self.update_attr(operational) |  | ||||||
|  |  | ||||||
|     def update_attr(self, kwargs): |  | ||||||
|         clean_kwargs = {k: v for k, v in kwargs.items() if v != ''} |  | ||||||
|         for k, v in self.default_values.items(): |  | ||||||
|             setattr(self, k, clean_kwargs.get(k, v)) |  | ||||||
|  |  | ||||||
|     def __repr__(self): |  | ||||||
|         return (f'{type(self).__name__}(' |  | ||||||
|                 f'gain_target={self.gain_target!r}, ' |  | ||||||
|                 f'tilt_target={self.tilt_target!r})') |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class Edfa(_Node): | class Edfa(_Node): | ||||||
| @@ -548,12 +562,7 @@ class Edfa(_Node): | |||||||
|         if operational is None: |         if operational is None: | ||||||
|             operational = {} |             operational = {} | ||||||
|         self.variety_list = kwargs.pop('variety_list', None) |         self.variety_list = kwargs.pop('variety_list', None) | ||||||
|         super().__init__( |         super().__init__(*args, params=EdfaParams(**params), operational=EdfaOperational(**operational), **kwargs) | ||||||
|             *args, |  | ||||||
|             params=EdfaParams(**params), |  | ||||||
|             operational=EdfaOperational(**operational), |  | ||||||
|             **kwargs |  | ||||||
|         ) |  | ||||||
|         self.interpol_dgt = None  # interpolated dynamic gain tilt |         self.interpol_dgt = None  # interpolated dynamic gain tilt | ||||||
|         self.interpol_gain_ripple = None  # gain ripple |         self.interpol_gain_ripple = None  # gain ripple | ||||||
|         self.interpol_nf_ripple = None  # nf_ripple |         self.interpol_nf_ripple = None  # nf_ripple | ||||||
| @@ -579,7 +588,7 @@ class Edfa(_Node): | |||||||
|                 'type': type(self).__name__, |                 'type': type(self).__name__, | ||||||
|                 'type_variety': self.params.type_variety, |                 'type_variety': self.params.type_variety, | ||||||
|                 'operational': { |                 'operational': { | ||||||
|                     'gain_target': self.effective_gain, |                     'gain_target': round(self.effective_gain, 6), | ||||||
|                     'delta_p': self.delta_p, |                     'delta_p': self.delta_p, | ||||||
|                     'tilt_target': self.tilt_target, |                     'tilt_target': self.tilt_target, | ||||||
|                     'out_voa': self.out_voa |                     'out_voa': self.out_voa | ||||||
| @@ -619,44 +628,50 @@ class Edfa(_Node): | |||||||
|                           f'  effective pch (dBm):    {self.effective_pch_out_db:.2f}', |                           f'  effective pch (dBm):    {self.effective_pch_out_db:.2f}', | ||||||
|                           f'  output VOA (dB):        {self.out_voa:.2f}']) |                           f'  output VOA (dB):        {self.out_voa:.2f}']) | ||||||
|  |  | ||||||
|     def interpol_params(self, frequencies, pin, baud_rates, pref): |     def interpol_params(self, spectral_info): | ||||||
|         """interpolate SI channel frequencies with the edfa dgt and gain_ripple frquencies from JSON |         """interpolate SI channel frequencies with the edfa dgt and gain_ripple frquencies from JSON | ||||||
|  |         :param spectral_info: instance of gnpy.core.info.SpectralInformation | ||||||
|  |         :return: None | ||||||
|         """ |         """ | ||||||
|         # TODO|jla: read amplifier actual frequencies from additional params in json |         # TODO|jla: read amplifier actual frequencies from additional params in json | ||||||
|         self.channel_freq = frequencies |  | ||||||
|  |  | ||||||
|  |         self.channel_freq = spectral_info.frequency | ||||||
|         amplifier_freq = arrange_frequencies(len(self.params.dgt), self.params.f_min, self.params.f_max)  # Hz |         amplifier_freq = arrange_frequencies(len(self.params.dgt), self.params.f_min, self.params.f_max)  # Hz | ||||||
|         self.interpol_dgt = interp(self.channel_freq, amplifier_freq, self.params.dgt) |         self.interpol_dgt = interp(spectral_info.frequency, amplifier_freq, self.params.dgt) | ||||||
|  |  | ||||||
|         amplifier_freq = arrange_frequencies(len(self.params.gain_ripple), self.params.f_min, self.params.f_max)  # Hz |         amplifier_freq = arrange_frequencies(len(self.params.gain_ripple), self.params.f_min, self.params.f_max)  # Hz | ||||||
|         self.interpol_gain_ripple = interp(self.channel_freq, amplifier_freq, self.params.gain_ripple) |         self.interpol_gain_ripple = interp(spectral_info.frequency, amplifier_freq, self.params.gain_ripple) | ||||||
|  |  | ||||||
|         amplifier_freq = arrange_frequencies(len(self.params.nf_ripple), self.params.f_min, self.params.f_max)  # Hz |         amplifier_freq = arrange_frequencies(len(self.params.nf_ripple), self.params.f_min, self.params.f_max)  # Hz | ||||||
|         self.interpol_nf_ripple = interp(self.channel_freq, amplifier_freq, self.params.nf_ripple) |         self.interpol_nf_ripple = interp(spectral_info.frequency, amplifier_freq, self.params.nf_ripple) | ||||||
|  |  | ||||||
|         self.nch = frequencies.size |         self.nch = spectral_info.number_of_channels | ||||||
|         self.pin_db = lin2db(sum(pin * 1e3)) |         pin = spectral_info.signal + spectral_info.ase + spectral_info.nli | ||||||
|  |         self.pin_db = watt2dbm(sum(pin)) | ||||||
|  |         # The following should be changed when we have the new spectral information including slot widths. | ||||||
|  |         # For now, with homogeneous spectrum, we can calculate it as the difference between neighbouring channels. | ||||||
|  |         self.slot_width = self.channel_freq[1] - self.channel_freq[0] | ||||||
|  |  | ||||||
|         """in power mode: delta_p is defined and can be used to calculate the power target |         """in power mode: delta_p is defined and can be used to calculate the power target | ||||||
|         This power target is used calculate the amplifier gain""" |         This power target is used calculate the amplifier gain""" | ||||||
|  |         pref = spectral_info.pref | ||||||
|         if self.delta_p is not None: |         if self.delta_p is not None: | ||||||
|             self.target_pch_out_db = round(self.delta_p + pref.p_span0, 2) |             self.target_pch_out_db = round(self.delta_p + pref.p_span0, 2) | ||||||
|             self.effective_gain = self.target_pch_out_db - pref.p_spani |             self.effective_gain = self.target_pch_out_db - pref.p_spani | ||||||
|  |  | ||||||
|         """check power saturation and correct effective gain & power accordingly:""" |         """check power saturation and correct effective gain & power accordingly:""" | ||||||
|  |         # Compute the saturation accounting for actual power at the input of the amp | ||||||
|         self.effective_gain = min( |         self.effective_gain = min( | ||||||
|             self.effective_gain, |             self.effective_gain, | ||||||
|             self.params.p_max - (pref.p_spani + pref.neq_ch) |             self.params.p_max - self.pin_db | ||||||
|         ) |         ) | ||||||
|         #print(self.uid, self.effective_gain, self.operational.gain_target) |  | ||||||
|         self.effective_pch_out_db = round(pref.p_spani + self.effective_gain, 2) |         self.effective_pch_out_db = round(pref.p_spani + self.effective_gain, 2) | ||||||
|  |  | ||||||
|         """check power saturation and correct target_gain accordingly:""" |         """check power saturation and correct target_gain accordingly:""" | ||||||
|         #print(self.uid, self.effective_gain, self.pin_db, pref.p_spani) |  | ||||||
|         self.nf = self._calc_nf() |         self.nf = self._calc_nf() | ||||||
|         self.gprofile = self._gain_profile(pin) |         self.gprofile = self._gain_profile(pin) | ||||||
|  |  | ||||||
|         pout = (pin + self.noise_profile(baud_rates)) * db2lin(self.gprofile) |         pout = (pin + self.noise_profile(spectral_info)) * db2lin(self.gprofile) | ||||||
|         self.pout_db = lin2db(sum(pout * 1e3)) |         self.pout_db = lin2db(sum(pout * 1e3)) | ||||||
|         # ase & nli are only calculated in signal bandwidth |         # ase & nli are only calculated in signal bandwidth | ||||||
|         #    pout_db is not the absolute full output power (negligible if sufficient channels) |         #    pout_db is not the absolute full output power (negligible if sufficient channels) | ||||||
| @@ -673,13 +688,17 @@ class Edfa(_Node): | |||||||
|         elif type_def == 'fixed_gain': |         elif type_def == 'fixed_gain': | ||||||
|             nf_avg = nf_model.nf0 |             nf_avg = nf_model.nf0 | ||||||
|         elif type_def == 'openroadm': |         elif type_def == 'openroadm': | ||||||
|             pin_ch = self.pin_db - lin2db(self.nch) |             # OpenROADM specifies OSNR vs. input power per channel for 50 GHz slot width so we | ||||||
|             # model OSNR = f(Pin) |             # scale it to 50 GHz based on actual slot width. | ||||||
|             nf_avg = pin_ch - polyval(nf_model.nf_coef, pin_ch) + 58 |             pin_ch_50GHz = self.pin_db - lin2db(self.nch) + lin2db(50e9 / self.slot_width) | ||||||
|  |             # model OSNR = f(Pin per 50 GHz channel) | ||||||
|  |             nf_avg = pin_ch_50GHz - polyval(nf_model.nf_coef, pin_ch_50GHz) + 58 | ||||||
|         elif type_def == 'openroadm_preamp': |         elif type_def == 'openroadm_preamp': | ||||||
|             pin_ch = self.pin_db - lin2db(self.nch) |             # OpenROADM specifies OSNR vs. input power per channel for 50 GHz slot width so we | ||||||
|             # model OSNR = f(Pin) |             # scale it to 50 GHz based on actual slot width. | ||||||
|             nf_avg = pin_ch - min((4 * pin_ch + 275) / 7, 33) + 58 |             pin_ch_50GHz = self.pin_db - lin2db(self.nch) + lin2db(50e9 / self.slot_width) | ||||||
|  |             # model OSNR = f(Pin per 50 GHz channel) | ||||||
|  |             nf_avg = pin_ch_50GHz - min((4 * pin_ch_50GHz + 275) / 7, 33) + 58 | ||||||
|         elif type_def == 'openroadm_booster': |         elif type_def == 'openroadm_booster': | ||||||
|             # model a zero-noise amp with "infinitely negative" (in dB) NF |             # model a zero-noise amp with "infinitely negative" (in dB) NF | ||||||
|             nf_avg = float('-inf') |             nf_avg = float('-inf') | ||||||
| @@ -725,13 +744,8 @@ class Edfa(_Node): | |||||||
|         else: |         else: | ||||||
|             return self.interpol_nf_ripple + nf_avg  # input VOA = 1 for 1 NF degradation |             return self.interpol_nf_ripple + nf_avg  # input VOA = 1 for 1 NF degradation | ||||||
|  |  | ||||||
|     def noise_profile(self, df): |     def noise_profile(self, spectral_info: SpectralInformation): | ||||||
|         """noise_profile(bw) computes amplifier ASE (W) in signal bandwidth (Hz) |         """Computes amplifier ASE noise integrated over the signal bandwidth. This is calculated at amplifier input. | ||||||
|  |  | ||||||
|         Noise is calculated at amplifier input |  | ||||||
|  |  | ||||||
|         :bw: signal bandwidth = baud rate in Hz |  | ||||||
|         :type bw: float |  | ||||||
|  |  | ||||||
|         :return: the asepower in W in the signal bandwidth bw for 96 channels |         :return: the asepower in W in the signal bandwidth bw for 96 channels | ||||||
|         :return type: numpy array of float |         :return type: numpy array of float | ||||||
| @@ -767,7 +781,7 @@ class Edfa(_Node): | |||||||
|         quoting power spectral density in the same BW for both signal and ASE, |         quoting power spectral density in the same BW for both signal and ASE, | ||||||
|         e.g. 12.5GHz.""" |         e.g. 12.5GHz.""" | ||||||
|  |  | ||||||
|         ase = h * df * self.channel_freq * db2lin(self.nf)  # W |         ase = h * spectral_info.baud_rate * spectral_info.frequency * db2lin(self.nf)  # W | ||||||
|         return ase  # in W at amplifier input |         return ase  # in W at amplifier input | ||||||
|  |  | ||||||
|     def _gain_profile(self, pin, err_tolerance=1.0e-11, simple_opt=True): |     def _gain_profile(self, pin, err_tolerance=1.0e-11, simple_opt=True): | ||||||
| @@ -873,30 +887,24 @@ class Edfa(_Node): | |||||||
|  |  | ||||||
|         return g1st - voa + array(self.interpol_dgt) * dgts3 |         return g1st - voa + array(self.interpol_dgt) * dgts3 | ||||||
|  |  | ||||||
|     def propagate(self, pref, *carriers): |     def propagate(self, spectral_info): | ||||||
|         """add ASE noise to the propagating carriers of :class:`.info.SpectralInformation`""" |         """add ASE noise to the propagating carriers of :class:`.info.SpectralInformation`""" | ||||||
|         pin = array([c.power.signal + c.power.nli + c.power.ase for c in carriers])  # pin in W |  | ||||||
|         freq = array([c.frequency for c in carriers]) |  | ||||||
|         brate = array([c.baud_rate for c in carriers]) |  | ||||||
|         # interpolate the amplifier vectors with the carriers freq, calculate nf & gain profile |         # interpolate the amplifier vectors with the carriers freq, calculate nf & gain profile | ||||||
|         self.interpol_params(freq, pin, brate, pref) |         self.interpol_params(spectral_info) | ||||||
|  |  | ||||||
|         gains = db2lin(self.gprofile) |         ase = self.noise_profile(spectral_info) | ||||||
|         carrier_ases = self.noise_profile(brate) |         spectral_info.ase += ase | ||||||
|         att = db2lin(self.out_voa) |  | ||||||
|  |  | ||||||
|         for gain, carrier_ase, carrier in zip(gains, carrier_ases, carriers): |         spectral_info.apply_gain_db(self.gprofile - self.out_voa) | ||||||
|             pwr = carrier.power |         spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.params.pmd ** 2) | ||||||
|             pwr = pwr._replace(signal=pwr.signal * gain / att, |         spectral_info.pdl = sqrt(spectral_info.pdl ** 2 + self.params.pdl ** 2) | ||||||
|                                nli=pwr.nli * gain / att, |  | ||||||
|                                ase=(pwr.ase + carrier_ase) * gain / att) |  | ||||||
|             yield carrier._replace(power=pwr) |  | ||||||
|  |  | ||||||
|     def update_pref(self, pref): |     def update_pref(self, spectral_info): | ||||||
|         return pref._replace(p_span0=pref.p_span0, |         spectral_info.pref = \ | ||||||
|                              p_spani=pref.p_spani + self.effective_gain - self.out_voa) |             spectral_info.pref._replace(p_span0=spectral_info.pref.p_span0, | ||||||
|  |                                         p_spani=spectral_info.pref.p_spani + self.effective_gain - self.out_voa) | ||||||
|  |  | ||||||
|     def __call__(self, spectral_info): |     def __call__(self, spectral_info): | ||||||
|         carriers = tuple(self.propagate(spectral_info.pref, *spectral_info.carriers)) |         self.propagate(spectral_info) | ||||||
|         pref = self.update_pref(spectral_info.pref) |         self.update_pref(spectral_info) | ||||||
|         return spectral_info._replace(carriers=carriers, pref=pref) |         return spectral_info | ||||||
|   | |||||||
| @@ -35,6 +35,7 @@ def trx_mode_params(equipment, trx_type_variety='', trx_mode='', error_message=F | |||||||
|             mode_params = {"format": "undetermined", |             mode_params = {"format": "undetermined", | ||||||
|                            "baud_rate": None, |                            "baud_rate": None, | ||||||
|                            "OSNR": None, |                            "OSNR": None, | ||||||
|  |                            "penalties": None, | ||||||
|                            "bit_rate": None, |                            "bit_rate": None, | ||||||
|                            "roll_off": None, |                            "roll_off": None, | ||||||
|                            "tx_osnr": None, |                            "tx_osnr": None, | ||||||
| @@ -59,6 +60,7 @@ def trx_mode_params(equipment, trx_type_variety='', trx_mode='', error_message=F | |||||||
|             trx_params['baud_rate'] = default_si_data.baud_rate |             trx_params['baud_rate'] = default_si_data.baud_rate | ||||||
|             trx_params['spacing'] = default_si_data.spacing |             trx_params['spacing'] = default_si_data.spacing | ||||||
|             trx_params['OSNR'] = None |             trx_params['OSNR'] = None | ||||||
|  |             trx_params['penalties'] = {} | ||||||
|             trx_params['bit_rate'] = None |             trx_params['bit_rate'] = None | ||||||
|             trx_params['cost'] = None |             trx_params['cost'] = None | ||||||
|             trx_params['roll_off'] = default_si_data.roll_off |             trx_params['roll_off'] = default_si_data.roll_off | ||||||
|   | |||||||
| @@ -8,24 +8,36 @@ gnpy.core.info | |||||||
| This module contains classes for modelling :class:`SpectralInformation`. | This module contains classes for modelling :class:`SpectralInformation`. | ||||||
| """ | """ | ||||||
|  |  | ||||||
|  | from __future__ import annotations | ||||||
| from collections import namedtuple | from collections import namedtuple | ||||||
| from gnpy.core.utils import automatic_nch, lin2db | from collections.abc import Iterable | ||||||
|  | from typing import Union | ||||||
|  | from numpy import argsort, mean, array, append, ones, ceil, any, zeros, outer, full, ndarray, asarray | ||||||
|  |  | ||||||
|  | from gnpy.core.utils import automatic_nch, lin2db, db2lin | ||||||
|  | from gnpy.core.exceptions import SpectrumError | ||||||
|  |  | ||||||
|  | DEFAULT_SLOT_WIDTH_STEP = 12.5e9  # Hz | ||||||
|  | """Channels with unspecified slot width will have their slot width evaluated as the baud rate rounded up to the minimum | ||||||
|  | multiple of the DEFAULT_SLOT_WIDTH_STEP (the baud rate is extended including the roll off in this evaluation)""" | ||||||
|  |  | ||||||
|  |  | ||||||
| class Power(namedtuple('Power', 'signal nli ase')): | class Power(namedtuple('Power', 'signal nli ase')): | ||||||
|     """carriers power in W""" |     """carriers power in W""" | ||||||
|  |  | ||||||
|  |  | ||||||
| class Channel(namedtuple('Channel', 'channel_number frequency baud_rate roll_off power chromatic_dispersion pmd')): | class Channel(namedtuple('Channel', | ||||||
|  |                          'channel_number frequency baud_rate slot_width roll_off power chromatic_dispersion pmd pdl')): | ||||||
|     """ Class containing the parameters of a WDM signal. |     """ Class containing the parameters of a WDM signal. | ||||||
|  |  | ||||||
|         :param channel_number: channel number in the WDM grid |         :param channel_number: channel number in the WDM grid | ||||||
|         :param frequency: central frequency of the signal (Hz) |         :param frequency: central frequency of the signal (Hz) | ||||||
|         :param baud_rate: the symbol rate of the signal (Baud) |         :param baud_rate: the symbol rate of the signal (Baud) | ||||||
|  |         :param slot_width: the slot width (Hz) | ||||||
|         :param roll_off: the roll off of the signal. It is a pure number between 0 and 1 |         :param roll_off: the roll off of the signal. It is a pure number between 0 and 1 | ||||||
|         :param power (gnpy.core.info.Power): power of signal, ASE noise and NLI (W) |         :param power (gnpy.core.info.Power): power of signal, ASE noise and NLI (W) | ||||||
|         :param chromatic_dispersion: chromatic dispersion (s/m) |         :param chromatic_dispersion: chromatic dispersion (s/m) | ||||||
|         :param pmd: polarization mode dispersion (s) |         :param pmd: polarization mode dispersion (s) | ||||||
|  |         :param pdl: polarization dependent loss (dB) | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -36,21 +48,217 @@ class Pref(namedtuple('Pref', 'p_span0, p_spani, neq_ch ')): | |||||||
|     neq_ch: equivalent channel count in dB""" |     neq_ch: equivalent channel count in dB""" | ||||||
|  |  | ||||||
|  |  | ||||||
| class SpectralInformation(namedtuple('SpectralInformation', 'pref carriers')): | class SpectralInformation(object): | ||||||
|  |     """ Class containing the parameters of the entire WDM comb.""" | ||||||
|  |  | ||||||
|     def __new__(cls, pref, carriers): |     def __init__(self, frequency: array, baud_rate: array, slot_width: array, signal: array, nli: array, ase: array, | ||||||
|         return super().__new__(cls, pref, carriers) |                  roll_off: array, chromatic_dispersion: array, pmd: array, pdl: array): | ||||||
|  |         indices = argsort(frequency) | ||||||
|  |         self._frequency = frequency[indices] | ||||||
|  |         self._df = outer(ones(frequency.shape), frequency) - outer(frequency, ones(frequency.shape)) | ||||||
|  |         self._number_of_channels = len(self._frequency) | ||||||
|  |         self._channel_number = [*range(1, self._number_of_channels + 1)] | ||||||
|  |         self._slot_width = slot_width[indices] | ||||||
|  |         self._baud_rate = baud_rate[indices] | ||||||
|  |         overlap = self._frequency[:-1] + self._slot_width[:-1] / 2 > self._frequency[1:] - self._slot_width[1:] / 2 | ||||||
|  |         if any(overlap): | ||||||
|  |             overlap = [pair for pair in zip(overlap * self._channel_number[:-1], overlap * self._channel_number[1:]) | ||||||
|  |                        if pair != (0, 0)] | ||||||
|  |             raise SpectrumError(f'Spectrum required slot widths larger than the frequency spectral distances ' | ||||||
|  |                                 f'between channels: {overlap}.') | ||||||
|  |         exceed = self._baud_rate > self._slot_width | ||||||
|  |         if any(exceed): | ||||||
|  |             raise SpectrumError(f'Spectrum baud rate, including the roll off, larger than the slot width for channels: ' | ||||||
|  |                                 f'{[ch for ch in exceed * self._channel_number if ch]}.') | ||||||
|  |         self._signal = signal[indices] | ||||||
|  |         self._nli = nli[indices] | ||||||
|  |         self._ase = ase[indices] | ||||||
|  |         self._roll_off = roll_off[indices] | ||||||
|  |         self._chromatic_dispersion = chromatic_dispersion[indices] | ||||||
|  |         self._pmd = pmd[indices] | ||||||
|  |         self._pdl = pdl[indices] | ||||||
|  |         pref = lin2db(mean(signal) * 1e3) | ||||||
|  |         self._pref = Pref(pref, pref, lin2db(self._number_of_channels)) | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def pref(self): | ||||||
|  |         """Instance of gnpy.info.Pref""" | ||||||
|  |         return self._pref | ||||||
|  |  | ||||||
|  |     @pref.setter | ||||||
|  |     def pref(self, pref: Pref): | ||||||
|  |         self._pref = pref | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def frequency(self): | ||||||
|  |         return self._frequency | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def df(self): | ||||||
|  |         """Matrix of relative frequency distances between all channels. Positive elements in the upper right side.""" | ||||||
|  |         return self._df | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def slot_width(self): | ||||||
|  |         return self._slot_width | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def baud_rate(self): | ||||||
|  |         return self._baud_rate | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def number_of_channels(self): | ||||||
|  |         return self._number_of_channels | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def powers(self): | ||||||
|  |         powers = zip(self.signal, self.nli, self.ase) | ||||||
|  |         return [Power(*p) for p in powers] | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def signal(self): | ||||||
|  |         return self._signal | ||||||
|  |  | ||||||
|  |     @signal.setter | ||||||
|  |     def signal(self, signal): | ||||||
|  |         self._signal = signal | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def nli(self): | ||||||
|  |         return self._nli | ||||||
|  |  | ||||||
|  |     @nli.setter | ||||||
|  |     def nli(self, nli): | ||||||
|  |         self._nli = nli | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def ase(self): | ||||||
|  |         return self._ase | ||||||
|  |  | ||||||
|  |     @ase.setter | ||||||
|  |     def ase(self, ase): | ||||||
|  |         self._ase = ase | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def roll_off(self): | ||||||
|  |         return self._roll_off | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def chromatic_dispersion(self): | ||||||
|  |         return self._chromatic_dispersion | ||||||
|  |  | ||||||
|  |     @chromatic_dispersion.setter | ||||||
|  |     def chromatic_dispersion(self, chromatic_dispersion): | ||||||
|  |         self._chromatic_dispersion = chromatic_dispersion | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def pmd(self): | ||||||
|  |         return self._pmd | ||||||
|  |  | ||||||
|  |     @pmd.setter | ||||||
|  |     def pmd(self, pmd): | ||||||
|  |         self._pmd = pmd | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def pdl(self): | ||||||
|  |         return self._pdl | ||||||
|  |  | ||||||
|  |     @pdl.setter | ||||||
|  |     def pdl(self, pdl): | ||||||
|  |         self._pdl = pdl | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def channel_number(self): | ||||||
|  |         return self._channel_number | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def carriers(self): | ||||||
|  |         entries = zip(self.channel_number, self.frequency, self.baud_rate, self.slot_width, | ||||||
|  |                       self.roll_off, self.powers, self.chromatic_dispersion, self.pmd, self.pdl) | ||||||
|  |         return [Channel(*entry) for entry in entries] | ||||||
|  |  | ||||||
|  |     def apply_attenuation_lin(self, attenuation_lin): | ||||||
|  |         self.signal *= attenuation_lin | ||||||
|  |         self.nli *= attenuation_lin | ||||||
|  |         self.ase *= attenuation_lin | ||||||
|  |  | ||||||
|  |     def apply_attenuation_db(self, attenuation_db): | ||||||
|  |         attenuation_lin = 1 / db2lin(attenuation_db) | ||||||
|  |         self.apply_attenuation_lin(attenuation_lin) | ||||||
|  |  | ||||||
|  |     def apply_gain_lin(self, gain_lin): | ||||||
|  |         self.signal *= gain_lin | ||||||
|  |         self.nli *= gain_lin | ||||||
|  |         self.ase *= gain_lin | ||||||
|  |  | ||||||
|  |     def apply_gain_db(self, gain_db): | ||||||
|  |         gain_lin = db2lin(gain_db) | ||||||
|  |         self.apply_gain_lin(gain_lin) | ||||||
|  |  | ||||||
|  |     def __add__(self, other: SpectralInformation): | ||||||
|  |         try: | ||||||
|  |             return SpectralInformation(frequency=append(self.frequency, other.frequency), | ||||||
|  |                                        slot_width=append(self.slot_width, other.slot_width), | ||||||
|  |                                        signal=append(self.signal, other.signal), nli=append(self.nli, other.nli), | ||||||
|  |                                        ase=append(self.ase, other.ase), | ||||||
|  |                                        baud_rate=append(self.baud_rate, other.baud_rate), | ||||||
|  |                                        roll_off=append(self.roll_off, other.roll_off), | ||||||
|  |                                        chromatic_dispersion=append(self.chromatic_dispersion, | ||||||
|  |                                                                    other.chromatic_dispersion), | ||||||
|  |                                        pmd=append(self.pmd, other.pmd), | ||||||
|  |                                        pdl=append(self.pdl, other.pdl)) | ||||||
|  |         except SpectrumError: | ||||||
|  |             raise SpectrumError('Spectra cannot be summed: channels overlapping.') | ||||||
|  |  | ||||||
|  |     def _replace(self, carriers, pref): | ||||||
|  |         self.chromatic_dispersion = array([c.chromatic_dispersion for c in carriers]) | ||||||
|  |         self.pmd = array([c.pmd for c in carriers]) | ||||||
|  |         self.pdl = array([c.pdl for c in carriers]) | ||||||
|  |         self.signal = array([c.power.signal for c in carriers]) | ||||||
|  |         self.nli = array([c.power.nli for c in carriers]) | ||||||
|  |         self.ase = array([c.power.ase for c in carriers]) | ||||||
|  |         self.pref = pref | ||||||
|  |         return self | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def create_arbitrary_spectral_information(frequency: Union[ndarray, Iterable, int, float], | ||||||
|  |                                           signal: Union[int, float, ndarray, Iterable], | ||||||
|  |                                           baud_rate: Union[int, float, ndarray, Iterable], | ||||||
|  |                                           slot_width: Union[int, float, ndarray, Iterable] = None, | ||||||
|  |                                           roll_off: Union[int, float, ndarray, Iterable] = 0., | ||||||
|  |                                           chromatic_dispersion: Union[int, float, ndarray, Iterable] = 0., | ||||||
|  |                                           pmd: Union[int, float, ndarray, Iterable] = 0., | ||||||
|  |                                           pdl: Union[int, float, ndarray, Iterable] = 0.): | ||||||
|  |     """This is just a wrapper around the SpectralInformation.__init__() that simplifies the creation of | ||||||
|  |     a non-uniform spectral information with NLI and ASE powers set to zero.""" | ||||||
|  |     frequency = asarray(frequency) | ||||||
|  |     number_of_channels = frequency.size | ||||||
|  |     try: | ||||||
|  |         signal = full(number_of_channels, signal) | ||||||
|  |         baud_rate = full(number_of_channels, baud_rate) | ||||||
|  |         roll_off = full(number_of_channels, roll_off) | ||||||
|  |         slot_width = full(number_of_channels, slot_width) if slot_width is not None else \ | ||||||
|  |             ceil((1 + roll_off) * baud_rate / DEFAULT_SLOT_WIDTH_STEP) * DEFAULT_SLOT_WIDTH_STEP | ||||||
|  |         chromatic_dispersion = full(number_of_channels, chromatic_dispersion) | ||||||
|  |         pmd = full(number_of_channels, pmd) | ||||||
|  |         pdl = full(number_of_channels, pdl) | ||||||
|  |         nli = zeros(number_of_channels) | ||||||
|  |         ase = zeros(number_of_channels) | ||||||
|  |         return SpectralInformation(frequency=frequency, slot_width=slot_width, | ||||||
|  |                                    signal=signal, nli=nli, ase=ase, | ||||||
|  |                                    baud_rate=baud_rate, roll_off=roll_off, | ||||||
|  |                                    chromatic_dispersion=chromatic_dispersion, | ||||||
|  |                                    pmd=pmd, pdl=pdl) | ||||||
|  |     except ValueError as e: | ||||||
|  |         if 'could not broadcast' in str(e): | ||||||
|  |             raise SpectrumError('Dimension mismatch in input fields.') | ||||||
|  |         else: | ||||||
|  |             raise | ||||||
|  |  | ||||||
|  |  | ||||||
| def create_input_spectral_information(f_min, f_max, roll_off, baud_rate, power, spacing): | def create_input_spectral_information(f_min, f_max, roll_off, baud_rate, power, spacing): | ||||||
|     # pref in dB : convert power lin into power in dB |     """ Creates a fixed slot width spectral information with flat power """ | ||||||
|     pref = lin2db(power * 1e3) |  | ||||||
|     nb_channel = automatic_nch(f_min, f_max, spacing) |     nb_channel = automatic_nch(f_min, f_max, spacing) | ||||||
|     si = SpectralInformation( |     frequency = [(f_min + spacing * i) for i in range(1, nb_channel + 1)] | ||||||
|         pref=Pref(pref, pref, lin2db(nb_channel)), |     return create_arbitrary_spectral_information(frequency, slot_width=spacing, signal=power, baud_rate=baud_rate, | ||||||
|         carriers=[ |                                                  roll_off=roll_off) | ||||||
|             Channel(f, (f_min + spacing * f), |  | ||||||
|                     baud_rate, roll_off, Power(power, 0, 0), 0, 0) for f in range(1, nb_channel + 1) |  | ||||||
|         ] |  | ||||||
|     ) |  | ||||||
|     return si |  | ||||||
|   | |||||||
| @@ -27,6 +27,7 @@ def edfa_nf(gain_target, variety_type, equipment): | |||||||
|     ) |     ) | ||||||
|     amp.pin_db = 0 |     amp.pin_db = 0 | ||||||
|     amp.nch = 88 |     amp.nch = 88 | ||||||
|  |     amp.slot_width = 50e9 | ||||||
|     return amp._calc_nf(True) |     return amp._calc_nf(True) | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -237,7 +238,7 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d | |||||||
|     """ |     """ | ||||||
|     power_mode = equipment['Span']['default'].power_mode |     power_mode = equipment['Span']['default'].power_mode | ||||||
|     next_oms = (n for n in network.successors(this_node) if not isinstance(n, elements.Transceiver)) |     next_oms = (n for n in network.successors(this_node) if not isinstance(n, elements.Transceiver)) | ||||||
|     this_node_degree = {k: v for k, v in this_node.per_degree_pch_out_db.items()} if hasattr(this_node, 'per_degree_pch_out_db') else {} |     this_node_degree = getattr(this_node, 'per_degree_pch_out_dbm', {}) | ||||||
|     for oms in next_oms: |     for oms in next_oms: | ||||||
|         # go through all the OMS departing from the ROADM |         # go through all the OMS departing from the ROADM | ||||||
|         prev_node = this_node |         prev_node = this_node | ||||||
| @@ -282,7 +283,7 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d | |||||||
|  |  | ||||||
|                 if isinstance(prev_node, elements.Fiber): |                 if isinstance(prev_node, elements.Fiber): | ||||||
|                     max_fiber_lineic_loss_for_raman = \ |                     max_fiber_lineic_loss_for_raman = \ | ||||||
|                         equipment['Span']['default'].max_fiber_lineic_loss_for_raman |                         equipment['Span']['default'].max_fiber_lineic_loss_for_raman * 1e-3  # dB/m | ||||||
|                     raman_allowed = prev_node.params.loss_coef < max_fiber_lineic_loss_for_raman |                     raman_allowed = prev_node.params.loss_coef < max_fiber_lineic_loss_for_raman | ||||||
|                 else: |                 else: | ||||||
|                     raman_allowed = False |                     raman_allowed = False | ||||||
| @@ -303,9 +304,14 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d | |||||||
|                     node.params.update_params(extra_params.__dict__) |                     node.params.update_params(extra_params.__dict__) | ||||||
|                     dp += power_reduction |                     dp += power_reduction | ||||||
|                     gain_target += power_reduction |                     gain_target += power_reduction | ||||||
|                 elif node.params.raman and not raman_allowed: |  | ||||||
|                     print(f'{ansi_escapes.red}WARNING{ansi_escapes.reset}: raman is used in node {node.uid}\n but fiber lineic loss is above threshold\n') |  | ||||||
|                 else: |                 else: | ||||||
|  |                     if node.params.raman and not raman_allowed: | ||||||
|  |                         if isinstance(prev_node, elements.Fiber): | ||||||
|  |                             print(f'{ansi_escapes.red}WARNING{ansi_escapes.reset}: raman is used in node {node.uid}\n ' | ||||||
|  |                                   'but fiber lineic loss is above threshold\n') | ||||||
|  |                         else: | ||||||
|  |                             print(f'{ansi_escapes.red}WARNING{ansi_escapes.reset}: raman is used in node {node.uid}\n ' | ||||||
|  |                                   'but previous node is not a fiber\n') | ||||||
|                     # if variety is imposed by user, and if the gain_target (computed or imposed) is also above |                     # if variety is imposed by user, and if the gain_target (computed or imposed) is also above | ||||||
|                     # variety max gain + extended range, then warn that gain > max_gain + extended range |                     # variety max gain + extended range, then warn that gain > max_gain + extended range | ||||||
|                     if gain_target - equipment['Edfa'][node.params.type_variety].gain_flatmax - \ |                     if gain_target - equipment['Edfa'][node.params.type_variety].gain_flatmax - \ | ||||||
| @@ -328,7 +334,7 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d | |||||||
|             # print(f'{node.uid}') |             # print(f'{node.uid}') | ||||||
|  |  | ||||||
|     if isinstance(this_node, elements.Roadm): |     if isinstance(this_node, elements.Roadm): | ||||||
|         this_node.per_degree_pch_out_db = {k: v for k, v in this_node_degree.items()} |         this_node.per_degree_pch_out_dbm = {k: v for k, v in this_node_degree.items()} | ||||||
|  |  | ||||||
|  |  | ||||||
| def add_roadm_booster(network, roadm): | def add_roadm_booster(network, roadm): | ||||||
| @@ -521,7 +527,6 @@ def build_network(network, equipment, pref_ch_db, pref_total_db, no_insert_edfas | |||||||
|     # set roadm loss for gain_mode before to build network |     # set roadm loss for gain_mode before to build network | ||||||
|     fibers = [f for f in network.nodes() if isinstance(f, elements.Fiber)] |     fibers = [f for f in network.nodes() if isinstance(f, elements.Fiber)] | ||||||
|     add_connector_loss(network, fibers, default_span_data.con_in, default_span_data.con_out, default_span_data.EOL) |     add_connector_loss(network, fibers, default_span_data.con_in, default_span_data.con_out, default_span_data.EOL) | ||||||
|     add_fiber_padding(network, fibers, default_span_data.padding) |  | ||||||
|     # don't group split fiber and add amp in the same loop |     # don't group split fiber and add amp in the same loop | ||||||
|     # =>for code clarity (at the expense of speed): |     # =>for code clarity (at the expense of speed): | ||||||
|  |  | ||||||
| @@ -539,6 +544,8 @@ def build_network(network, equipment, pref_ch_db, pref_total_db, no_insert_edfas | |||||||
|         for fiber in fibers: |         for fiber in fibers: | ||||||
|             add_inline_amplifier(network, fiber) |             add_inline_amplifier(network, fiber) | ||||||
|  |  | ||||||
|  |     add_fiber_padding(network, fibers, default_span_data.padding) | ||||||
|  |  | ||||||
|     for roadm in roadms: |     for roadm in roadms: | ||||||
|         set_egress_amplifier(network, roadm, equipment, pref_ch_db, pref_total_db) |         set_egress_amplifier(network, roadm, equipment, pref_ch_db, pref_total_db) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -9,9 +9,9 @@ This module contains all parameters to configure standard network elements. | |||||||
| """ | """ | ||||||
|  |  | ||||||
| from scipy.constants import c, pi | from scipy.constants import c, pi | ||||||
| from numpy import squeeze, log10, exp | from numpy import asarray, array | ||||||
|  |  | ||||||
| from gnpy.core.utils import db2lin, convert_length | from gnpy.core.utils import convert_length | ||||||
| from gnpy.core.exceptions import ParametersError | from gnpy.core.exceptions import ParametersError | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -28,110 +28,102 @@ class Parameters: | |||||||
|  |  | ||||||
| class PumpParams(Parameters): | class PumpParams(Parameters): | ||||||
|     def __init__(self, power, frequency, propagation_direction): |     def __init__(self, power, frequency, propagation_direction): | ||||||
|         self._power = power |         self.power = power | ||||||
|         self._frequency = frequency |         self.frequency = frequency | ||||||
|         self._propagation_direction = propagation_direction |         self.propagation_direction = propagation_direction.lower() | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def power(self): |  | ||||||
|         return self._power |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def frequency(self): |  | ||||||
|         return self._frequency |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def propagation_direction(self): |  | ||||||
|         return self._propagation_direction |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class RamanParams(Parameters): | class RamanParams(Parameters): | ||||||
|     def __init__(self, **kwargs): |     def __init__(self, flag=False, result_spatial_resolution=10e3, solver_spatial_resolution=50): | ||||||
|         self._flag_raman = kwargs['flag_raman'] |         """ Simulation parameters used within the Raman Solver | ||||||
|         self._space_resolution = kwargs['space_resolution'] if 'space_resolution' in kwargs else None |         :params flag: boolean for enabling/disable the evaluation of the Raman power profile in frequency and position | ||||||
|         self._tolerance = kwargs['tolerance'] if 'tolerance' in kwargs else None |         :params result_spatial_resolution: spatial resolution of the evaluated Raman power profile | ||||||
|  |         :params solver_spatial_resolution: spatial step for the iterative solution of the first order ode | ||||||
|     @property |         """ | ||||||
|     def flag_raman(self): |         self.flag = flag | ||||||
|         return self._flag_raman |         self.result_spatial_resolution = result_spatial_resolution  # [m] | ||||||
|  |         self.solver_spatial_resolution = solver_spatial_resolution  # [m] | ||||||
|     @property |  | ||||||
|     def space_resolution(self): |  | ||||||
|         return self._space_resolution |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def tolerance(self): |  | ||||||
|         return self._tolerance |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class NLIParams(Parameters): | class NLIParams(Parameters): | ||||||
|     def __init__(self, **kwargs): |     def __init__(self, method='gn_model_analytic', dispersion_tolerance=1, phase_shift_tolerance=0.1, | ||||||
|         self._nli_method_name = kwargs['nli_method_name'] |                  computed_channels=None): | ||||||
|         self._wdm_grid_size = kwargs['wdm_grid_size'] |         """ Simulation parameters used within the Nli Solver | ||||||
|         self._dispersion_tolerance = kwargs['dispersion_tolerance'] |         :params method: formula for NLI calculation | ||||||
|         self._phase_shift_tolerance = kwargs['phase_shift_tolerance'] |         :params dispersion_tolerance: tuning parameter for ggn model solution | ||||||
|         self._f_cut_resolution = None |         :params phase_shift_tolerance: tuning parameter for ggn model solution | ||||||
|         self._f_pump_resolution = None |         :params computed_channels: the NLI is evaluated for these channels and extrapolated for the others | ||||||
|         self._computed_channels = kwargs['computed_channels'] if 'computed_channels' in kwargs else None |         """ | ||||||
|  |         self.method = method.lower() | ||||||
|     @property |         self.dispersion_tolerance = dispersion_tolerance | ||||||
|     def nli_method_name(self): |         self.phase_shift_tolerance = phase_shift_tolerance | ||||||
|         return self._nli_method_name |         self.computed_channels = computed_channels | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def wdm_grid_size(self): |  | ||||||
|         return self._wdm_grid_size |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def dispersion_tolerance(self): |  | ||||||
|         return self._dispersion_tolerance |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def phase_shift_tolerance(self): |  | ||||||
|         return self._phase_shift_tolerance |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def f_cut_resolution(self): |  | ||||||
|         return self._f_cut_resolution |  | ||||||
|  |  | ||||||
|     @f_cut_resolution.setter |  | ||||||
|     def f_cut_resolution(self, f_cut_resolution): |  | ||||||
|         self._f_cut_resolution = f_cut_resolution |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def f_pump_resolution(self): |  | ||||||
|         return self._f_pump_resolution |  | ||||||
|  |  | ||||||
|     @f_pump_resolution.setter |  | ||||||
|     def f_pump_resolution(self, f_pump_resolution): |  | ||||||
|         self._f_pump_resolution = f_pump_resolution |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def computed_channels(self): |  | ||||||
|         return self._computed_channels |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class SimParams(Parameters): | class SimParams(Parameters): | ||||||
|     def __init__(self, **kwargs): |     _shared_dict = {'nli_params': NLIParams(), 'raman_params': RamanParams()} | ||||||
|         try: |  | ||||||
|             if 'nli_parameters' in kwargs: |     def __init__(self): | ||||||
|                 self._nli_params = NLIParams(**kwargs['nli_parameters']) |         if type(self) == SimParams: | ||||||
|             else: |             raise NotImplementedError('Instances of SimParams cannot be generated') | ||||||
|                 self._nli_params = None |  | ||||||
|             if 'raman_parameters' in kwargs: |     @classmethod | ||||||
|                 self._raman_params = RamanParams(**kwargs['raman_parameters']) |     def set_params(cls, sim_params): | ||||||
|             else: |         cls._shared_dict['nli_params'] = NLIParams(**sim_params.get('nli_params', {})) | ||||||
|                 self._raman_params = None |         cls._shared_dict['raman_params'] = RamanParams(**sim_params.get('raman_params', {})) | ||||||
|         except KeyError as e: |  | ||||||
|             raise ParametersError(f'Simulation parameters must include {e}. Configuration: {kwargs}') |     @classmethod | ||||||
|  |     def get(cls): | ||||||
|  |         self = cls.__new__(cls) | ||||||
|  |         return self | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def nli_params(self): |     def nli_params(self): | ||||||
|         return self._nli_params |         return self._shared_dict['nli_params'] | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def raman_params(self): |     def raman_params(self): | ||||||
|         return self._raman_params |         return self._shared_dict['raman_params'] | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class RoadmParams(Parameters): | ||||||
|  |     def __init__(self, **kwargs): | ||||||
|  |         try: | ||||||
|  |             self.target_pch_out_db = kwargs['target_pch_out_db'] | ||||||
|  |             self.add_drop_osnr = kwargs['add_drop_osnr'] | ||||||
|  |             self.pmd = kwargs['pmd'] | ||||||
|  |             self.pdl = kwargs['pdl'] | ||||||
|  |             self.restrictions = kwargs['restrictions'] | ||||||
|  |             self.per_degree_pch_out_db = kwargs['per_degree_pch_out_db'] if 'per_degree_pch_out_db' in kwargs else {} | ||||||
|  |         except KeyError as e: | ||||||
|  |             raise ParametersError(f'ROADM configurations must include {e}. Configuration: {kwargs}') | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class FusedParams(Parameters): | ||||||
|  |     def __init__(self, **kwargs): | ||||||
|  |         self.loss = kwargs['loss'] if 'loss' in kwargs else 1 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # SSMF Raman coefficient profile normalized with respect to the effective area (Cr * A_eff) | ||||||
|  | CR_NORM = array([ | ||||||
|  |     0., 7.802e-16, 2.4236e-15, 4.0504e-15, 5.6606e-15, 6.8973e-15, 7.802e-15, 8.4162e-15, 8.8727e-15, 9.2877e-15, | ||||||
|  |     1.01011e-14, 1.05244e-14, 1.13295e-14, 1.2367e-14, 1.3695e-14, 1.5023e-14, 1.64091e-14, 1.81936e-14, 2.04927e-14, | ||||||
|  |     2.28167e-14, 2.48917e-14, 2.66098e-14, 2.82615e-14, 2.98136e-14, 3.1042e-14, 3.17558e-14, 3.18803e-14, 3.17558e-14, | ||||||
|  |     3.15566e-14, 3.11748e-14, 2.94567e-14, 3.14985e-14, 2.8552e-14, 2.43439e-14, 1.67992e-14, 9.6114e-15, 7.02180e-15, | ||||||
|  |     5.9262e-15, 5.6938e-15, 7.055e-15, 7.4119e-15, 7.4783e-15, 6.7645e-15, 5.5361e-15, 3.6271e-15, 2.7224e-15, | ||||||
|  |     2.4568e-15, 2.1995e-15, 2.1331e-15, 2.3323e-15, 2.5564e-15, 3.0461e-15, 4.8555e-15, 5.5029e-15, 5.2788e-15, | ||||||
|  |     4.565e-15, 3.3698e-15, 2.2991e-15, 2.0086e-15, 1.5521e-15, 1.328e-15, 1.162e-15, 9.379e-16, 8.715e-16, 8.134e-16, | ||||||
|  |     8.134e-16, 9.379e-16, 1.3612e-15, 1.6185e-15, 1.9754e-15, 1.8758e-15, 1.6849e-15, 1.2284e-15, 9.047e-16, 8.134e-16, | ||||||
|  |     8.715e-16, 9.711e-16, 1.0375e-15, 1.0043e-15, 9.047e-16, 8.134e-16, 6.806e-16, 5.478e-16, 3.901e-16, 2.241e-16, | ||||||
|  |     1.577e-16, 9.96e-17, 3.32e-17, 1.66e-17, 8.3e-18]) | ||||||
|  |  | ||||||
|  | # Note the non-uniform spacing of this range; this is required for properly capturing the Raman peak shape. | ||||||
|  | FREQ_OFFSET = array([ | ||||||
|  |     0., 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5., 5.5, 6., 6.5, 7., 7.5, 8., 8.5, 9., 9.5, 10., 10.5, 11., 11.5, 12., | ||||||
|  |     12.5, 12.75, 13., 13.25, 13.5, 14., 14.5, 14.75, 15., 15.5, 16., 16.5, 17., 17.5, 18., 18.25, 18.5, 18.75, 19., | ||||||
|  |     19.5, 20., 20.5, 21., 21.5, 22., 22.5, 23., 23.5, 24., 24.5, 25., 25.5, 26., 26.5, 27., 27.5, 28., 28.5, 29., 29.5, | ||||||
|  |     30., 30.5, 31., 31.5, 32., 32.5, 33., 33.5, 34., 34.5, 35., 35.5, 36., 36.5, 37., 37.5, 38., 38.5, 39., 39.5, 40., | ||||||
|  |     40.5, 41., 41.5, 42.]) * 1e12 | ||||||
|  |  | ||||||
|  |  | ||||||
| class FiberParams(Parameters): | class FiberParams(Parameters): | ||||||
| @@ -139,45 +131,50 @@ class FiberParams(Parameters): | |||||||
|         try: |         try: | ||||||
|             self._length = convert_length(kwargs['length'], kwargs['length_units']) |             self._length = convert_length(kwargs['length'], kwargs['length_units']) | ||||||
|             # fixed attenuator for padding |             # fixed attenuator for padding | ||||||
|             self._att_in = kwargs['att_in'] if 'att_in' in kwargs else 0 |             self._att_in = kwargs.get('att_in', 0) | ||||||
|             # if not defined in the network json connector loss in/out |             # if not defined in the network json connector loss in/out | ||||||
|             # the None value will be updated in network.py[build_network] |             # the None value will be updated in network.py[build_network] | ||||||
|             # with default values from eqpt_config.json[Spans] |             # with default values from eqpt_config.json[Spans] | ||||||
|             self._con_in = kwargs['con_in'] if 'con_in' in kwargs else None |             self._con_in = kwargs.get('con_in') | ||||||
|             self._con_out = kwargs['con_out'] if 'con_out' in kwargs else None |             self._con_out = kwargs.get('con_out') | ||||||
|             if 'ref_wavelength' in kwargs: |             if 'ref_wavelength' in kwargs: | ||||||
|                 self._ref_wavelength = kwargs['ref_wavelength'] |                 self._ref_wavelength = kwargs['ref_wavelength'] | ||||||
|                 self._ref_frequency = c / self.ref_wavelength |                 self._ref_frequency = c / self._ref_wavelength | ||||||
|             elif 'ref_frequency' in kwargs: |             elif 'ref_frequency' in kwargs: | ||||||
|                 self._ref_frequency = kwargs['ref_frequency'] |                 self._ref_frequency = kwargs['ref_frequency'] | ||||||
|                 self._ref_wavelength = c / self.ref_frequency |                 self._ref_wavelength = c / self._ref_frequency | ||||||
|             else: |             else: | ||||||
|                 self._ref_wavelength = 1550e-9 |                 self._ref_wavelength = 1550e-9  # conventional central C band wavelength [m] | ||||||
|                 self._ref_frequency = c / self.ref_wavelength |                 self._ref_frequency = c / self._ref_wavelength | ||||||
|             self._dispersion = kwargs['dispersion']  # s/m/m |             self._dispersion = kwargs['dispersion']  # s/m/m | ||||||
|             self._dispersion_slope = kwargs['dispersion_slope'] if 'dispersion_slope' in kwargs else \ |             self._dispersion_slope = \ | ||||||
|                 -2 * self._dispersion/self.ref_wavelength  # s/m/m/m |                 kwargs.get('dispersion_slope', -2 * self._dispersion / self.ref_wavelength)  # s/m/m/m | ||||||
|             self._beta2 = -(self.ref_wavelength ** 2) * self.dispersion / (2 * pi * c)  # 1/(m * Hz^2) |             self._beta2 = -(self.ref_wavelength ** 2) * self.dispersion / (2 * pi * c)  # 1/(m * Hz^2) | ||||||
|             # Eq. (3.23) in  Abramczyk, Halina. "Dispersion phenomena in optical fibers." Virtual European University |             # Eq. (3.23) in  Abramczyk, Halina. "Dispersion phenomena in optical fibers." Virtual European University | ||||||
|             # on Lasers. Available online: http://mitr.p.lodz.pl/evu/lectures/Abramczyk3.pdf |             # on Lasers. Available online: http://mitr.p.lodz.pl/evu/lectures/Abramczyk3.pdf | ||||||
|             # (accessed on 25 March 2018) (2005). |             # (accessed on 25 March 2018) (2005). | ||||||
|             self._beta3 = ((self.dispersion_slope - (4*pi*c/self.ref_wavelength**3) * self.beta2) / |             self._beta3 = ((self.dispersion_slope - (4*pi*c/self.ref_wavelength**3) * self.beta2) / | ||||||
|                            (2*pi*c/self.ref_wavelength**2)**2) |                            (2*pi*c/self.ref_wavelength**2)**2) | ||||||
|             self._gamma = kwargs['gamma']  # 1/W/m |             self._effective_area = kwargs.get('effective_area')  # m^2 | ||||||
|  |             n2 = 2.6e-20  # m^2/W | ||||||
|  |             if self._effective_area: | ||||||
|  |                 self._gamma = kwargs.get('gamma', 2 * pi * n2 / (self.ref_wavelength * self._effective_area))  # 1/W/m | ||||||
|  |             elif 'gamma' in kwargs: | ||||||
|  |                 self._gamma = kwargs['gamma']  # 1/W/m | ||||||
|  |                 self._effective_area = 2 * pi * n2 / (self.ref_wavelength * self._gamma)  # m^2 | ||||||
|  |             else: | ||||||
|  |                 self._gamma = 0  # 1/W/m | ||||||
|  |                 self._effective_area = 83e-12  # m^2 | ||||||
|  |             default_raman_efficiency = {'cr': CR_NORM / self._effective_area, 'frequency_offset': FREQ_OFFSET} | ||||||
|  |             self._raman_efficiency = kwargs.get('raman_efficiency', default_raman_efficiency) | ||||||
|             self._pmd_coef = kwargs['pmd_coef']  # s/sqrt(m) |             self._pmd_coef = kwargs['pmd_coef']  # s/sqrt(m) | ||||||
|             if type(kwargs['loss_coef']) == dict: |             if type(kwargs['loss_coef']) == dict: | ||||||
|                 self._loss_coef = squeeze(kwargs['loss_coef']['loss_coef_power']) * 1e-3  # lineic loss dB/m |                 self._loss_coef = asarray(kwargs['loss_coef']['value']) * 1e-3  # lineic loss dB/m | ||||||
|                 self._f_loss_ref = squeeze(kwargs['loss_coef']['frequency'])  # Hz |                 self._f_loss_ref = asarray(kwargs['loss_coef']['frequency'])  # Hz | ||||||
|             else: |             else: | ||||||
|                 self._loss_coef = kwargs['loss_coef'] * 1e-3  # lineic loss dB/m |                 self._loss_coef = asarray(kwargs['loss_coef']) * 1e-3  # lineic loss dB/m | ||||||
|                 self._f_loss_ref = 193.5e12  # Hz |                 self._f_loss_ref = asarray(self._ref_frequency)  # Hz | ||||||
|             self._lin_attenuation = db2lin(self.length * self.loss_coef) |             self._lumped_losses = kwargs['lumped_losses'] if 'lumped_losses' in kwargs else [] | ||||||
|             self._lin_loss_exp = self.loss_coef / (10 * log10(exp(1)))  # linear power exponent loss Neper/m |  | ||||||
|             self._effective_length = (1 - exp(- self.lin_loss_exp * self.length)) / self.lin_loss_exp |  | ||||||
|             self._asymptotic_length = 1 / self.lin_loss_exp |  | ||||||
|             # raman parameters (not compulsory) |  | ||||||
|             self._raman_efficiency = kwargs['raman_efficiency'] if 'raman_efficiency' in kwargs else None |  | ||||||
|             self._pumps_loss_coef = kwargs['pumps_loss_coef'] if 'pumps_loss_coef' in kwargs else None |  | ||||||
|         except KeyError as e: |         except KeyError as e: | ||||||
|             raise ParametersError(f'Fiber configurations json must include {e}. Configuration: {kwargs}') |             raise ParametersError(f'Fiber configurations json must include {e}. Configuration: {kwargs}') | ||||||
|  |  | ||||||
| @@ -210,6 +207,10 @@ class FiberParams(Parameters): | |||||||
|     def con_out(self): |     def con_out(self): | ||||||
|         return self._con_out |         return self._con_out | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def lumped_losses(self): | ||||||
|  |         return self._lumped_losses | ||||||
|  |  | ||||||
|     @con_out.setter |     @con_out.setter | ||||||
|     def con_out(self, con_out): |     def con_out(self, con_out): | ||||||
|         self._con_out = con_out |         self._con_out = con_out | ||||||
| @@ -254,32 +255,60 @@ class FiberParams(Parameters): | |||||||
|     def f_loss_ref(self): |     def f_loss_ref(self): | ||||||
|         return self._f_loss_ref |         return self._f_loss_ref | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def lin_loss_exp(self): |  | ||||||
|         return self._lin_loss_exp |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def lin_attenuation(self): |  | ||||||
|         return self._lin_attenuation |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def effective_length(self): |  | ||||||
|         return self._effective_length |  | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def asymptotic_length(self): |  | ||||||
|         return self._asymptotic_length |  | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def raman_efficiency(self): |     def raman_efficiency(self): | ||||||
|         return self._raman_efficiency |         return self._raman_efficiency | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def pumps_loss_coef(self): |  | ||||||
|         return self._pumps_loss_coef |  | ||||||
|  |  | ||||||
|     def asdict(self): |     def asdict(self): | ||||||
|         dictionary = super().asdict() |         dictionary = super().asdict() | ||||||
|         dictionary['loss_coef'] = self.loss_coef * 1e3 |         dictionary['loss_coef'] = self.loss_coef * 1e3 | ||||||
|         dictionary['length_units'] = 'm' |         dictionary['length_units'] = 'm' | ||||||
|  |         if not self.lumped_losses: | ||||||
|  |             dictionary.pop('lumped_losses') | ||||||
|  |         if not self.raman_efficiency: | ||||||
|  |             dictionary.pop('raman_efficiency') | ||||||
|         return dictionary |         return dictionary | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class EdfaParams: | ||||||
|  |     def __init__(self, **params): | ||||||
|  |         self.update_params(params) | ||||||
|  |         if params == {}: | ||||||
|  |             self.type_variety = '' | ||||||
|  |             self.type_def = '' | ||||||
|  |             # self.gain_flatmax = 0 | ||||||
|  |             # self.gain_min = 0 | ||||||
|  |             # self.p_max = 0 | ||||||
|  |             # self.nf_model = None | ||||||
|  |             # self.nf_fit_coeff = None | ||||||
|  |             # self.nf_ripple = None | ||||||
|  |             # self.dgt = None | ||||||
|  |             # self.gain_ripple = None | ||||||
|  |             # self.out_voa_auto = False | ||||||
|  |             # self.allowed_for_design = None | ||||||
|  |  | ||||||
|  |     def update_params(self, kwargs): | ||||||
|  |         for k, v in kwargs.items(): | ||||||
|  |             setattr(self, k, self.update_params(**v) if isinstance(v, dict) else v) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class EdfaOperational: | ||||||
|  |     default_values = { | ||||||
|  |         'gain_target': None, | ||||||
|  |         'delta_p': None, | ||||||
|  |         'out_voa': None, | ||||||
|  |         'tilt_target': 0 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     def __init__(self, **operational): | ||||||
|  |         self.update_attr(operational) | ||||||
|  |  | ||||||
|  |     def update_attr(self, kwargs): | ||||||
|  |         clean_kwargs = {k: v for k, v in kwargs.items() if v != ''} | ||||||
|  |         for k, v in self.default_values.items(): | ||||||
|  |             setattr(self, k, clean_kwargs.get(k, v)) | ||||||
|  |  | ||||||
|  |     def __repr__(self): | ||||||
|  |         return (f'{type(self).__name__}(' | ||||||
|  |                 f'gain_target={self.gain_target!r}, ' | ||||||
|  |                 f'tilt_target={self.tilt_target!r})') | ||||||
|   | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -106,6 +106,69 @@ def db2lin(value): | |||||||
|     return 10**(value / 10) |     return 10**(value / 10) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def watt2dbm(value): | ||||||
|  |     """Convert Watt units to dBm | ||||||
|  |  | ||||||
|  |     >>> round(watt2dbm(0.001), 1) | ||||||
|  |     0.0 | ||||||
|  |     >>> round(watt2dbm(0.02), 1) | ||||||
|  |     13.0 | ||||||
|  |     """ | ||||||
|  |     return lin2db(value * 1e3) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def dbm2watt(value): | ||||||
|  |     """Convert dBm units to Watt | ||||||
|  |  | ||||||
|  |     >>> round(dbm2watt(0), 4) | ||||||
|  |     0.001 | ||||||
|  |     >>> round(dbm2watt(-3), 4) | ||||||
|  |     0.0005 | ||||||
|  |     >>> round(dbm2watt(13), 4) | ||||||
|  |     0.02 | ||||||
|  |     """ | ||||||
|  |     return db2lin(value) * 1e-3 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def psd2powerdbm(psd_mwperghz, baudrate_baud): | ||||||
|  |     """computes power in dBm based on baudrate in bauds and psd in mW/GHz | ||||||
|  |  | ||||||
|  |     >>> round(psd2powerdbm(0.031176, 64e9),3) | ||||||
|  |     3.0 | ||||||
|  |     >>> round(psd2powerdbm(0.062352, 32e9),3) | ||||||
|  |     3.0 | ||||||
|  |     >>> round(psd2powerdbm(0.015625, 64e9),3) | ||||||
|  |     0.0 | ||||||
|  |     """ | ||||||
|  |     return lin2db(baudrate_baud * psd_mwperghz * 1e-9) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def power_dbm_to_psd_mw_ghz(power_dbm, baudrate_baud): | ||||||
|  |     """computes power spectral density in  mW/GHz based on baudrate in bauds and power in dBm | ||||||
|  |  | ||||||
|  |     >>> power_dbm_to_psd_mw_ghz(0, 64e9) | ||||||
|  |     0.015625 | ||||||
|  |     >>> round(power_dbm_to_psd_mw_ghz(3, 64e9), 6) | ||||||
|  |     0.031176 | ||||||
|  |     >>> round(power_dbm_to_psd_mw_ghz(3, 32e9), 6) | ||||||
|  |     0.062352 | ||||||
|  |     """ | ||||||
|  |     return db2lin(power_dbm) / (baudrate_baud * 1e-9) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def psd_mw_per_ghz(power_watt, baudrate_baud): | ||||||
|  |     """computes power spectral density in  mW/GHz based on baudrate in bauds and power in W | ||||||
|  |  | ||||||
|  |     >>> psd_mw_per_ghz(2e-3, 32e9) | ||||||
|  |     0.0625 | ||||||
|  |     >>> psd_mw_per_ghz(1e-3, 64e9) | ||||||
|  |     0.015625 | ||||||
|  |     >>> psd_mw_per_ghz(0.5e-3, 32e9) | ||||||
|  |     0.015625 | ||||||
|  |     """ | ||||||
|  |     return power_watt * 1e3 / (baudrate_baud * 1e-9) | ||||||
|  |  | ||||||
|  |  | ||||||
| def round2float(number, step): | def round2float(number, step): | ||||||
|     """Round a floating point number so that its "resolution" is not bigger than 'step' |     """Round a floating point number so that its "resolution" is not bigger than 'step' | ||||||
|  |  | ||||||
|   | |||||||
| @@ -180,51 +180,27 @@ | |||||||
|       "Fiber":[{ |       "Fiber":[{ | ||||||
|             "type_variety": "SSMF", |             "type_variety": "SSMF", | ||||||
|             "dispersion": 1.67e-05, |             "dispersion": 1.67e-05, | ||||||
|             "gamma": 0.00127, |             "effective_area": 83e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|             "type_variety": "NZDF", |             "type_variety": "NZDF", | ||||||
|             "dispersion": 0.5e-05, |             "dispersion": 0.5e-05, | ||||||
|             "gamma": 0.00146, |             "effective_area": 72e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|             "type_variety": "LOF", |             "type_variety": "LOF", | ||||||
|             "dispersion": 2.2e-05, |             "dispersion": 2.2e-05, | ||||||
|             "gamma": 0.000843, |             "effective_area": 125e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             } |             } | ||||||
|       ], |       ], | ||||||
|       "RamanFiber":[{ |       "RamanFiber":[{ | ||||||
|             "type_variety": "SSMF", |             "type_variety": "SSMF", | ||||||
|             "dispersion": 1.67e-05, |             "dispersion": 1.67e-05, | ||||||
|             "gamma": 0.00127, |             "effective_area": 83e-12, | ||||||
|             "pmd_coef": 1.265e-15, |             "pmd_coef": 1.265e-15 | ||||||
|             "raman_efficiency": { |  | ||||||
|               "cr":[ |  | ||||||
|                   0, 9.4E-06, 2.92E-05, 4.88E-05, 6.82E-05, 8.31E-05, 9.4E-05, 0.0001014, 0.0001069, 0.0001119, |  | ||||||
|                   0.0001217, 0.0001268, 0.0001365, 0.000149, 0.000165, 0.000181, 0.0001977, 0.0002192, 0.0002469, |  | ||||||
|                   0.0002749, 0.0002999, 0.0003206, 0.0003405, 0.0003592, 0.000374, 0.0003826, 0.0003841, 0.0003826, |  | ||||||
|                   0.0003802, 0.0003756, 0.0003549, 0.0003795, 0.000344, 0.0002933, 0.0002024, 0.0001158, 8.46E-05, |  | ||||||
|                   7.14E-05, 6.86E-05, 8.5E-05, 8.93E-05, 9.01E-05, 8.15E-05, 6.67E-05, 4.37E-05, 3.28E-05, 2.96E-05, |  | ||||||
|                   2.65E-05, 2.57E-05, 2.81E-05, 3.08E-05, 3.67E-05, 5.85E-05, 6.63E-05, 6.36E-05, 5.5E-05, 4.06E-05, |  | ||||||
|                   2.77E-05, 2.42E-05, 1.87E-05, 1.6E-05, 1.4E-05, 1.13E-05, 1.05E-05, 9.8E-06, 9.8E-06, 1.13E-05, |  | ||||||
|                   1.64E-05, 1.95E-05, 2.38E-05, 2.26E-05, 2.03E-05, 1.48E-05, 1.09E-05, 9.8E-06, 1.05E-05, 1.17E-05, |  | ||||||
|                   1.25E-05, 1.21E-05, 1.09E-05, 9.8E-06, 8.2E-06, 6.6E-06, 4.7E-06, 2.7E-06, 1.9E-06, 1.2E-06, 4E-07, |  | ||||||
|                   2E-07, 1E-07 |  | ||||||
|               ], |  | ||||||
|               "frequency_offset":[ |  | ||||||
|                 0, 0.5e12, 1e12, 1.5e12, 2e12, 2.5e12, 3e12, 3.5e12, 4e12, 4.5e12, 5e12, 5.5e12, 6e12, 6.5e12, 7e12, |  | ||||||
|                 7.5e12, 8e12, 8.5e12, 9e12, 9.5e12, 10e12, 10.5e12, 11e12, 11.5e12, 12e12, 12.5e12, 12.75e12, |  | ||||||
|                 13e12, 13.25e12, 13.5e12, 14e12, 14.5e12, 14.75e12, 15e12, 15.5e12, 16e12, 16.5e12, 17e12, |  | ||||||
|                 17.5e12, 18e12, 18.25e12, 18.5e12, 18.75e12, 19e12, 19.5e12, 20e12, 20.5e12, 21e12, 21.5e12, |  | ||||||
|                 22e12, 22.5e12, 23e12, 23.5e12, 24e12, 24.5e12, 25e12, 25.5e12, 26e12, 26.5e12, 27e12, 27.5e12, 28e12, |  | ||||||
|                 28.5e12, 29e12, 29.5e12, 30e12, 30.5e12, 31e12, 31.5e12, 32e12, 32.5e12, 33e12, 33.5e12, 34e12, 34.5e12, |  | ||||||
|                 35e12, 35.5e12, 36e12, 36.5e12, 37e12, 37.5e12, 38e12, 38.5e12, 39e12, 39.5e12, 40e12, 40.5e12, 41e12, |  | ||||||
|                 41.5e12, 42e12 |  | ||||||
|               ] |  | ||||||
|               } |  | ||||||
|             } |             } | ||||||
|       ], |       ], | ||||||
|       "Span":[{ |       "Span":[{ | ||||||
| @@ -245,6 +221,7 @@ | |||||||
|             "target_pch_out_db": -20, |             "target_pch_out_db": -20, | ||||||
|             "add_drop_osnr": 38, |             "add_drop_osnr": 38, | ||||||
|             "pmd": 0, |             "pmd": 0, | ||||||
|  |             "pdl": 0, | ||||||
|             "restrictions": { |             "restrictions": { | ||||||
|                             "preamp_variety_list":[], |                             "preamp_variety_list":[], | ||||||
|                             "booster_variety_list":[] |                             "booster_variety_list":[] | ||||||
|   | |||||||
| @@ -1,95 +1,80 @@ | |||||||
| {     "Edfa":[ | { | ||||||
|             { |     "Edfa": [ | ||||||
|  |         { | ||||||
|             "type_variety": "openroadm_ila_low_noise", |             "type_variety": "openroadm_ila_low_noise", | ||||||
|             "type_def": "openroadm", |             "type_def": "openroadm", | ||||||
|             "gain_flatmax": 27, |             "gain_flatmax": 27, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|             "nf_coef": [-8.104e-4,-6.221e-2,-5.889e-1,37.62], |             "nf_coef": [-8.104e-4, -6.221e-2, -5.889e-1, 37.62], | ||||||
|  |             "pmd": 3e-12, | ||||||
|  |             "pdl": 0.7, | ||||||
|             "allowed_for_design": true |             "allowed_for_design": true | ||||||
|             }, |         }, | ||||||
|             { |         { | ||||||
|             "type_variety": "openroadm_ila_standard", |             "type_variety": "openroadm_ila_standard", | ||||||
|             "type_def": "openroadm", |             "type_def": "openroadm", | ||||||
|             "gain_flatmax": 27, |             "gain_flatmax": 27, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|             "nf_coef": [-5.952e-4,-6.250e-2,-1.071,28.99], |             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 28.99], | ||||||
|  |             "pmd": 3e-12, | ||||||
|  |             "pdl": 0.7, | ||||||
|             "allowed_for_design": true |             "allowed_for_design": true | ||||||
|             }, |         }, | ||||||
| 		{ |         { | ||||||
|             "type_variety": "openroadm_mw_mw_preamp", |             "type_variety": "openroadm_mw_mw_preamp", | ||||||
|             "type_def": "openroadm_preamp", |             "type_def": "openroadm_preamp", | ||||||
|             "gain_flatmax": 27, |             "gain_flatmax": 27, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|  |             "pmd": 0, | ||||||
|  |             "pdl": 0, | ||||||
|             "allowed_for_design": false |             "allowed_for_design": false | ||||||
|             }, |         }, | ||||||
| 		{ |         { | ||||||
|             "type_variety": "openroadm_mw_mw_booster", |             "type_variety": "openroadm_mw_mw_booster", | ||||||
|             "type_def": "openroadm_booster", |             "type_def": "openroadm_booster", | ||||||
|             "gain_flatmax": 32, |             "gain_flatmax": 32, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|  |             "pmd": 0, | ||||||
|  |             "pdl": 0, | ||||||
|             "allowed_for_design": false |             "allowed_for_design": false | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "Fiber":[ |     "Fiber": [ | ||||||
|             { |         { | ||||||
|             "type_variety": "SSMF", |             "type_variety": "SSMF", | ||||||
|             "dispersion": 1.67e-05, |             "dispersion": 1.67e-05, | ||||||
|             "gamma": 0.00127, |             "effective_area": 83e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             }, |         }, | ||||||
|             { |         { | ||||||
|             "type_variety": "NZDF", |             "type_variety": "NZDF", | ||||||
|             "dispersion": 0.5e-05, |             "dispersion": 0.5e-05, | ||||||
|             "gamma": 0.00146, |             "effective_area": 72e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             }, |         }, | ||||||
|             { |         { | ||||||
|             "type_variety": "LOF", |             "type_variety": "LOF", | ||||||
|             "dispersion": 2.2e-05, |             "dispersion": 2.2e-05, | ||||||
|             "gamma": 0.000843, |             "effective_area": 125e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "RamanFiber":[ |     "RamanFiber": [ | ||||||
|             { |         { | ||||||
|             "type_variety": "SSMF", |             "type_variety": "SSMF", | ||||||
|             "dispersion": 1.67e-05, |             "dispersion": 1.67e-05, | ||||||
|             "gamma": 0.00127, |             "effective_area": 83e-12, | ||||||
|             "pmd_coef": 1.265e-15, |             "pmd_coef": 1.265e-15 | ||||||
|             "raman_efficiency": { |         } | ||||||
|               "cr":[ |     ], | ||||||
|                   0, 9.4E-06, 2.92E-05, 4.88E-05, 6.82E-05, 8.31E-05, 9.4E-05, 0.0001014, 0.0001069, 0.0001119, |     "Span": [ | ||||||
|                   0.0001217, 0.0001268, 0.0001365, 0.000149, 0.000165, 0.000181, 0.0001977, 0.0002192, 0.0002469, |         { | ||||||
|                   0.0002749, 0.0002999, 0.0003206, 0.0003405, 0.0003592, 0.000374, 0.0003826, 0.0003841, 0.0003826, |             "power_mode": true, | ||||||
|                   0.0003802, 0.0003756, 0.0003549, 0.0003795, 0.000344, 0.0002933, 0.0002024, 0.0001158, 8.46E-05, |             "delta_power_range_db": [0, 0, 0], | ||||||
|                   7.14E-05, 6.86E-05, 8.5E-05, 8.93E-05, 9.01E-05, 8.15E-05, 6.67E-05, 4.37E-05, 3.28E-05, 2.96E-05, |  | ||||||
|                   2.65E-05, 2.57E-05, 2.81E-05, 3.08E-05, 3.67E-05, 5.85E-05, 6.63E-05, 6.36E-05, 5.5E-05, 4.06E-05, |  | ||||||
|                   2.77E-05, 2.42E-05, 1.87E-05, 1.6E-05, 1.4E-05, 1.13E-05, 1.05E-05, 9.8E-06, 9.8E-06, 1.13E-05, |  | ||||||
|                   1.64E-05, 1.95E-05, 2.38E-05, 2.26E-05, 2.03E-05, 1.48E-05, 1.09E-05, 9.8E-06, 1.05E-05, 1.17E-05, |  | ||||||
|                   1.25E-05, 1.21E-05, 1.09E-05, 9.8E-06, 8.2E-06, 6.6E-06, 4.7E-06, 2.7E-06, 1.9E-06, 1.2E-06, 4E-07, |  | ||||||
|                   2E-07, 1E-07 |  | ||||||
|               ], |  | ||||||
|               "frequency_offset":[ |  | ||||||
|                 0, 0.5e12, 1e12, 1.5e12, 2e12, 2.5e12, 3e12, 3.5e12, 4e12, 4.5e12, 5e12, 5.5e12, 6e12, 6.5e12, 7e12, |  | ||||||
|                 7.5e12, 8e12, 8.5e12, 9e12, 9.5e12, 10e12, 10.5e12, 11e12, 11.5e12, 12e12, 12.5e12, 12.75e12, |  | ||||||
|                 13e12, 13.25e12, 13.5e12, 14e12, 14.5e12, 14.75e12, 15e12, 15.5e12, 16e12, 16.5e12, 17e12, |  | ||||||
|                 17.5e12, 18e12, 18.25e12, 18.5e12, 18.75e12, 19e12, 19.5e12, 20e12, 20.5e12, 21e12, 21.5e12, |  | ||||||
|                 22e12, 22.5e12, 23e12, 23.5e12, 24e12, 24.5e12, 25e12, 25.5e12, 26e12, 26.5e12, 27e12, 27.5e12, 28e12, |  | ||||||
|                 28.5e12, 29e12, 29.5e12, 30e12, 30.5e12, 31e12, 31.5e12, 32e12, 32.5e12, 33e12, 33.5e12, 34e12, 34.5e12, |  | ||||||
|                 35e12, 35.5e12, 36e12, 36.5e12, 37e12, 37.5e12, 38e12, 38.5e12, 39e12, 39.5e12, 40e12, 40.5e12, 41e12, |  | ||||||
|                 41.5e12, 42e12 |  | ||||||
|               ] |  | ||||||
|               } |  | ||||||
|             } |  | ||||||
|       ], |  | ||||||
|       "Span":[ |  | ||||||
|             { |  | ||||||
|             "power_mode":true, |  | ||||||
|             "delta_power_range_db": [0,0,0], |  | ||||||
|             "max_fiber_lineic_loss_for_raman": 0.25, |             "max_fiber_lineic_loss_for_raman": 0.25, | ||||||
|             "target_extended_gain": 0, |             "target_extended_gain": 0, | ||||||
|             "max_length": 135, |             "max_length": 135, | ||||||
| @@ -99,92 +84,266 @@ | |||||||
|             "EOL": 0, |             "EOL": 0, | ||||||
|             "con_in": 0, |             "con_in": 0, | ||||||
|             "con_out": 0 |             "con_out": 0 | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "Roadm":[ |     "Roadm": [ | ||||||
|             { |         { | ||||||
|             "target_pch_out_db": -20, |             "target_pch_out_db": -20, | ||||||
|             "add_drop_osnr": 30, |             "add_drop_osnr": 30, | ||||||
|             "pmd": 0, |             "pmd": 3e-12, | ||||||
|  |             "pdl": 1.5, | ||||||
|             "restrictions": { |             "restrictions": { | ||||||
|                             "preamp_variety_list":["openroadm_mw_mw_preamp"], |                 "preamp_variety_list": ["openroadm_mw_mw_preamp"], | ||||||
|                             "booster_variety_list":["openroadm_mw_mw_booster"] |                 "booster_variety_list": ["openroadm_mw_mw_booster"] | ||||||
|                             }             |  | ||||||
|             } |             } | ||||||
|       ], |         } | ||||||
|       "SI":[ |     ], | ||||||
|             { |     "SI": [ | ||||||
|  |         { | ||||||
|             "f_min": 191.3e12, |             "f_min": 191.3e12, | ||||||
|             "baud_rate": 31.57e9, |             "baud_rate": 31.57e9, | ||||||
|             "f_max":196.1e12, |             "f_max": 196.1e12, | ||||||
|             "spacing": 50e9, |             "spacing": 50e9, | ||||||
|             "power_dbm": 2, |             "power_dbm": 2, | ||||||
|             "power_range_db": [0,0,1], |             "power_range_db": [0, 0, 1], | ||||||
|             "roll_off": 0.15, |             "roll_off": 0.15, | ||||||
|             "tx_osnr": 35, |             "tx_osnr": 35, | ||||||
|             "sys_margins": 2 |             "sys_margins": 2 | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "Transceiver":[ |     "Transceiver": [ | ||||||
| 		{ |         { | ||||||
|             "type_variety": "OpenROADM MSA ver. 4.0", |             "type_variety": "OpenROADM MSA ver. 4.0", | ||||||
|             "frequency":{ |             "frequency": { | ||||||
|                         "min": 191.35e12, |                 "min": 191.35e12, | ||||||
|                         "max": 196.1e12 |                 "max": 196.1e12 | ||||||
|  |             }, | ||||||
|  |             "mode": [ | ||||||
|  |                 { | ||||||
|  |                     "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", | ||||||
|  |                     "baud_rate": 27.95e9, | ||||||
|  |                     "OSNR": 17, | ||||||
|  |                     "bit_rate": 100e9, | ||||||
|  |                     "roll_off": null, | ||||||
|  |                     "tx_osnr": 33, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|                         }, |                         }, | ||||||
|             "mode":[ |                         { | ||||||
|                        { |                             "chromatic_dispersion": 18e3, | ||||||
|                        "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", |                             "penalty_value": 0.5 | ||||||
|                        "baud_rate": 27.95e9, |                         }, | ||||||
|                        "OSNR": 17, |                         { | ||||||
|                        "bit_rate": 100e9, |                             "pmd": 10, | ||||||
|                        "roll_off": null, |                             "penalty_value": 0 | ||||||
|                        "tx_osnr": 33, |                         }, | ||||||
|                        "min_spacing": 50e9, |                         { | ||||||
|                        "cost":1 |                             "pmd": 30, | ||||||
|                        }, |                             "penalty_value": 0.5 | ||||||
| 					   { |                         }, | ||||||
|                        "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", |                         { | ||||||
|                        "baud_rate": 31.57e9, |                             "pdl": 1, | ||||||
|                        "OSNR": 12, |                             "penalty_value": 0.5 | ||||||
|                        "bit_rate": 100e9, |                         }, | ||||||
|                        "roll_off": 0.15, |                         { | ||||||
|                        "tx_osnr": 35, |                             "pdl": 2, | ||||||
|                        "min_spacing": 50e9, |                             "penalty_value": 1 | ||||||
|                        "cost":1 |                         }, | ||||||
|                        }, |                         { | ||||||
|                        { |                             "pdl": 4, | ||||||
|                        "format": "200 Gbit/s, DP-QPSK", |                             "penalty_value": 2.5 | ||||||
|                        "baud_rate": 63.1e9, |                         }, | ||||||
|                        "OSNR": 17, |                         { | ||||||
|                        "bit_rate": 200e9, |                             "pdl": 6, | ||||||
|                        "roll_off": 0.15, |                             "penalty_value": 4 | ||||||
|                        "tx_osnr": 36, |                         } | ||||||
|                        "min_spacing": 87.5e9, |                     ], | ||||||
|                        "cost":1 |                     "min_spacing": 50e9, | ||||||
|                        }, |                     "cost": 1 | ||||||
|                        { |                 }, | ||||||
|                        "format": "300 Gbit/s, DP-8QAM", |                 { | ||||||
|                        "baud_rate": 63.1e9, |                     "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", | ||||||
|                        "OSNR": 21, |                     "baud_rate": 31.57e9, | ||||||
|                        "bit_rate": 300e9, |                     "OSNR": 12, | ||||||
|                        "roll_off": 0.15, |                     "bit_rate": 100e9, | ||||||
|                        "tx_osnr": 36, |                     "roll_off": 0.15, | ||||||
|                        "min_spacing": 87.5e9, |                     "tx_osnr": 35, | ||||||
|                        "cost":1 |                     "penalties": [ | ||||||
|                        }, |                         { | ||||||
| 					   { |                             "chromatic_dispersion": -1e3, | ||||||
|                        "format": "400 Gbit/s, DP-16QAM", |                             "penalty_value": 0 | ||||||
|                        "baud_rate": 63.1e9, |                         }, | ||||||
|                        "OSNR": 24, |                         { | ||||||
|                        "bit_rate": 400e9, |                             "chromatic_dispersion": 4e3, | ||||||
|                        "roll_off": 0.15, |                             "penalty_value": 0 | ||||||
|                        "tx_osnr": 36, |                         }, | ||||||
|                        "min_spacing": 87.5e9, |                         { | ||||||
|                        "cost":1 |                             "chromatic_dispersion": 40e3, | ||||||
|                        } |                             "penalty_value": 0.5 | ||||||
|                    ] |                         }, | ||||||
|             } |                         { | ||||||
|       ] |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 30, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 6, | ||||||
|  |                             "penalty_value": 4 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 50e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "200 Gbit/s, DP-QPSK", | ||||||
|  |                     "baud_rate": 63.1e9, | ||||||
|  |                     "OSNR": 17, | ||||||
|  |                     "bit_rate": 200e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 24e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 25, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 87.5e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "300 Gbit/s, DP-8QAM", | ||||||
|  |                     "baud_rate": 63.1e9, | ||||||
|  |                     "OSNR": 21, | ||||||
|  |                     "bit_rate": 300e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 18e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 25, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 87.5e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "400 Gbit/s, DP-16QAM", | ||||||
|  |                     "baud_rate": 63.1e9, | ||||||
|  |                     "OSNR": 24, | ||||||
|  |                     "bit_rate": 400e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 12e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 20, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 87.5e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 } | ||||||
|  |             ] | ||||||
|  |         } | ||||||
|  |     ] | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,105 +1,92 @@ | |||||||
| {     "Edfa":[ | { | ||||||
|             { |     "Edfa": [ | ||||||
|  |         { | ||||||
|             "type_variety": "openroadm_ila_low_noise", |             "type_variety": "openroadm_ila_low_noise", | ||||||
|             "type_def": "openroadm", |             "type_def": "openroadm", | ||||||
|             "gain_flatmax": 27, |             "gain_flatmax": 27, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|             "nf_coef": [-8.104e-4,-6.221e-2,-5.889e-1,37.62], |             "nf_coef": [-8.104e-4, -6.221e-2, -5.889e-1, 37.62], | ||||||
|  |             "pmd": 3e-12, | ||||||
|  |             "pdl": 0.7, | ||||||
|             "allowed_for_design": true |             "allowed_for_design": true | ||||||
|             }, |         }, | ||||||
|             { |         { | ||||||
|             "type_variety": "openroadm_ila_standard", |             "type_variety": "openroadm_ila_standard", | ||||||
|             "type_def": "openroadm", |             "type_def": "openroadm", | ||||||
|             "gain_flatmax": 27, |             "gain_flatmax": 27, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|             "nf_coef": [-5.952e-4,-6.250e-2,-1.071,28.99], |             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 28.99], | ||||||
|  |             "pmd": 3e-12, | ||||||
|  |             "pdl": 0.7, | ||||||
|             "allowed_for_design": true |             "allowed_for_design": true | ||||||
|             }, |         }, | ||||||
| 		{ |         { | ||||||
|             "type_variety": "openroadm_mw_mw_preamp_typical_ver5", |             "type_variety": "openroadm_mw_mw_preamp_typical_ver5", | ||||||
|             "type_def": "openroadm", |             "type_def": "openroadm", | ||||||
|             "gain_flatmax": 27, |             "gain_flatmax": 27, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|             "nf_coef": [-5.952e-4,-6.250e-2,-1.071,28.99], |             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 28.99], | ||||||
|  |             "pmd": 0, | ||||||
|  |             "pdl": 0, | ||||||
|             "allowed_for_design": false |             "allowed_for_design": false | ||||||
|             }, |         }, | ||||||
|             { |         { | ||||||
|             "type_variety": "openroadm_mw_mw_preamp_worstcase_ver5", |             "type_variety": "openroadm_mw_mw_preamp_worstcase_ver5", | ||||||
|             "type_def": "openroadm", |             "type_def": "openroadm", | ||||||
|             "gain_flatmax": 27, |             "gain_flatmax": 27, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|             "nf_coef": [-5.952e-4,-6.250e-2,-1.071,27.99], |             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 27.99], | ||||||
|  |             "pmd": 0, | ||||||
|  |             "pdl": 0, | ||||||
|             "allowed_for_design": false |             "allowed_for_design": false | ||||||
|             }, |         }, | ||||||
| 		{ |         { | ||||||
|             "type_variety": "openroadm_mw_mw_booster", |             "type_variety": "openroadm_mw_mw_booster", | ||||||
|             "type_def": "openroadm_booster", |             "type_def": "openroadm_booster", | ||||||
|             "gain_flatmax": 32, |             "gain_flatmax": 32, | ||||||
|             "gain_min": 0, |             "gain_min": 0, | ||||||
|             "p_max": 22, |             "p_max": 22, | ||||||
|  |             "pmd": 0, | ||||||
|  |             "pdl": 0, | ||||||
|             "allowed_for_design": false |             "allowed_for_design": false | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "Fiber":[ |     "Fiber": [ | ||||||
|             { |         { | ||||||
|             "type_variety": "SSMF", |             "type_variety": "SSMF", | ||||||
|             "dispersion": 1.67e-05, |             "dispersion": 1.67e-05, | ||||||
|             "gamma": 0.00127, |             "effective_area": 83e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             }, |         }, | ||||||
|             { |         { | ||||||
|             "type_variety": "NZDF", |             "type_variety": "NZDF", | ||||||
|             "dispersion": 0.5e-05, |             "dispersion": 0.5e-05, | ||||||
|             "gamma": 0.00146, |             "effective_area": 72e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             }, |         }, | ||||||
|             { |         { | ||||||
|             "type_variety": "LOF", |             "type_variety": "LOF", | ||||||
|             "dispersion": 2.2e-05, |             "dispersion": 2.2e-05, | ||||||
|             "gamma": 0.000843, |             "effective_area": 125e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "RamanFiber":[ |     "RamanFiber": [ | ||||||
|             { |         { | ||||||
|             "type_variety": "SSMF", |             "type_variety": "SSMF", | ||||||
|             "dispersion": 1.67e-05, |             "dispersion": 1.67e-05, | ||||||
|             "gamma": 0.00127, |             "effective_area": 83e-12, | ||||||
|             "pmd_coef": 1.265e-15, |             "pmd_coef": 1.265e-15 | ||||||
|             "raman_efficiency": { |         } | ||||||
|               "cr":[ |     ], | ||||||
|                   0, 9.4E-06, 2.92E-05, 4.88E-05, 6.82E-05, 8.31E-05, 9.4E-05, 0.0001014, 0.0001069, 0.0001119, |     "Span": [ | ||||||
|                   0.0001217, 0.0001268, 0.0001365, 0.000149, 0.000165, 0.000181, 0.0001977, 0.0002192, 0.0002469, |         { | ||||||
|                   0.0002749, 0.0002999, 0.0003206, 0.0003405, 0.0003592, 0.000374, 0.0003826, 0.0003841, 0.0003826, |             "power_mode": true, | ||||||
|                   0.0003802, 0.0003756, 0.0003549, 0.0003795, 0.000344, 0.0002933, 0.0002024, 0.0001158, 8.46E-05, |             "delta_power_range_db": [0, 0, 0], | ||||||
|                   7.14E-05, 6.86E-05, 8.5E-05, 8.93E-05, 9.01E-05, 8.15E-05, 6.67E-05, 4.37E-05, 3.28E-05, 2.96E-05, |  | ||||||
|                   2.65E-05, 2.57E-05, 2.81E-05, 3.08E-05, 3.67E-05, 5.85E-05, 6.63E-05, 6.36E-05, 5.5E-05, 4.06E-05, |  | ||||||
|                   2.77E-05, 2.42E-05, 1.87E-05, 1.6E-05, 1.4E-05, 1.13E-05, 1.05E-05, 9.8E-06, 9.8E-06, 1.13E-05, |  | ||||||
|                   1.64E-05, 1.95E-05, 2.38E-05, 2.26E-05, 2.03E-05, 1.48E-05, 1.09E-05, 9.8E-06, 1.05E-05, 1.17E-05, |  | ||||||
|                   1.25E-05, 1.21E-05, 1.09E-05, 9.8E-06, 8.2E-06, 6.6E-06, 4.7E-06, 2.7E-06, 1.9E-06, 1.2E-06, 4E-07, |  | ||||||
|                   2E-07, 1E-07 |  | ||||||
|               ], |  | ||||||
|               "frequency_offset":[ |  | ||||||
|                 0, 0.5e12, 1e12, 1.5e12, 2e12, 2.5e12, 3e12, 3.5e12, 4e12, 4.5e12, 5e12, 5.5e12, 6e12, 6.5e12, 7e12, |  | ||||||
|                 7.5e12, 8e12, 8.5e12, 9e12, 9.5e12, 10e12, 10.5e12, 11e12, 11.5e12, 12e12, 12.5e12, 12.75e12, |  | ||||||
|                 13e12, 13.25e12, 13.5e12, 14e12, 14.5e12, 14.75e12, 15e12, 15.5e12, 16e12, 16.5e12, 17e12, |  | ||||||
|                 17.5e12, 18e12, 18.25e12, 18.5e12, 18.75e12, 19e12, 19.5e12, 20e12, 20.5e12, 21e12, 21.5e12, |  | ||||||
|                 22e12, 22.5e12, 23e12, 23.5e12, 24e12, 24.5e12, 25e12, 25.5e12, 26e12, 26.5e12, 27e12, 27.5e12, 28e12, |  | ||||||
|                 28.5e12, 29e12, 29.5e12, 30e12, 30.5e12, 31e12, 31.5e12, 32e12, 32.5e12, 33e12, 33.5e12, 34e12, 34.5e12, |  | ||||||
|                 35e12, 35.5e12, 36e12, 36.5e12, 37e12, 37.5e12, 38e12, 38.5e12, 39e12, 39.5e12, 40e12, 40.5e12, 41e12, |  | ||||||
|                 41.5e12, 42e12 |  | ||||||
|               ] |  | ||||||
|               } |  | ||||||
|             } |  | ||||||
|       ], |  | ||||||
|       "Span":[ |  | ||||||
|             { |  | ||||||
|             "power_mode":true, |  | ||||||
|             "delta_power_range_db": [0,0,0], |  | ||||||
|             "max_fiber_lineic_loss_for_raman": 0.25, |             "max_fiber_lineic_loss_for_raman": 0.25, | ||||||
|             "target_extended_gain": 0, |             "target_extended_gain": 0, | ||||||
|             "max_length": 135, |             "max_length": 135, | ||||||
| @@ -109,102 +96,314 @@ | |||||||
|             "EOL": 0, |             "EOL": 0, | ||||||
|             "con_in": 0, |             "con_in": 0, | ||||||
|             "con_out": 0 |             "con_out": 0 | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "Roadm":[ |     "Roadm": [ | ||||||
|             { |         { | ||||||
|             "target_pch_out_db": -20, |             "target_pch_out_db": -20, | ||||||
|             "add_drop_osnr": 33, |             "add_drop_osnr": 33, | ||||||
|             "pmd": 0, |             "pmd": 3e-12, | ||||||
|  |             "pdl": 1.5, | ||||||
|             "restrictions": { |             "restrictions": { | ||||||
|                             "preamp_variety_list":["openroadm_mw_mw_preamp_worstcase_ver5"], |                 "preamp_variety_list": ["openroadm_mw_mw_preamp_worstcase_ver5"], | ||||||
|                             "booster_variety_list":["openroadm_mw_mw_booster"] |                 "booster_variety_list": ["openroadm_mw_mw_booster"] | ||||||
|                             }             |  | ||||||
|             } |             } | ||||||
|       ], |         } | ||||||
|       "SI":[ |     ], | ||||||
|             { |     "SI": [ | ||||||
|  |         { | ||||||
|             "f_min": 191.3e12, |             "f_min": 191.3e12, | ||||||
|             "baud_rate": 31.57e9, |             "baud_rate": 31.57e9, | ||||||
|             "f_max":196.1e12, |             "f_max": 196.1e12, | ||||||
|             "spacing": 50e9, |             "spacing": 50e9, | ||||||
|             "power_dbm": 2, |             "power_dbm": 2, | ||||||
|             "power_range_db": [0,0,1], |             "power_range_db": [0, 0, 1], | ||||||
|             "roll_off": 0.15, |             "roll_off": 0.15, | ||||||
|             "tx_osnr": 35, |             "tx_osnr": 35, | ||||||
|             "sys_margins": 2 |             "sys_margins": 2 | ||||||
|             } |         } | ||||||
|       ], |     ], | ||||||
|       "Transceiver":[ |     "Transceiver": [ | ||||||
| 		{ |         { | ||||||
|             "type_variety": "OpenROADM MSA ver. 5.0", |             "type_variety": "OpenROADM MSA ver. 5.0", | ||||||
|             "frequency":{ |             "frequency": { | ||||||
|                         "min": 191.35e12, |                 "min": 191.35e12, | ||||||
|                         "max": 196.1e12 |                 "max": 196.1e12 | ||||||
|                         }, |             }, | ||||||
|             "mode":[ |             "mode": [ | ||||||
|  |                 { | ||||||
|  |                     "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", | ||||||
|  |                     "baud_rate": 27.95e9, | ||||||
|  |                     "OSNR": 17, | ||||||
|  |                     "bit_rate": 100e9, | ||||||
|  |                     "roll_off": null, | ||||||
|  |                     "tx_osnr": 33, | ||||||
|  |                     "penalties": [ | ||||||
|                         { |                         { | ||||||
|                         "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", |                             "chromatic_dispersion": 4e3, | ||||||
|                         "baud_rate": 27.95e9, |                             "penalty_value": 0 | ||||||
|                         "OSNR": 17, |  | ||||||
|                         "bit_rate": 100e9, |  | ||||||
|                         "roll_off": null, |  | ||||||
|                         "tx_osnr": 33, |  | ||||||
|                         "min_spacing": 50e9, |  | ||||||
|                         "cost":1 |  | ||||||
|                         }, |                         }, | ||||||
|                         { |                         { | ||||||
|                         "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", |                             "chromatic_dispersion": 18e3, | ||||||
|                         "baud_rate": 31.57e9, |                             "penalty_value": 0.5 | ||||||
|                         "OSNR": 12, |  | ||||||
|                         "bit_rate": 100e9, |  | ||||||
|                         "roll_off": 0.15, |  | ||||||
|                         "tx_osnr": 36, |  | ||||||
|                         "min_spacing": 50e9, |  | ||||||
|                         "cost":1 |  | ||||||
|                         }, |                         }, | ||||||
|                         { |                         { | ||||||
|                         "format": "200 Gbit/s, 31.57 Gbaud, DP-16QAM", |                             "pmd": 10, | ||||||
|                         "baud_rate": 31.57e9, |                             "penalty_value": 0 | ||||||
|                         "OSNR": 20.5, |  | ||||||
|                         "bit_rate": 100e9, |  | ||||||
|                         "roll_off": 0.15, |  | ||||||
|                         "tx_osnr": 36, |  | ||||||
|                         "min_spacing": 50e9, |  | ||||||
|                         "cost":1 |  | ||||||
|                         }, |                         }, | ||||||
|                         { |                         { | ||||||
|                         "format": "200 Gbit/s, DP-QPSK", |                             "pmd": 30, | ||||||
|                         "baud_rate": 63.1e9, |                             "penalty_value": 0.5 | ||||||
|                         "OSNR": 17, |  | ||||||
|                         "bit_rate": 200e9, |  | ||||||
|                         "roll_off": 0.15, |  | ||||||
|                         "tx_osnr": 36, |  | ||||||
|                         "min_spacing": 87.5e9, |  | ||||||
|                         "cost":1 |  | ||||||
|                         }, |                         }, | ||||||
|                         { |                         { | ||||||
|                         "format": "300 Gbit/s, DP-8QAM", |                             "pdl": 1, | ||||||
|                         "baud_rate": 63.1e9, |                             "penalty_value": 0.5 | ||||||
|                         "OSNR": 21, |  | ||||||
|                         "bit_rate": 300e9, |  | ||||||
|                         "roll_off": 0.15, |  | ||||||
|                         "tx_osnr": 36, |  | ||||||
|                         "min_spacing": 87.5e9, |  | ||||||
|                         "cost":1 |  | ||||||
|                         }, |                         }, | ||||||
|                         { |                         { | ||||||
|                         "format": "400 Gbit/s, DP-16QAM", |                             "pdl": 2, | ||||||
|                         "baud_rate": 63.1e9, |                             "penalty_value": 1 | ||||||
|                         "OSNR": 24, |                         }, | ||||||
|                         "bit_rate": 400e9, |                         { | ||||||
|                         "roll_off": 0.15, |                             "pdl": 4, | ||||||
|                         "tx_osnr": 36, |                             "penalty_value": 2.5 | ||||||
|                         "min_spacing": 87.5e9, |                         }, | ||||||
|                         "cost":1 |                         { | ||||||
|  |                             "pdl": 6, | ||||||
|  |                             "penalty_value": 4 | ||||||
|                         } |                         } | ||||||
|                         ] |                     ], | ||||||
|             } |                     "min_spacing": 50e9, | ||||||
|       ] |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", | ||||||
|  |                     "baud_rate": 31.57e9, | ||||||
|  |                     "OSNR": 12, | ||||||
|  |                     "bit_rate": 100e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 48e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 30, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 6, | ||||||
|  |                             "penalty_value": 4 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 50e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "200 Gbit/s, 31.57 Gbaud, DP-16QAM", | ||||||
|  |                     "baud_rate": 31.57e9, | ||||||
|  |                     "OSNR": 20.5, | ||||||
|  |                     "bit_rate": 100e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 24e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 30, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 6, | ||||||
|  |                             "penalty_value": 4 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 50e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "200 Gbit/s, DP-QPSK", | ||||||
|  |                     "baud_rate": 63.1e9, | ||||||
|  |                     "OSNR": 17, | ||||||
|  |                     "bit_rate": 200e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 24e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 25, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 87.5e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "300 Gbit/s, DP-8QAM", | ||||||
|  |                     "baud_rate": 63.1e9, | ||||||
|  |                     "OSNR": 21, | ||||||
|  |                     "bit_rate": 300e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 18e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 25, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 87.5e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "format": "400 Gbit/s, DP-16QAM", | ||||||
|  |                     "baud_rate": 63.1e9, | ||||||
|  |                     "OSNR": 24, | ||||||
|  |                     "bit_rate": 400e9, | ||||||
|  |                     "roll_off": 0.15, | ||||||
|  |                     "tx_osnr": 36, | ||||||
|  |                     "penalties": [ | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": -1e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 4e3, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "chromatic_dispersion": 12e3, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 10, | ||||||
|  |                             "penalty_value": 0 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pmd": 20, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 1, | ||||||
|  |                             "penalty_value": 0.5 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 2, | ||||||
|  |                             "penalty_value": 1 | ||||||
|  |                         }, | ||||||
|  |                         { | ||||||
|  |                             "pdl": 4, | ||||||
|  |                             "penalty_value": 2.5 | ||||||
|  |                         } | ||||||
|  |                     ], | ||||||
|  |                     "min_spacing": 87.5e9, | ||||||
|  |                     "cost": 1 | ||||||
|  |                 } | ||||||
|  |             ] | ||||||
|  |         } | ||||||
|  |     ] | ||||||
| } | } | ||||||
|   | |||||||
| @@ -20,12 +20,12 @@ | |||||||
|         "temperature": 283, |         "temperature": 283, | ||||||
|         "raman_pumps": [ |         "raman_pumps": [ | ||||||
|           { |           { | ||||||
|             "power": 200e-3, |             "power": 224.403e-3, | ||||||
|             "frequency": 205e12, |             "frequency": 205e12, | ||||||
|             "propagation_direction": "counterprop" |             "propagation_direction": "counterprop" | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             "power": 206e-3, |             "power": 231.135e-3, | ||||||
|             "frequency": 201e12, |             "frequency": 201e12, | ||||||
|             "propagation_direction": "counterprop" |             "propagation_direction": "counterprop" | ||||||
|           } |           } | ||||||
| @@ -49,6 +49,21 @@ | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     { | ||||||
|  |       "uid": "Fused1", | ||||||
|  |       "type": "Fused", | ||||||
|  |       "params": { | ||||||
|  |         "loss": 0 | ||||||
|  |       }, | ||||||
|  |       "metadata": { | ||||||
|  |         "location": { | ||||||
|  |           "latitude": 1.5, | ||||||
|  |           "longitude": 0, | ||||||
|  |           "city": null, | ||||||
|  |           "region": "" | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       "uid": "Edfa1", |       "uid": "Edfa1", | ||||||
|       "type": "Edfa", |       "type": "Edfa", | ||||||
| @@ -88,6 +103,10 @@ | |||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "from_node": "Span1", |       "from_node": "Span1", | ||||||
|  |       "to_node": "Fused1" | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "from_node": "Fused1", | ||||||
|       "to_node": "Edfa1" |       "to_node": "Edfa1" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -1,14 +1,13 @@ | |||||||
| { | { | ||||||
|   "raman_parameters": { |   "raman_params": { | ||||||
|     "flag_raman": true, |     "flag": true, | ||||||
|     "space_resolution": 10e3, |     "result_spatial_resolution": 10e3, | ||||||
|     "tolerance": 1e-8 |     "solver_spatial_resolution": 50 | ||||||
|   }, |   }, | ||||||
|   "nli_parameters": { |   "nli_params": { | ||||||
|   	"nli_method_name": "ggn_spectrally_separated", |     "method": "ggn_spectrally_separated", | ||||||
|   	"wdm_grid_size": 50e9, |     "dispersion_tolerance": 1, | ||||||
|   	"dispersion_tolerance": 1, |     "phase_shift_tolerance": 0.1, | ||||||
|   	"phase_shift_tolerance": 0.1, |     "computed_channels": [1, 18, 37, 56, 75] | ||||||
| 	"computed_channels": [1, 18, 37, 56, 75]  |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @@ -10,7 +10,6 @@ Common code for CLI examples | |||||||
|  |  | ||||||
| import argparse | import argparse | ||||||
| import logging | import logging | ||||||
| import os.path |  | ||||||
| import sys | import sys | ||||||
| from math import ceil | from math import ceil | ||||||
| from numpy import linspace, mean | from numpy import linspace, mean | ||||||
| @@ -21,7 +20,6 @@ from gnpy.core.equipment import trx_mode_params | |||||||
| import gnpy.core.exceptions as exceptions | import gnpy.core.exceptions as exceptions | ||||||
| from gnpy.core.network import build_network | from gnpy.core.network import build_network | ||||||
| from gnpy.core.parameters import SimParams | from gnpy.core.parameters import SimParams | ||||||
| from gnpy.core.science_utils import Simulation |  | ||||||
| from gnpy.core.utils import db2lin, lin2db, automatic_nch | from gnpy.core.utils import db2lin, lin2db, automatic_nch | ||||||
| from gnpy.topology.request import (ResultElement, jsontocsv, compute_path_dsjctn, requests_aggregation, | from gnpy.topology.request import (ResultElement, jsontocsv, compute_path_dsjctn, requests_aggregation, | ||||||
|                                    BLOCKING_NOPATH, correct_json_route_list, |                                    BLOCKING_NOPATH, correct_json_route_list, | ||||||
| @@ -57,14 +55,15 @@ def load_common_data(equipment_filename, topology_filename, simulation_filename, | |||||||
|         if save_raw_network_filename is not None: |         if save_raw_network_filename is not None: | ||||||
|             save_network(network, save_raw_network_filename) |             save_network(network, save_raw_network_filename) | ||||||
|             print(f'{ansi_escapes.blue}Raw network (no optimizations) saved to {save_raw_network_filename}{ansi_escapes.reset}') |             print(f'{ansi_escapes.blue}Raw network (no optimizations) saved to {save_raw_network_filename}{ansi_escapes.reset}') | ||||||
|         sim_params = SimParams(**load_json(simulation_filename)) if simulation_filename is not None else None |         if not simulation_filename: | ||||||
|         if not sim_params: |             sim_params = {} | ||||||
|             if next((node for node in network if isinstance(node, RamanFiber)), None) is not None: |             if next((node for node in network if isinstance(node, RamanFiber)), None) is not None: | ||||||
|                 print(f'{ansi_escapes.red}Invocation error:{ansi_escapes.reset} ' |                 print(f'{ansi_escapes.red}Invocation error:{ansi_escapes.reset} ' | ||||||
|                       f'RamanFiber requires passing simulation params via --sim-params') |                       f'RamanFiber requires passing simulation params via --sim-params') | ||||||
|                 sys.exit(1) |                 sys.exit(1) | ||||||
|         else: |         else: | ||||||
|             Simulation.set_params(sim_params) |             sim_params = load_json(simulation_filename) | ||||||
|  |         SimParams.set_params(sim_params) | ||||||
|     except exceptions.EquipmentConfigError as e: |     except exceptions.EquipmentConfigError as e: | ||||||
|         print(f'{ansi_escapes.red}Configuration error in the equipment library:{ansi_escapes.reset} {e}') |         print(f'{ansi_escapes.red}Configuration error in the equipment library:{ansi_escapes.reset} {e}') | ||||||
|         sys.exit(1) |         sys.exit(1) | ||||||
|   | |||||||
| @@ -94,6 +94,7 @@ class Roadm(_JsonThing): | |||||||
|         'target_pch_out_db': -17, |         'target_pch_out_db': -17, | ||||||
|         'add_drop_osnr': 100, |         'add_drop_osnr': 100, | ||||||
|         'pmd': 0, |         'pmd': 0, | ||||||
|  |         'pdl': 0, | ||||||
|         'restrictions': { |         'restrictions': { | ||||||
|             'preamp_variety_list': [], |             'preamp_variety_list': [], | ||||||
|             'booster_variety_list': [] |             'booster_variety_list': [] | ||||||
| @@ -113,36 +114,45 @@ class Transceiver(_JsonThing): | |||||||
|  |  | ||||||
|     def __init__(self, **kwargs): |     def __init__(self, **kwargs): | ||||||
|         self.update_attr(self.default_values, kwargs, 'Transceiver') |         self.update_attr(self.default_values, kwargs, 'Transceiver') | ||||||
|  |         for mode_params in self.mode: | ||||||
|  |             penalties = mode_params.get('penalties') | ||||||
|  |             mode_params['penalties'] = {} | ||||||
|  |             if not penalties: | ||||||
|  |                 continue | ||||||
|  |             for impairment in ('chromatic_dispersion', 'pmd', 'pdl'): | ||||||
|  |                 imp_penalties = [p for p in penalties if impairment in p] | ||||||
|  |                 if not imp_penalties: | ||||||
|  |                     continue | ||||||
|  |                 if all(p[impairment] > 0 for p in imp_penalties): | ||||||
|  |                     # make sure the list of penalty values include a proper lower boundary | ||||||
|  |                     # (we assume 0 penalty for 0 impairment) | ||||||
|  |                     imp_penalties.insert(0, {impairment: 0, 'penalty_value': 0}) | ||||||
|  |                 # make sure the list of penalty values are sorted by impairment value | ||||||
|  |                 imp_penalties.sort(key=lambda i: i[impairment]) | ||||||
|  |                 # rearrange as dict of lists instead of list of dicts | ||||||
|  |                 mode_params['penalties'][impairment] = { | ||||||
|  |                     'up_to_boundary': [p[impairment] for p in imp_penalties], | ||||||
|  |                     'penalty_value': [p['penalty_value'] for p in imp_penalties] | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |  | ||||||
| class Fiber(_JsonThing): | class Fiber(_JsonThing): | ||||||
|     default_values = { |     default_values = { | ||||||
|         'type_variety': '', |         'type_variety': '', | ||||||
|         'dispersion': None, |         'dispersion': None, | ||||||
|         'gamma': 0, |         'effective_area': None, | ||||||
|         'pmd_coef': 0 |         'pmd_coef': 0 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     def __init__(self, **kwargs): |     def __init__(self, **kwargs): | ||||||
|         self.update_attr(self.default_values, kwargs, 'Fiber') |         self.update_attr(self.default_values, kwargs, self.__class__.__name__) | ||||||
|  |         for optional in ['gamma', 'raman_efficiency']: | ||||||
|  |             if optional in kwargs: | ||||||
|  |                 setattr(self, optional, kwargs[optional]) | ||||||
|  |  | ||||||
|  |  | ||||||
| class RamanFiber(_JsonThing): | class RamanFiber(Fiber): | ||||||
|     default_values = { |     pass | ||||||
|         'type_variety': '', |  | ||||||
|         'dispersion': None, |  | ||||||
|         'gamma': 0, |  | ||||||
|         'pmd_coef': 0, |  | ||||||
|         'raman_efficiency': None |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     def __init__(self, **kwargs): |  | ||||||
|         self.update_attr(self.default_values, kwargs, 'RamanFiber') |  | ||||||
|         for param in ('cr', 'frequency_offset'): |  | ||||||
|             if param not in self.raman_efficiency: |  | ||||||
|                 raise EquipmentConfigError(f'RamanFiber.raman_efficiency: missing "{param}" parameter') |  | ||||||
|         if self.raman_efficiency['frequency_offset'] != sorted(self.raman_efficiency['frequency_offset']): |  | ||||||
|             raise EquipmentConfigError(f'RamanFiber.raman_efficiency.frequency_offset is not sorted') |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class Amp(_JsonThing): | class Amp(_JsonThing): | ||||||
| @@ -162,7 +172,9 @@ class Amp(_JsonThing): | |||||||
|         'gain_ripple': None, |         'gain_ripple': None, | ||||||
|         'out_voa_auto': False, |         'out_voa_auto': False, | ||||||
|         'allowed_for_design': False, |         'allowed_for_design': False, | ||||||
|         'raman': False |         'raman': False, | ||||||
|  |         'pmd': 0, | ||||||
|  |         'pdl': 0 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     def __init__(self, **kwargs): |     def __init__(self, **kwargs): | ||||||
| @@ -277,7 +289,7 @@ def _check_fiber_vs_raman_fiber(equipment): | |||||||
|     if 'RamanFiber' not in equipment: |     if 'RamanFiber' not in equipment: | ||||||
|         return |         return | ||||||
|     for fiber_type in set(equipment['Fiber'].keys()) & set(equipment['RamanFiber'].keys()): |     for fiber_type in set(equipment['Fiber'].keys()) & set(equipment['RamanFiber'].keys()): | ||||||
|         for attr in ('dispersion', 'dispersion-slope', 'gamma', 'pmd-coefficient'): |         for attr in ('dispersion', 'dispersion-slope', 'effective_area', 'gamma', 'pmd-coefficient'): | ||||||
|             fiber = equipment['Fiber'][fiber_type] |             fiber = equipment['Fiber'][fiber_type] | ||||||
|             raman = equipment['RamanFiber'][fiber_type] |             raman = equipment['RamanFiber'][fiber_type] | ||||||
|             a = getattr(fiber, attr, None) |             a = getattr(fiber, attr, None) | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ from logging import getLogger | |||||||
| from networkx import (dijkstra_path, NetworkXNoPath, | from networkx import (dijkstra_path, NetworkXNoPath, | ||||||
|                       all_simple_paths, shortest_simple_paths) |                       all_simple_paths, shortest_simple_paths) | ||||||
| from networkx.utils import pairwise | from networkx.utils import pairwise | ||||||
| from numpy import mean | from numpy import mean, argmin | ||||||
| from gnpy.core.elements import Transceiver, Roadm | from gnpy.core.elements import Transceiver, Roadm | ||||||
| from gnpy.core.utils import lin2db | from gnpy.core.utils import lin2db | ||||||
| from gnpy.core.info import create_input_spectral_information | from gnpy.core.info import create_input_spectral_information | ||||||
| @@ -32,12 +32,12 @@ from math import ceil | |||||||
|  |  | ||||||
| LOGGER = getLogger(__name__) | LOGGER = getLogger(__name__) | ||||||
|  |  | ||||||
| RequestParams = namedtuple('RequestParams', 'request_id source destination bidir trx_type' + | RequestParams = namedtuple('RequestParams', 'request_id source destination bidir trx_type' | ||||||
|                            ' trx_mode nodes_list loose_list spacing power nb_channel f_min' + |                            ' trx_mode nodes_list loose_list spacing power nb_channel f_min' | ||||||
|                            ' f_max format baud_rate OSNR bit_rate roll_off tx_osnr' + |                            ' f_max format baud_rate OSNR penalties bit_rate' | ||||||
|                            ' min_spacing cost path_bandwidth effective_freq_slot') |                            ' roll_off tx_osnr min_spacing cost path_bandwidth effective_freq_slot') | ||||||
| DisjunctionParams = namedtuple('DisjunctionParams', 'disjunction_id relaxable link' + | DisjunctionParams = namedtuple('DisjunctionParams', 'disjunction_id relaxable link_diverse' | ||||||
|                                '_diverse node_diverse disjunctions_req') |                                ' node_diverse disjunctions_req') | ||||||
|  |  | ||||||
|  |  | ||||||
| class PathRequest: | class PathRequest: | ||||||
| @@ -62,6 +62,7 @@ class PathRequest: | |||||||
|         self.f_max = params.f_max |         self.f_max = params.f_max | ||||||
|         self.format = params.format |         self.format = params.format | ||||||
|         self.OSNR = params.OSNR |         self.OSNR = params.OSNR | ||||||
|  |         self.penalties = params.penalties | ||||||
|         self.bit_rate = params.bit_rate |         self.bit_rate = params.bit_rate | ||||||
|         self.roll_off = params.roll_off |         self.roll_off = params.roll_off | ||||||
|         self.tx_osnr = params.tx_osnr |         self.tx_osnr = params.tx_osnr | ||||||
| @@ -348,10 +349,12 @@ def propagate(path, req, equipment): | |||||||
|         else: |         else: | ||||||
|             si = el(si) |             si = el(si) | ||||||
|     path[0].update_snr(req.tx_osnr) |     path[0].update_snr(req.tx_osnr) | ||||||
|  |     path[0].calc_penalties(req.penalties) | ||||||
|     if any(isinstance(el, Roadm) for el in path): |     if any(isinstance(el, Roadm) for el in path): | ||||||
|         path[-1].update_snr(req.tx_osnr, equipment['Roadm']['default'].add_drop_osnr) |         path[-1].update_snr(req.tx_osnr, equipment['Roadm']['default'].add_drop_osnr) | ||||||
|     else: |     else: | ||||||
|         path[-1].update_snr(req.tx_osnr) |         path[-1].update_snr(req.tx_osnr) | ||||||
|  |     path[-1].calc_penalties(req.penalties) | ||||||
|     return si |     return si | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -386,11 +389,13 @@ def propagate_and_optimize_mode(path, req, equipment): | |||||||
|             for this_mode in modes_to_explore: |             for this_mode in modes_to_explore: | ||||||
|                 if path[-1].snr is not None: |                 if path[-1].snr is not None: | ||||||
|                     path[0].update_snr(this_mode['tx_osnr']) |                     path[0].update_snr(this_mode['tx_osnr']) | ||||||
|  |                     path[0].calc_penalties(this_mode['penalties']) | ||||||
|                     if any(isinstance(el, Roadm) for el in path): |                     if any(isinstance(el, Roadm) for el in path): | ||||||
|                         path[-1].update_snr(this_mode['tx_osnr'], equipment['Roadm']['default'].add_drop_osnr) |                         path[-1].update_snr(this_mode['tx_osnr'], equipment['Roadm']['default'].add_drop_osnr) | ||||||
|                     else: |                     else: | ||||||
|                         path[-1].update_snr(this_mode['tx_osnr']) |                         path[-1].update_snr(this_mode['tx_osnr']) | ||||||
|                     if round(min(path[-1].snr + lin2db(this_br / (12.5e9))), 2) \ |                     path[-1].calc_penalties(this_mode['penalties']) | ||||||
|  |                     if round(min(path[-1].snr_01nm - path[-1].total_penalty), 2) \ | ||||||
|                             > this_mode['OSNR'] + equipment['SI']['default'].sys_margins: |                             > this_mode['OSNR'] + equipment['SI']['default'].sys_margins: | ||||||
|                         return path, this_mode |                         return path, this_mode | ||||||
|                     else: |                     else: | ||||||
| @@ -1107,12 +1112,16 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist): | |||||||
|                 # means that at this point the mode was entered/forced by user and thus a |                 # means that at this point the mode was entered/forced by user and thus a | ||||||
|                 # baud_rate was defined |                 # baud_rate was defined | ||||||
|                 propagate(total_path, pathreq, equipment) |                 propagate(total_path, pathreq, equipment) | ||||||
|                 temp_snr01nm = round(mean(total_path[-1].snr+lin2db(pathreq.baud_rate/(12.5e9))), 2) |                 snr01nm_with_penalty = total_path[-1].snr_01nm - total_path[-1].total_penalty | ||||||
|                 if temp_snr01nm < pathreq.OSNR + equipment['SI']['default'].sys_margins: |                 min_ind = argmin(snr01nm_with_penalty) | ||||||
|  |                 if round(snr01nm_with_penalty[min_ind], 2) < pathreq.OSNR + equipment['SI']['default'].sys_margins: | ||||||
|                     msg = f'\tWarning! Request {pathreq.request_id} computed path from' +\ |                     msg = f'\tWarning! Request {pathreq.request_id} computed path from' +\ | ||||||
|                           f' {pathreq.source} to {pathreq.destination} does not pass with' +\ |                           f' {pathreq.source} to {pathreq.destination} does not pass with {pathreq.tsp_mode}' +\ | ||||||
|                           f' {pathreq.tsp_mode}\n\tcomputedSNR in 0.1nm = {temp_snr01nm} ' +\ |                           f'\n\tcomputed SNR in 0.1nm = {round(total_path[-1].snr_01nm[min_ind], 2)}' +\ | ||||||
|                           f'- required osnr {pathreq.OSNR} + {equipment["SI"]["default"].sys_margins} margin' |                           f'\n\tCD penalty = {round(total_path[-1].penalties["chromatic_dispersion"][min_ind], 2)}' +\ | ||||||
|  |                           f'\n\tPMD penalty = {round(total_path[-1].penalties["pmd"][min_ind], 2)}' +\ | ||||||
|  |                           f'\n\trequired osnr = {pathreq.OSNR}' +\ | ||||||
|  |                           f'\n\tsystem margin = {equipment["SI"]["default"].sys_margins}' | ||||||
|                     print(msg) |                     print(msg) | ||||||
|                     LOGGER.warning(msg) |                     LOGGER.warning(msg) | ||||||
|                     pathreq.blocking_reason = 'MODE_NOT_FEASIBLE' |                     pathreq.blocking_reason = 'MODE_NOT_FEASIBLE' | ||||||
| @@ -1133,6 +1142,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist): | |||||||
|                         pathreq.OSNR = mode['OSNR'] |                         pathreq.OSNR = mode['OSNR'] | ||||||
|                         pathreq.tx_osnr = mode['tx_osnr'] |                         pathreq.tx_osnr = mode['tx_osnr'] | ||||||
|                         pathreq.bit_rate = mode['bit_rate'] |                         pathreq.bit_rate = mode['bit_rate'] | ||||||
|  |                         pathreq.penalties = mode['penalties'] | ||||||
|                     # other blocking reason should not appear at this point |                     # other blocking reason should not appear at this point | ||||||
|                 except AttributeError: |                 except AttributeError: | ||||||
|                     pathreq.baud_rate = mode['baud_rate'] |                     pathreq.baud_rate = mode['baud_rate'] | ||||||
| @@ -1141,6 +1151,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist): | |||||||
|                     pathreq.OSNR = mode['OSNR'] |                     pathreq.OSNR = mode['OSNR'] | ||||||
|                     pathreq.tx_osnr = mode['tx_osnr'] |                     pathreq.tx_osnr = mode['tx_osnr'] | ||||||
|                     pathreq.bit_rate = mode['bit_rate'] |                     pathreq.bit_rate = mode['bit_rate'] | ||||||
|  |                     pathreq.penalties = mode['penalties'] | ||||||
|  |  | ||||||
|             # reversed path is needed for correct spectrum assignment |             # reversed path is needed for correct spectrum assignment | ||||||
|             reversed_path = find_reversed_path(pathlist[i]) |             reversed_path = find_reversed_path(pathlist[i]) | ||||||
| @@ -1152,14 +1163,16 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist): | |||||||
|                 print(f'\tPath (roadsm) {[r.uid for r in rev_p if isinstance(r,Roadm)]}\n') |                 print(f'\tPath (roadsm) {[r.uid for r in rev_p if isinstance(r,Roadm)]}\n') | ||||||
|                 propagate(rev_p, pathreq, equipment) |                 propagate(rev_p, pathreq, equipment) | ||||||
|                 propagated_reversed_path = rev_p |                 propagated_reversed_path = rev_p | ||||||
|                 temp_snr01nm = round(mean(propagated_reversed_path[-1].snr +\ |                 snr01nm_with_penalty = rev_p[-1].snr_01nm - rev_p[-1].total_penalty | ||||||
|                                           lin2db(pathreq.baud_rate/(12.5e9))), 2) |                 min_ind = argmin(snr01nm_with_penalty) | ||||||
|                 if temp_snr01nm < pathreq.OSNR + equipment['SI']['default'].sys_margins: |                 if round(snr01nm_with_penalty[min_ind], 2) < pathreq.OSNR + equipment['SI']['default'].sys_margins: | ||||||
|                     msg = f'\tWarning! Request {pathreq.request_id} computed path from' +\ |                     msg = f'\tWarning! Request {pathreq.request_id} computed path from' +\ | ||||||
|                           f' {pathreq.source} to {pathreq.destination} does not pass with' +\ |                           f' {pathreq.source} to {pathreq.destination} does not pass with {pathreq.tsp_mode}' +\ | ||||||
|                           f' {pathreq.tsp_mode}\n' +\ |                           f'\n\tcomputed SNR in 0.1nm = {round(rev_p[-1].snr_01nm[min_ind], 2)}' +\ | ||||||
|                           f'\tcomputedSNR in 0.1nm = {temp_snr01nm} -' \ |                           f'\n\tCD penalty = {round(rev_p[-1].penalties["chromatic_dispersion"][min_ind], 2)}' +\ | ||||||
|                           f' required osnr {pathreq.OSNR} + {equipment["SI"]["default"].sys_margins} margin' |                           f'\n\tPMD penalty = {round(rev_p[-1].penalties["pmd"][min_ind], 2)}' +\ | ||||||
|  |                           f'\n\trequired osnr = {pathreq.OSNR}' +\ | ||||||
|  |                           f'\n\tsystem margin = {equipment["SI"]["default"].sys_margins}' | ||||||
|                     print(msg) |                     print(msg) | ||||||
|                     LOGGER.warning(msg) |                     LOGGER.warning(msg) | ||||||
|                     # TODO selection of mode should also be on reversed direction !! |                     # TODO selection of mode should also be on reversed direction !! | ||||||
|   | |||||||
| @@ -15,7 +15,6 @@ element/oms correspondace | |||||||
|  |  | ||||||
| from collections import namedtuple | from collections import namedtuple | ||||||
| from logging import getLogger | from logging import getLogger | ||||||
| from math import ceil |  | ||||||
| from gnpy.core.elements import Roadm, Transceiver | from gnpy.core.elements import Roadm, Transceiver | ||||||
| from gnpy.core.exceptions import ServiceError, SpectrumError | from gnpy.core.exceptions import ServiceError, SpectrumError | ||||||
| from gnpy.topology.request import compute_spectrum_slot_vs_bandwidth | from gnpy.topology.request import compute_spectrum_slot_vs_bandwidth | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| matplotlib>=3.3.3,<4 | matplotlib>=3.5.1,<4 | ||||||
| networkx>=2.5,<3 | networkx>=2.6,<3 | ||||||
| numpy>=1.19.4,<2 | numpy>=1.22.0,<2 | ||||||
| pandas>=1.1.5,<2 | pandas>=1.3.5,<2 | ||||||
| pbr>=5.5.1,<6 | pbr>=5.7.0,<6 | ||||||
| scipy>=1.5.4,<2 | scipy>=1.7.3,<2 | ||||||
| xlrd>=1.2.0,<2 | xlrd>=1.2.0,<2 | ||||||
|   | |||||||
| @@ -21,6 +21,7 @@ classifier = | |||||||
|     Programming Language :: Python :: 3 :: Only |     Programming Language :: Python :: 3 :: Only | ||||||
|     Programming Language :: Python :: 3.8 |     Programming Language :: Python :: 3.8 | ||||||
|     Programming Language :: Python :: 3.9 |     Programming Language :: Python :: 3.9 | ||||||
|  |     Programming Language :: Python :: 3.10 | ||||||
|     Programming Language :: Python :: Implementation :: CPython |     Programming Language :: Python :: Implementation :: CPython | ||||||
|     Topic :: Scientific/Engineering |     Topic :: Scientific/Engineering | ||||||
|     Topic :: Scientific/Engineering :: Physics |     Topic :: Scientific/Engineering :: Physics | ||||||
| @@ -39,9 +40,6 @@ warnerrors = True | |||||||
|  |  | ||||||
| [files] | [files] | ||||||
| packages = gnpy | packages = gnpy | ||||||
| data_files = |  | ||||||
| 	examples = examples/* |  | ||||||
| # FIXME: solve example data files |  | ||||||
|  |  | ||||||
| [options.entry_points] | [options.entry_points] | ||||||
| console_scripts = | console_scripts = | ||||||
|   | |||||||
							
								
								
									
										135
									
								
								tests/compare.py
									
									
									
									
									
								
							
							
						
						
									
										135
									
								
								tests/compare.py
									
									
									
									
									
								
							| @@ -1,135 +0,0 @@ | |||||||
| #!/usr/bin/env python3 |  | ||||||
| from json import dump |  | ||||||
| from pathlib import Path |  | ||||||
| from argparse import ArgumentParser |  | ||||||
| from collections import namedtuple |  | ||||||
| from gnpy.tools.json_io import load_json |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class Results(namedtuple('Results', 'missing extra different expected actual')): |  | ||||||
|     def _asdict(self): |  | ||||||
|         return {'missing': self.missing, |  | ||||||
|                 'extra': self.extra, |  | ||||||
|                 'different': self.different} |  | ||||||
|  |  | ||||||
|     def __str__(self): |  | ||||||
|         rv = [] |  | ||||||
|         if self.missing: |  | ||||||
|             rv.append('Missing: {len(self.missing)}/{len(self.expected)}') |  | ||||||
|             rv.extend(f'\t{x}' for x in sorted(self.missing)) |  | ||||||
|         if self.extra: |  | ||||||
|             rv.append('Extra: {len(self.extra)}/{len(self.expected)}') |  | ||||||
|             rv.extend(f'\t{x}' for x in sorted(self.extra)) |  | ||||||
|         if self.different: |  | ||||||
|             rv.append('Different: {len(self.different)}/{len(self.expected)}') |  | ||||||
|             rv.extend(f'\tExpected: {x}\n\tActual:   {y}' for x, y in self.different) |  | ||||||
|         if not self.missing and not self.extra and not self.different: |  | ||||||
|             rv.append('All match!') |  | ||||||
|         return '\n'.join(rv) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class NetworksResults(namedtuple('NetworksResult', 'elements connections')): |  | ||||||
|     def _asdict(self): |  | ||||||
|         return {'elements': self.elements._asdict(), |  | ||||||
|                 'connections': self.connections._asdict()} |  | ||||||
|  |  | ||||||
|     def __str__(self): |  | ||||||
|         return '\n'.join([ |  | ||||||
|             'Elements'.center(40, '='), |  | ||||||
|             str(self.elements), |  | ||||||
|             'Connections'.center(40, '='), |  | ||||||
|             str(self.connections), |  | ||||||
|         ]) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class ServicesResults(namedtuple('ServicesResult', 'requests synchronizations')): |  | ||||||
|     def _asdict(self): |  | ||||||
|         return {'requests': self.requests.asdict(), |  | ||||||
|                 'synchronizations': self.synchronizations.asdict()} |  | ||||||
|  |  | ||||||
|     def __str__(self): |  | ||||||
|         return '\n'.join([ |  | ||||||
|             'Requests'.center(40, '='), |  | ||||||
|             str(self.requests), |  | ||||||
|             'Synchronizations'.center(40, '='), |  | ||||||
|             str(self.synchronizations), |  | ||||||
|         ]) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class PathsResults(namedtuple('PathsResults', 'paths')): |  | ||||||
|     def _asdict(self): |  | ||||||
|         return {'paths': self.paths.asdict()} |  | ||||||
|  |  | ||||||
|     def __str__(self): |  | ||||||
|         return '\n'.join([ |  | ||||||
|             'Paths'.center(40, '='), |  | ||||||
|             str(self.paths), |  | ||||||
|         ]) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def compare(expected, actual, key=lambda x: x): |  | ||||||
|     expected = {key(el): el for el in expected} |  | ||||||
|     actual = {key(el): el for el in actual} |  | ||||||
|     missing = set(expected) - set(actual) |  | ||||||
|     extra = set(actual) - set(expected) |  | ||||||
|     different = [(expected[x], actual[x]) for |  | ||||||
|                  x in set(expected) & set(actual) |  | ||||||
|                  if expected[x] != actual[x]] |  | ||||||
|     return Results(missing, extra, different, expected, actual) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def compare_networks(expected, actual): |  | ||||||
|     elements = compare(expected['elements'], actual['elements'], |  | ||||||
|                        key=lambda el: el['uid']) |  | ||||||
|     connections = compare(expected['connections'], actual['connections'], |  | ||||||
|                           key=lambda el: (el['from_node'], el['to_node'])) |  | ||||||
|     return NetworksResults(elements, connections) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def compare_services(expected, actual): |  | ||||||
|     requests = compare(expected['path-request'], actual['path-request'], |  | ||||||
|                        key=lambda el: el['request-id']) |  | ||||||
|     synchronizations = compare(expected['path-request'], expected['path-request'], |  | ||||||
|                                key=lambda el: el['request-id']) |  | ||||||
|     if 'synchronization' in expected.keys(): |  | ||||||
|         synchronizations = compare(expected['synchronization'], actual['synchronization'], |  | ||||||
|                                    key=lambda el: el['synchronization-id']) |  | ||||||
|     return ServicesResults(requests, synchronizations) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def compare_paths(expected_output, actual_output): |  | ||||||
|     paths = compare(expected['path'], actual['path'], key=lambda el: el['path-id']) |  | ||||||
|     return PathsResults(paths) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| COMPARISONS = { |  | ||||||
|     'networks': compare_networks, |  | ||||||
|     'services': compare_services, |  | ||||||
|     'paths': compare_paths, |  | ||||||
| } |  | ||||||
|  |  | ||||||
| parser = ArgumentParser() |  | ||||||
| parser.add_argument('expected_output', type=Path, metavar='FILE') |  | ||||||
| parser.add_argument('actual_output', type=Path, metavar='FILE') |  | ||||||
| parser.add_argument('-o', '--output', default=None) |  | ||||||
| parser.add_argument('-c', '--comparison', choices=COMPARISONS, default='networks') |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def encode_sets(obj): |  | ||||||
|     if isinstance(obj, set): |  | ||||||
|         return list(obj) |  | ||||||
|     raise TypeError(f'{obj!r} is not JSON serializable!') |  | ||||||
|  |  | ||||||
|  |  | ||||||
| if __name__ == '__main__': |  | ||||||
|     args = parser.parse_args() |  | ||||||
|     expected = load_json(args.expected_output) |  | ||||||
|     actual = load_json(args.actual_output) |  | ||||||
|  |  | ||||||
|     result = COMPARISONS[args.comparison](expected, actual) |  | ||||||
|  |  | ||||||
|     if args.output: |  | ||||||
|         with open(args.output, 'w', encoding='utf-8') as f: |  | ||||||
|             dump(result, f, default=encode_sets, indent=2, ensure_ascii=False) |  | ||||||
|     else: |  | ||||||
|         print(str(result)) |  | ||||||
							
								
								
									
										13
									
								
								tests/conftest.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								tests/conftest.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | # SPDX-License-Identifier: BSD-3-Clause | ||||||
|  | # | ||||||
|  | # Copyright (C) 2020 Telecom Infra Project and GNPy contributors | ||||||
|  | # see LICENSE.md for a list of contributors | ||||||
|  | # | ||||||
|  |  | ||||||
|  | import pytest | ||||||
|  | from gnpy.core.parameters import SimParams, NLIParams, RamanParams | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @pytest.fixture | ||||||
|  | def set_sim_params(monkeypatch): | ||||||
|  |     monkeypatch.setattr(SimParams, '_shared_dict', {'nli_params': NLIParams(), 'raman_params': RamanParams()}) | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -196,101 +196,101 @@ | |||||||
|         0.0 |         0.0 | ||||||
|     ], |     ], | ||||||
|     "dgt": [ |     "dgt": [ | ||||||
|         2.714526681131686, |         1.0, | ||||||
|         2.705443819238505, |  | ||||||
|         2.6947834587664494, |  | ||||||
|         2.6841217449620203, |  | ||||||
|         2.6681935771243177, |  | ||||||
|         2.6521732021128046, |  | ||||||
|         2.630396440815385, |  | ||||||
|         2.602860350286428, |  | ||||||
|         2.5696460593920065, |  | ||||||
|         2.5364027376452056, |  | ||||||
|         2.499446286796604, |  | ||||||
|         2.4587748041127506, |  | ||||||
|         2.414398437185221, |  | ||||||
|         2.3699990328716107, |  | ||||||
|         2.322373696229342, |  | ||||||
|         2.271520771371253, |  | ||||||
|         2.2174389328192197, |  | ||||||
|         2.16337565384239, |  | ||||||
|         2.1183028432496016, |  | ||||||
|         2.082225099873648, |  | ||||||
|         2.055100772005235, |  | ||||||
|         2.0279625371819305, |  | ||||||
|         2.0008103857988204, |  | ||||||
|         1.9736443063300082, |  | ||||||
|         1.9482128147680253, |  | ||||||
|         1.9245345552113182, |  | ||||||
|         1.9026104247588487, |  | ||||||
|         1.8806927939516411, |  | ||||||
|         1.862235672444246, |  | ||||||
|         1.847275503201129, |  | ||||||
|         1.835814081380705, |  | ||||||
|         1.824381436842932, |  | ||||||
|         1.8139629377087627, |  | ||||||
|         1.8045606557581335, |  | ||||||
|         1.7961751115773796, |  | ||||||
|         1.7877868031023945, |  | ||||||
|         1.7793941781790852, |  | ||||||
|         1.7709972329654864, |  | ||||||
|         1.7625959636196327, |  | ||||||
|         1.7541903672600494, |  | ||||||
|         1.7459181197626403, |  | ||||||
|         1.737780757913635, |  | ||||||
|         1.7297783508684146, |  | ||||||
|         1.7217732861435076, |  | ||||||
|         1.7137640932265894, |  | ||||||
|         1.7057507692361864, |  | ||||||
|         1.6918150918099673, |  | ||||||
|         1.6719047669939942, |  | ||||||
|         1.6460167077689267, |  | ||||||
|         1.6201194134191075, |  | ||||||
|         1.5986915141218316, |  | ||||||
|         1.5817353179379183, |  | ||||||
|         1.569199764184379, |  | ||||||
|         1.5566577309558969, |  | ||||||
|         1.545374152761467, |  | ||||||
|         1.5353620432989845, |  | ||||||
|         1.5266220576235803, |  | ||||||
|         1.5178910621476225, |  | ||||||
|         1.5097346239790443, |  | ||||||
|         1.502153039909686, |  | ||||||
|         1.495145456062699, |  | ||||||
|         1.488134243479226, |  | ||||||
|         1.48111939735681, |  | ||||||
|         1.474100442252211, |  | ||||||
|         1.4670307626366115, |  | ||||||
|         1.4599103316162523, |  | ||||||
|         1.45273959485914, |  | ||||||
|         1.445565137158368, |  | ||||||
|         1.4340878115214444, |  | ||||||
|         1.418273806730323, |  | ||||||
|         1.3981208704326855, |  | ||||||
|         1.3779439775587023, |  | ||||||
|         1.3598972673004606, |  | ||||||
|         1.3439818461440451, |  | ||||||
|         1.3301807335621048, |  | ||||||
|         1.316383926863083, |  | ||||||
|         1.3040618749785347, |  | ||||||
|         1.2932153453410835, |  | ||||||
|         1.2838336236692311, |  | ||||||
|         1.2744470198196236, |  | ||||||
|         1.2650555289898042, |  | ||||||
|         1.2556591482982988, |  | ||||||
|         1.2428104897182262, |  | ||||||
|         1.2264996957264114, |  | ||||||
|         1.2067249615595257, |  | ||||||
|         1.1869318618366975, |  | ||||||
|         1.1672278304018044, |  | ||||||
|         1.1476135933863398, |  | ||||||
|         1.1280891949729075, |  | ||||||
|         1.108555289615659, |  | ||||||
|         1.0895983485572227, |  | ||||||
|         1.0712204022764056, |  | ||||||
|         1.0534217504465226, |  | ||||||
|         1.0356155337864215, |  | ||||||
|         1.017807767853702, |         1.017807767853702, | ||||||
|         1.0 |         1.0356155337864215, | ||||||
|  |         1.0534217504465226, | ||||||
|  |         1.0712204022764056, | ||||||
|  |         1.0895983485572227, | ||||||
|  |         1.108555289615659, | ||||||
|  |         1.1280891949729075, | ||||||
|  |         1.1476135933863398, | ||||||
|  |         1.1672278304018044, | ||||||
|  |         1.1869318618366975, | ||||||
|  |         1.2067249615595257, | ||||||
|  |         1.2264996957264114, | ||||||
|  |         1.2428104897182262, | ||||||
|  |         1.2556591482982988, | ||||||
|  |         1.2650555289898042, | ||||||
|  |         1.2744470198196236, | ||||||
|  |         1.2838336236692311, | ||||||
|  |         1.2932153453410835, | ||||||
|  |         1.3040618749785347, | ||||||
|  |         1.316383926863083, | ||||||
|  |         1.3301807335621048, | ||||||
|  |         1.3439818461440451, | ||||||
|  |         1.3598972673004606, | ||||||
|  |         1.3779439775587023, | ||||||
|  |         1.3981208704326855, | ||||||
|  |         1.418273806730323, | ||||||
|  |         1.4340878115214444, | ||||||
|  |         1.445565137158368, | ||||||
|  |         1.45273959485914, | ||||||
|  |         1.4599103316162523, | ||||||
|  |         1.4670307626366115, | ||||||
|  |         1.474100442252211, | ||||||
|  |         1.48111939735681, | ||||||
|  |         1.488134243479226, | ||||||
|  |         1.495145456062699, | ||||||
|  |         1.502153039909686, | ||||||
|  |         1.5097346239790443, | ||||||
|  |         1.5178910621476225, | ||||||
|  |         1.5266220576235803, | ||||||
|  |         1.5353620432989845, | ||||||
|  |         1.545374152761467, | ||||||
|  |         1.5566577309558969, | ||||||
|  |         1.569199764184379, | ||||||
|  |         1.5817353179379183, | ||||||
|  |         1.5986915141218316, | ||||||
|  |         1.6201194134191075, | ||||||
|  |         1.6460167077689267, | ||||||
|  |         1.6719047669939942, | ||||||
|  |         1.6918150918099673, | ||||||
|  |         1.7057507692361864, | ||||||
|  |         1.7137640932265894, | ||||||
|  |         1.7217732861435076, | ||||||
|  |         1.7297783508684146, | ||||||
|  |         1.737780757913635, | ||||||
|  |         1.7459181197626403, | ||||||
|  |         1.7541903672600494, | ||||||
|  |         1.7625959636196327, | ||||||
|  |         1.7709972329654864, | ||||||
|  |         1.7793941781790852, | ||||||
|  |         1.7877868031023945, | ||||||
|  |         1.7961751115773796, | ||||||
|  |         1.8045606557581335, | ||||||
|  |         1.8139629377087627, | ||||||
|  |         1.824381436842932, | ||||||
|  |         1.835814081380705, | ||||||
|  |         1.847275503201129, | ||||||
|  |         1.862235672444246, | ||||||
|  |         1.8806927939516411, | ||||||
|  |         1.9026104247588487, | ||||||
|  |         1.9245345552113182, | ||||||
|  |         1.9482128147680253, | ||||||
|  |         1.9736443063300082, | ||||||
|  |         2.0008103857988204, | ||||||
|  |         2.0279625371819305, | ||||||
|  |         2.055100772005235, | ||||||
|  |         2.082225099873648, | ||||||
|  |         2.1183028432496016, | ||||||
|  |         2.16337565384239, | ||||||
|  |         2.2174389328192197, | ||||||
|  |         2.271520771371253, | ||||||
|  |         2.322373696229342, | ||||||
|  |         2.3699990328716107, | ||||||
|  |         2.414398437185221, | ||||||
|  |         2.4587748041127506, | ||||||
|  |         2.499446286796604, | ||||||
|  |         2.5364027376452056, | ||||||
|  |         2.5696460593920065, | ||||||
|  |         2.602860350286428, | ||||||
|  |         2.630396440815385, | ||||||
|  |         2.6521732021128046, | ||||||
|  |         2.6681935771243177, | ||||||
|  |         2.6841217449620203, | ||||||
|  |         2.6947834587664494, | ||||||
|  |         2.705443819238505, | ||||||
|  |         2.714526681131686 | ||||||
|     ] |     ] | ||||||
| } | } | ||||||
|   | |||||||
| @@ -63,7 +63,7 @@ | |||||||
|       "Fiber":[{ |       "Fiber":[{ | ||||||
|             "type_variety": "SSMF", |             "type_variety": "SSMF", | ||||||
|             "dispersion": 1.67e-05, |             "dispersion": 1.67e-05, | ||||||
|             "gamma": 0.00127, |             "effective_area": 83e-12, | ||||||
|             "pmd_coef": 1.265e-15 |             "pmd_coef": 1.265e-15 | ||||||
|             } |             } | ||||||
|       ], |       ], | ||||||
| @@ -85,6 +85,7 @@ | |||||||
|             "target_pch_out_db": -20, |             "target_pch_out_db": -20, | ||||||
|             "add_drop_osnr": 38, |             "add_drop_osnr": 38, | ||||||
|             "pmd": 0, |             "pmd": 0, | ||||||
|  |             "pdl": 0, | ||||||
|             "restrictions": { |             "restrictions": { | ||||||
|                             "preamp_variety_list":[], |                             "preamp_variety_list":[], | ||||||
|                             "booster_variety_list":[] |                             "booster_variety_list":[] | ||||||
|   | |||||||
| @@ -1,224 +0,0 @@ | |||||||
| { |  | ||||||
|   "uid": "Span1", |  | ||||||
|   "params": { |  | ||||||
|     "length": 80, |  | ||||||
|     "loss_coef": 0.2, |  | ||||||
|     "length_units": "km", |  | ||||||
|     "att_in": 0, |  | ||||||
|     "con_in": 0.5, |  | ||||||
|     "con_out": 0.5, |  | ||||||
|     "type_variety": "SSMF", |  | ||||||
|     "dispersion": 0.0000167, |  | ||||||
|     "gamma": 0.00127, |  | ||||||
|     "pmd_coef": 1.265e-15, |  | ||||||
|     "raman_efficiency": { |  | ||||||
|       "cr": [ |  | ||||||
|         0, |  | ||||||
|         0.0000094, |  | ||||||
|         0.0000292, |  | ||||||
|         0.0000488, |  | ||||||
|         0.0000682, |  | ||||||
|         0.0000831, |  | ||||||
|         0.000094, |  | ||||||
|         0.0001014, |  | ||||||
|         0.0001069, |  | ||||||
|         0.0001119, |  | ||||||
|         0.0001217, |  | ||||||
|         0.0001268, |  | ||||||
|         0.0001365, |  | ||||||
|         0.000149, |  | ||||||
|         0.000165, |  | ||||||
|         0.000181, |  | ||||||
|         0.0001977, |  | ||||||
|         0.0002192, |  | ||||||
|         0.0002469, |  | ||||||
|         0.0002749, |  | ||||||
|         0.0002999, |  | ||||||
|         0.0003206, |  | ||||||
|         0.0003405, |  | ||||||
|         0.0003592, |  | ||||||
|         0.000374, |  | ||||||
|         0.0003826, |  | ||||||
|         0.0003841, |  | ||||||
|         0.0003826, |  | ||||||
|         0.0003802, |  | ||||||
|         0.0003756, |  | ||||||
|         0.0003549, |  | ||||||
|         0.0003795, |  | ||||||
|         0.000344, |  | ||||||
|         0.0002933, |  | ||||||
|         0.0002024, |  | ||||||
|         0.0001158, |  | ||||||
|         0.0000846, |  | ||||||
|         0.0000714, |  | ||||||
|         0.0000686, |  | ||||||
|         0.000085, |  | ||||||
|         0.0000893, |  | ||||||
|         0.0000901, |  | ||||||
|         0.0000815, |  | ||||||
|         0.0000667, |  | ||||||
|         0.0000437, |  | ||||||
|         0.0000328, |  | ||||||
|         0.0000296, |  | ||||||
|         0.0000265, |  | ||||||
|         0.0000257, |  | ||||||
|         0.0000281, |  | ||||||
|         0.0000308, |  | ||||||
|         0.0000367, |  | ||||||
|         0.0000585, |  | ||||||
|         0.0000663, |  | ||||||
|         0.0000636, |  | ||||||
|         0.000055, |  | ||||||
|         0.0000406, |  | ||||||
|         0.0000277, |  | ||||||
|         0.0000242, |  | ||||||
|         0.0000187, |  | ||||||
|         0.000016, |  | ||||||
|         0.000014, |  | ||||||
|         0.0000113, |  | ||||||
|         0.0000105, |  | ||||||
|         0.0000098, |  | ||||||
|         0.0000098, |  | ||||||
|         0.0000113, |  | ||||||
|         0.0000164, |  | ||||||
|         0.0000195, |  | ||||||
|         0.0000238, |  | ||||||
|         0.0000226, |  | ||||||
|         0.0000203, |  | ||||||
|         0.0000148, |  | ||||||
|         0.0000109, |  | ||||||
|         0.0000098, |  | ||||||
|         0.0000105, |  | ||||||
|         0.0000117, |  | ||||||
|         0.0000125, |  | ||||||
|         0.0000121, |  | ||||||
|         0.0000109, |  | ||||||
|         0.0000098, |  | ||||||
|         0.0000082, |  | ||||||
|         0.0000066, |  | ||||||
|         0.0000047, |  | ||||||
|         0.0000027, |  | ||||||
|         0.0000019, |  | ||||||
|         0.0000012, |  | ||||||
|         4e-7, |  | ||||||
|         2e-7, |  | ||||||
|         1e-7 |  | ||||||
|       ], |  | ||||||
|       "frequency_offset": [ |  | ||||||
|         0, |  | ||||||
|         500000000000, |  | ||||||
|         1000000000000, |  | ||||||
|         1500000000000, |  | ||||||
|         2000000000000, |  | ||||||
|         2500000000000, |  | ||||||
|         3000000000000, |  | ||||||
|         3500000000000, |  | ||||||
|         4000000000000, |  | ||||||
|         4500000000000, |  | ||||||
|         5000000000000, |  | ||||||
|         5500000000000, |  | ||||||
|         6000000000000, |  | ||||||
|         6500000000000, |  | ||||||
|         7000000000000, |  | ||||||
|         7500000000000, |  | ||||||
|         8000000000000, |  | ||||||
|         8500000000000, |  | ||||||
|         9000000000000, |  | ||||||
|         9500000000000, |  | ||||||
|         10000000000000, |  | ||||||
|         10500000000000, |  | ||||||
|         11000000000000, |  | ||||||
|         11500000000000, |  | ||||||
|         12000000000000, |  | ||||||
|         12500000000000, |  | ||||||
|         12750000000000, |  | ||||||
|         13000000000000, |  | ||||||
|         13250000000000, |  | ||||||
|         13500000000000, |  | ||||||
|         14000000000000, |  | ||||||
|         14500000000000, |  | ||||||
|         14750000000000, |  | ||||||
|         15000000000000, |  | ||||||
|         15500000000000, |  | ||||||
|         16000000000000, |  | ||||||
|         16500000000000, |  | ||||||
|         17000000000000, |  | ||||||
|         17500000000000, |  | ||||||
|         18000000000000, |  | ||||||
|         18250000000000, |  | ||||||
|         18500000000000, |  | ||||||
|         18750000000000, |  | ||||||
|         19000000000000, |  | ||||||
|         19500000000000, |  | ||||||
|         20000000000000, |  | ||||||
|         20500000000000, |  | ||||||
|         21000000000000, |  | ||||||
|         21500000000000, |  | ||||||
|         22000000000000, |  | ||||||
|         22500000000000, |  | ||||||
|         23000000000000, |  | ||||||
|         23500000000000, |  | ||||||
|         24000000000000, |  | ||||||
|         24500000000000, |  | ||||||
|         25000000000000, |  | ||||||
|         25500000000000, |  | ||||||
|         26000000000000, |  | ||||||
|         26500000000000, |  | ||||||
|         27000000000000, |  | ||||||
|         27500000000000, |  | ||||||
|         28000000000000, |  | ||||||
|         28500000000000, |  | ||||||
|         29000000000000, |  | ||||||
|         29500000000000, |  | ||||||
|         30000000000000, |  | ||||||
|         30500000000000, |  | ||||||
|         31000000000000, |  | ||||||
|         31500000000000, |  | ||||||
|         32000000000000, |  | ||||||
|         32500000000000, |  | ||||||
|         33000000000000, |  | ||||||
|         33500000000000, |  | ||||||
|         34000000000000, |  | ||||||
|         34500000000000, |  | ||||||
|         35000000000000, |  | ||||||
|         35500000000000, |  | ||||||
|         36000000000000, |  | ||||||
|         36500000000000, |  | ||||||
|         37000000000000, |  | ||||||
|         37500000000000, |  | ||||||
|         38000000000000, |  | ||||||
|         38500000000000, |  | ||||||
|         39000000000000, |  | ||||||
|         39500000000000, |  | ||||||
|         40000000000000, |  | ||||||
|         40500000000000, |  | ||||||
|         41000000000000, |  | ||||||
|         41500000000000, |  | ||||||
|         42000000000000 |  | ||||||
|       ] |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   "operational": { |  | ||||||
|     "temperature": 283, |  | ||||||
|     "raman_pumps": [ |  | ||||||
|       { |  | ||||||
|         "power": 0.2, |  | ||||||
|         "frequency": 205000000000000, |  | ||||||
|         "propagation_direction": "counterprop" |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         "power": 0.206, |  | ||||||
|         "frequency": 201000000000000, |  | ||||||
|         "propagation_direction": "counterprop" |  | ||||||
|       } |  | ||||||
|     ] |  | ||||||
|   }, |  | ||||||
|   "metadata": { |  | ||||||
|     "location": { |  | ||||||
|       "latitude": 1, |  | ||||||
|       "longitude": 0, |  | ||||||
|       "city": null, |  | ||||||
|       "region": "" |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @@ -1,14 +1,13 @@ | |||||||
| { | { | ||||||
|   "raman_parameters": { |   "raman_params": { | ||||||
|     "flag_raman": true, |     "flag": true, | ||||||
|     "space_resolution": 10e3, |     "result_spatial_resolution": 10e3, | ||||||
|     "tolerance": 1e-8 |     "solver_spatial_resolution": 50 | ||||||
|   }, |   }, | ||||||
|   "nli_parameters": { |   "nli_params": { | ||||||
|     "nli_method_name": "ggn_spectrally_separated", |     "method": "ggn_spectrally_separated", | ||||||
|     "wdm_grid_size": 50e9, |  | ||||||
|     "dispersion_tolerance": 1, |     "dispersion_tolerance": 1, | ||||||
|     "phase_shift_tolerance": 0.1, |     "phase_shift_tolerance": 0.1, | ||||||
|     "computed_channels": [1, 18, 37, 56, 75] |     "computed_channels": [1, 18, 37, 56, 75] | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @@ -1258,7 +1258,7 @@ | |||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             "metric-type": "SNR-0.1nm", |             "metric-type": "SNR-0.1nm", | ||||||
|             "accumulative-value": 28.77 |             "accumulative-value": 28.78 | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             "metric-type": "OSNR-bandwidth", |             "metric-type": "OSNR-bandwidth", | ||||||
|   | |||||||
| @@ -3,5 +3,5 @@ response-id,source,destination,path_bandwidth,Pass?,nb of tsp pairs,total cost,t | |||||||
| 1,trx Brest_KLA,trx Vannes_KBE,10.0,True,1,1,Voyager,mode 1,22.65,22.11,18.03,32.0,1.0,trx Brest_KLA | roadm Brest_KLA | east edfa in Brest_KLA to Morlaix | fiber (Brest_KLA → Morlaix)-F060 | east fused spans in Morlaix | fiber (Morlaix → Lannion_CAS)-F059 | west edfa in Lannion_CAS to Morlaix | roadm Lannion_CAS | east edfa in Lannion_CAS to Corlay | fiber (Lannion_CAS → Corlay)-F061 | west fused spans in Corlay | fiber (Corlay → Loudeac)-F010 | west fused spans in Loudeac | fiber (Loudeac → Lorient_KMA)-F054 | west edfa in Lorient_KMA to Loudeac | roadm Lorient_KMA | east edfa in Lorient_KMA to Vannes_KBE | fiber (Lorient_KMA → Vannes_KBE)-F055 | west edfa in Vannes_KBE to Lorient_KMA | roadm Vannes_KBE | trx Vannes_KBE,"-276, 4",,, | 1,trx Brest_KLA,trx Vannes_KBE,10.0,True,1,1,Voyager,mode 1,22.65,22.11,18.03,32.0,1.0,trx Brest_KLA | roadm Brest_KLA | east edfa in Brest_KLA to Morlaix | fiber (Brest_KLA → Morlaix)-F060 | east fused spans in Morlaix | fiber (Morlaix → Lannion_CAS)-F059 | west edfa in Lannion_CAS to Morlaix | roadm Lannion_CAS | east edfa in Lannion_CAS to Corlay | fiber (Lannion_CAS → Corlay)-F061 | west fused spans in Corlay | fiber (Corlay → Loudeac)-F010 | west fused spans in Loudeac | fiber (Loudeac → Lorient_KMA)-F054 | west edfa in Lorient_KMA to Loudeac | roadm Lorient_KMA | east edfa in Lorient_KMA to Vannes_KBE | fiber (Lorient_KMA → Vannes_KBE)-F055 | west edfa in Vannes_KBE to Lorient_KMA | roadm Vannes_KBE | trx Vannes_KBE,"-276, 4",,, | ||||||
| 3,trx Lannion_CAS,trx Rennes_STA,60.0,True,1,1,vendorA_trx-type1,mode 1,28.29,25.85,21.77,32.0,1.0,trx Lannion_CAS | roadm Lannion_CAS | east edfa in Lannion_CAS to Stbrieuc | fiber (Lannion_CAS → Stbrieuc)-F056 | east edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Rennes_STA)-F057 | west edfa in Rennes_STA to Stbrieuc | roadm Rennes_STA | trx Rennes_STA,"-284, 4",,, | 3,trx Lannion_CAS,trx Rennes_STA,60.0,True,1,1,vendorA_trx-type1,mode 1,28.29,25.85,21.77,32.0,1.0,trx Lannion_CAS | roadm Lannion_CAS | east edfa in Lannion_CAS to Stbrieuc | fiber (Lannion_CAS → Stbrieuc)-F056 | east edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Rennes_STA)-F057 | west edfa in Rennes_STA to Stbrieuc | roadm Rennes_STA | trx Rennes_STA,"-284, 4",,, | ||||||
| 4,trx Rennes_STA,trx Lannion_CAS,150.0,True,1,1,vendorA_trx-type1,mode 2,22.27,22.15,15.05,64.0,0.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Ploermel | fiber (Rennes_STA → Ploermel)- | east edfa in Ploermel to Vannes_KBE | fiber (Ploermel → Vannes_KBE)- | west edfa in Vannes_KBE to Ploermel | roadm Vannes_KBE | east edfa in Vannes_KBE to Lorient_KMA | fiber (Vannes_KBE → Lorient_KMA)-F055 | west edfa in Lorient_KMA to Vannes_KBE | roadm Lorient_KMA | east edfa in Lorient_KMA to Loudeac | fiber (Lorient_KMA → Loudeac)-F054 | east fused spans in Loudeac | fiber (Loudeac → Corlay)-F010 | east fused spans in Corlay | fiber (Corlay → Lannion_CAS)-F061 | west edfa in Lannion_CAS to Corlay | roadm Lannion_CAS | trx Lannion_CAS,"-266, 6",,, | 4,trx Rennes_STA,trx Lannion_CAS,150.0,True,1,1,vendorA_trx-type1,mode 2,22.27,22.15,15.05,64.0,0.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Ploermel | fiber (Rennes_STA → Ploermel)- | east edfa in Ploermel to Vannes_KBE | fiber (Ploermel → Vannes_KBE)- | west edfa in Vannes_KBE to Ploermel | roadm Vannes_KBE | east edfa in Vannes_KBE to Lorient_KMA | fiber (Vannes_KBE → Lorient_KMA)-F055 | west edfa in Lorient_KMA to Vannes_KBE | roadm Lorient_KMA | east edfa in Lorient_KMA to Loudeac | fiber (Lorient_KMA → Loudeac)-F054 | east fused spans in Loudeac | fiber (Loudeac → Corlay)-F010 | east fused spans in Corlay | fiber (Corlay → Lannion_CAS)-F061 | west edfa in Lannion_CAS to Corlay | roadm Lannion_CAS | trx Lannion_CAS,"-266, 6",,, | ||||||
| 5,trx Rennes_STA,trx Lannion_CAS,20.0,True,1,1,vendorA_trx-type1,mode 2,30.79,28.77,21.68,64.0,3.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Stbrieuc | fiber (Rennes_STA → Stbrieuc)-F057 | west edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Lannion_CAS)-F056 | west edfa in Lannion_CAS to Stbrieuc | roadm Lannion_CAS | trx Lannion_CAS,"-274, 6",,, | 5,trx Rennes_STA,trx Lannion_CAS,20.0,True,1,1,vendorA_trx-type1,mode 2,30.79,28.78,21.68,64.0,3.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Stbrieuc | fiber (Rennes_STA → Stbrieuc)-F057 | west edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Lannion_CAS)-F056 | west edfa in Lannion_CAS to Stbrieuc | roadm Lannion_CAS | trx Lannion_CAS,"-274, 6",,, | ||||||
| 6,,,,NO_PATH,,,,,,,,,,,,,, | 6,,,,NO_PATH,,,,,,,,,,,,,, | ||||||
|   | |||||||
| 
 | 
							
								
								
									
										97
									
								
								tests/data/test_fiber_fix_expected_results.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								tests/data/test_fiber_fix_expected_results.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,97 @@ | |||||||
|  | signal,nli | ||||||
|  | 1.9952623149688793e-05,1.1158426495504604e-08 | ||||||
|  | 1.9952623149688793e-05,1.263949624403159e-08 | ||||||
|  | 1.9952623149688793e-05,1.3358478621325285e-08 | ||||||
|  | 1.9952623149688793e-05,1.3830775406251184e-08 | ||||||
|  | 1.9952623149688793e-05,1.4180462471172083e-08 | ||||||
|  | 1.9952623149688793e-05,1.4456701012984246e-08 | ||||||
|  | 1.9952623149688793e-05,1.4683973899785875e-08 | ||||||
|  | 1.9952623149688793e-05,1.487624147046227e-08 | ||||||
|  | 1.9952623149688793e-05,1.5042217041806274e-08 | ||||||
|  | 1.9952623149688793e-05,1.5187703614492153e-08 | ||||||
|  | 1.9952623149688793e-05,1.5316759790785317e-08 | ||||||
|  | 1.9952623149688793e-05,1.543233485150211e-08 | ||||||
|  | 1.9952623149688793e-05,1.553663885878994e-08 | ||||||
|  | 1.9952623149688793e-05,1.5631370249579246e-08 | ||||||
|  | 1.9952623149688793e-05,1.5717862065800704e-08 | ||||||
|  | 1.9952623149688793e-05,1.57971793985894e-08 | ||||||
|  | 1.9952623149688793e-05,1.5870186356579704e-08 | ||||||
|  | 1.9952623149688793e-05,1.593759332223716e-08 | ||||||
|  | 1.9952623149688793e-05,1.5999991070923486e-08 | ||||||
|  | 1.9952623149688793e-05,1.6057875903450682e-08 | ||||||
|  | 1.9952623149688793e-05,1.6111668489205982e-08 | ||||||
|  | 1.9952623149688793e-05,1.6161728217386366e-08 | ||||||
|  | 1.9952623149688793e-05,1.6208364281630228e-08 | ||||||
|  | 1.9952623149688793e-05,1.6251844350226973e-08 | ||||||
|  | 1.9952623149688793e-05,1.629240142540359e-08 | ||||||
|  | 1.9952623149688793e-05,1.6330239326114482e-08 | ||||||
|  | 1.9952623149688793e-05,1.6365537111728e-08 | ||||||
|  | 1.9952623149688793e-05,1.6398452681655655e-08 | ||||||
|  | 1.9952623149688793e-05,1.642912572715412e-08 | ||||||
|  | 1.9952623149688793e-05,1.6457680168940455e-08 | ||||||
|  | 1.9952623149688793e-05,1.6484226183026747e-08 | ||||||
|  | 1.9952623149688793e-05,1.6508861894003893e-08 | ||||||
|  | 1.9952623149688793e-05,1.6531674797617433e-08 | ||||||
|  | 1.9952623149688793e-05,1.655274296130114e-08 | ||||||
|  | 1.9952623149688793e-05,1.657213604125123e-08 | ||||||
|  | 1.9952623149688793e-05,1.6589916146838222e-08 | ||||||
|  | 1.9952623149688793e-05,1.660613857708963e-08 | ||||||
|  | 1.9952623149688793e-05,1.6620852449214096e-08 | ||||||
|  | 1.9952623149688793e-05,1.6634101235366932e-08 | ||||||
|  | 1.9952623149688793e-05,1.664592322084737e-08 | ||||||
|  | 1.9952623149688793e-05,1.6656351894496074e-08 | ||||||
|  | 1.9952623149688793e-05,1.666541628009631e-08 | ||||||
|  | 1.9952623149688793e-05,1.6673141215973025e-08 | ||||||
|  | 1.9952623149688793e-05,1.6679547588653583e-08 | ||||||
|  | 1.9952623149688793e-05,1.6684652525341145e-08 | ||||||
|  | 1.9952623149688793e-05,1.668846954900963e-08 | ||||||
|  | 1.9952623149688793e-05,1.66910086991187e-08 | ||||||
|  | 1.9952623149688793e-05,1.6692276620238304e-08 | ||||||
|  | 1.9952623149688793e-05,1.6692276620238304e-08 | ||||||
|  | 1.9952623149688793e-05,1.6691008699118703e-08 | ||||||
|  | 1.9952623149688793e-05,1.6688469549009633e-08 | ||||||
|  | 1.9952623149688793e-05,1.6684652525341148e-08 | ||||||
|  | 1.9952623149688793e-05,1.6679547588653586e-08 | ||||||
|  | 1.9952623149688793e-05,1.6673141215973028e-08 | ||||||
|  | 1.9952623149688793e-05,1.666541628009631e-08 | ||||||
|  | 1.9952623149688793e-05,1.6656351894496084e-08 | ||||||
|  | 1.9952623149688793e-05,1.6645923220847374e-08 | ||||||
|  | 1.9952623149688793e-05,1.6634101235366935e-08 | ||||||
|  | 1.9952623149688793e-05,1.66208524492141e-08 | ||||||
|  | 1.9952623149688793e-05,1.6606138577089633e-08 | ||||||
|  | 1.9952623149688793e-05,1.6589916146838225e-08 | ||||||
|  | 1.9952623149688793e-05,1.6572136041251237e-08 | ||||||
|  | 1.9952623149688793e-05,1.6552742961301146e-08 | ||||||
|  | 1.9952623149688793e-05,1.653167479761744e-08 | ||||||
|  | 1.9952623149688793e-05,1.6508861894003893e-08 | ||||||
|  | 1.9952623149688793e-05,1.648422618302675e-08 | ||||||
|  | 1.9952623149688793e-05,1.645768016894046e-08 | ||||||
|  | 1.9952623149688793e-05,1.6429125727154126e-08 | ||||||
|  | 1.9952623149688793e-05,1.6398452681655658e-08 | ||||||
|  | 1.9952623149688793e-05,1.6365537111728004e-08 | ||||||
|  | 1.9952623149688793e-05,1.6330239326114482e-08 | ||||||
|  | 1.9952623149688793e-05,1.6292401425403594e-08 | ||||||
|  | 1.9952623149688793e-05,1.6251844350226973e-08 | ||||||
|  | 1.9952623149688793e-05,1.6208364281630228e-08 | ||||||
|  | 1.9952623149688793e-05,1.616172821738637e-08 | ||||||
|  | 1.9952623149688793e-05,1.6111668489205982e-08 | ||||||
|  | 1.9952623149688793e-05,1.605787590345069e-08 | ||||||
|  | 1.9952623149688793e-05,1.5999991070923493e-08 | ||||||
|  | 1.9952623149688793e-05,1.5937593322237167e-08 | ||||||
|  | 1.9952623149688793e-05,1.5870186356579704e-08 | ||||||
|  | 1.9952623149688793e-05,1.5797179398589402e-08 | ||||||
|  | 1.9952623149688793e-05,1.571786206580071e-08 | ||||||
|  | 1.9952623149688793e-05,1.5631370249579252e-08 | ||||||
|  | 1.9952623149688793e-05,1.5536638858789946e-08 | ||||||
|  | 1.9952623149688793e-05,1.5432334851502114e-08 | ||||||
|  | 1.9952623149688793e-05,1.531675979078532e-08 | ||||||
|  | 1.9952623149688793e-05,1.5187703614492156e-08 | ||||||
|  | 1.9952623149688793e-05,1.5042217041806274e-08 | ||||||
|  | 1.9952623149688793e-05,1.4876241470462273e-08 | ||||||
|  | 1.9952623149688793e-05,1.4683973899785879e-08 | ||||||
|  | 1.9952623149688793e-05,1.4456701012984246e-08 | ||||||
|  | 1.9952623149688793e-05,1.4180462471172086e-08 | ||||||
|  | 1.9952623149688793e-05,1.3830775406251184e-08 | ||||||
|  | 1.9952623149688793e-05,1.3358478621325285e-08 | ||||||
|  | 1.9952623149688793e-05,1.2639496244031593e-08 | ||||||
|  | 1.9952623149688793e-05,1.1158426495504613e-08 | ||||||
| 
 | 
							
								
								
									
										6
									
								
								tests/data/test_fiber_flex_expected_results.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								tests/data/test_fiber_flex_expected_results.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | signal,nli | ||||||
|  | 1.9952623149688793e-05,5.522326183599433e-09 | ||||||
|  | 1.7957360834719913e-05,4.5606601423111315e-09 | ||||||
|  | 2.593841009459543e-05,6.633717697038881e-09 | ||||||
|  | 1.5962098519751036e-05,4.3237017878447286e-09 | ||||||
|  | 2.3943147779626553e-05,8.311382502260195e-09 | ||||||
| 
 | 
							
								
								
									
										96
									
								
								tests/data/test_lumped_losses_fiber_no_pumps.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								tests/data/test_lumped_losses_fiber_no_pumps.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | |||||||
|  | 1.000000000000000021e-03,5.915557166626927424e-04,3.840877221245049653e-04,2.466727384040633977e-04,1.573474629975438242e-04,9.994300566924636483e-05,6.331217828438720550e-05,4.004003600460594289e-05,2.529553013238426405e-05 | ||||||
|  | 1.000000000000000021e-03,5.910087140881509866e-04,3.835259923737136521e-04,2.462279833344210639e-04,1.570298910751132091e-04,9.972770370845923681e-05,6.317035443958771254e-05,3.994817502675088248e-05,2.523663218966317481e-05 | ||||||
|  | 1.000000000000000021e-03,5.904624672772724710e-04,3.829653846278134621e-04,2.457842903404500092e-04,1.567131560243821098e-04,9.951300275831494635e-05,6.302894048828063141e-05,3.985658526347281646e-05,2.517791045472703461e-05 | ||||||
|  | 1.000000000000000021e-03,5.899169734839467818e-04,3.824058950962419133e-04,2.453416557234028707e-04,1.563972548287988369e-04,9.929890059644241613e-05,6.288793488850426760e-05,3.976526568300959219e-05,2.511936425240675192e-05 | ||||||
|  | 1.000000000000000021e-03,5.893722299298780965e-04,3.818475199355363483e-04,2.449000757332959262e-04,1.560821844312877747e-04,9.908539497140619857e-05,6.274733607851797545e-05,3.967421524053715842e-05,2.506099289905929403e-05 | ||||||
|  | 1.000000000000000021e-03,5.888282338048204554e-04,3.812902552499899305e-04,2.444595465697163919e-04,1.557679417349789946e-04,9.887248360327203632e-05,6.260714247720703990e-05,3.958343287844485109e-05,2.500279570274922987e-05 | ||||||
|  | 1.000000000000000021e-03,5.882849822668304897e-04,3.807340970923119234e-04,2.440200643826254091e-04,1.554545236039297650e-04,9.866016418416755746e-05,6.246735248448248958e-05,3.949291752660743311e-05,2.494477196342878550e-05 | ||||||
|  | 1.000000000000000021e-03,5.877403241312353140e-04,3.801768826891299322e-04,2.435799392795756472e-04,1.551407333476893054e-04,9.844762961169771281e-05,6.232743618144160702e-05,3.940232665622856909e-05,2.488670234861411131e-05 | ||||||
|  | 1.000000000000000021e-03,5.871942634186000593e-04,3.796186190022559433e-04,2.431391779090945110e-04,1.548265761463755335e-04,9.823488356157069126e-05,6.218739605181586088e-05,3.931166190013138108e-05,2.482858791458364441e-05 | ||||||
|  | 1.000000000000000021e-03,5.866468041173980141e-04,3.790593129257516128e-04,2.426977868451053722e-04,1.545120571165502460e-04,9.802192966180839372e-05,6.204723454596646772e-05,3.922092486871354988e-05,2.477042970290643410e-05 | ||||||
|  | 1.000000000000000021e-03,5.860979501842715923e-04,3.784989712866057847e-04,2.422557725877665796e-04,1.541971813119806349e-04,9.780877149334107738e-05,6.190695408131255699e-05,3.913011715023943305e-05,2.471222874063606835e-05 | ||||||
|  | 1.000000000000000021e-03,5.855428054911818777e-04,3.779325362214322600e-04,2.418091152720060536e-04,1.538790714407033914e-04,9.759345536126727376e-05,6.176526646718061210e-05,3.903840385562048950e-05,2.465344951928800295e-05 | ||||||
|  | 1.000000000000000021e-03,5.849813875456967485e-04,3.773600382625630725e-04,2.413578451141304101e-04,1.535577517356502032e-04,9.737599881379701964e-05,6.162218372343696363e-05,3.894579295722817337e-05,2.459409722576532997e-05 | ||||||
|  | 1.000000000000000021e-03,5.844137140093277807e-04,3.767815081401627831e-04,2.409019924922280132e-04,1.532332465435331354e-04,9.715641947446165209e-05,6.147771791853056712e-05,3.885229245840823961e-05,2.453417706661341544e-05 | ||||||
|  | 1.000000000000000021e-03,5.838398026969793654e-04,3.761969767804803125e-04,2.404415879440078890e-04,1.529055803229076760e-04,9.693473504062415536e-05,6.133188116843621776e-05,3.875791039276530608e-05,2.447369426754818325e-05 | ||||||
|  | 1.000000000000000021e-03,5.832596715764015120e-04,3.756064753041117783e-04,2.399766621646476654e-04,1.525747776422469490e-04,9.671096328199675835e-05,6.118468563560254894e-05,3.866265482344967213e-05,2.441265407298631344e-05 | ||||||
|  | 1.000000000000000021e-03,5.826733387676383139e-04,3.750100350242446291e-04,2.395072460046293692e-04,1.522408631780071723e-04,9.648512203915507620e-05,6.103614352789890607e-05,3.856653384244465896e-05,2.435106174557538284e-05 | ||||||
|  | 1.000000000000000021e-03,5.820810441807425326e-04,3.744079089136845458e-04,2.390335428197917333e-04,1.519039834472631588e-04,9.625731118926498641e-05,6.088632085792882825e-05,3.846959029618343478e-05,2.428894479270876788e-05 | ||||||
|  | 1.000000000000000021e-03,5.814828054675655030e-04,3.738001274474016776e-04,2.385555825972570808e-04,1.515641624143126585e-04,9.602754804766522702e-05,6.073522946956701240e-05,3.837183203343020677e-05,2.422630831805138899e-05 | ||||||
|  | 1.000000000000000021e-03,5.808786404289665358e-04,3.731867212872194738e-04,2.380733954737781241e-04,1.512214241469207320e-04,9.579584999731260704e-05,6.058288124990010364e-05,3.827326693032387752e-05,2.416315744255338838e-05 | ||||||
|  | 1.000000000000000021e-03,5.802685670142343878e-04,3.725677212800349654e-04,2.375870117335689917e-04,1.508757928143868079e-04,9.556223448729982074e-05,6.042928812817623899e-05,3.817390288966712009e-05,2.409949730398197492e-05 | ||||||
|  | 1.000000000000000021e-03,5.796526968519212725e-04,3.719432545624587992e-04,2.370965379259533010e-04,1.505273470495264228e-04,9.532675589286383365e-05,6.027448635812982831e-05,3.807376356963088358e-05,2.403534314190221437e-05 | ||||||
|  | 1.000000000000000021e-03,5.790310479093865609e-04,3.713133518665244839e-04,2.366020041460938778e-04,1.501761108339581341e-04,9.508943151110322721e-05,6.011848775803337427e-05,3.797285679655886708e-05,2.397070004317041725e-05 | ||||||
|  | 1.000000000000000021e-03,5.784036383121742876e-04,3.706780441238009577e-04,2.361034406501071276e-04,1.498221082613785163e-04,9.485027871279472060e-05,5.996130419345521918e-05,3.787119042685209972e-05,2.390557311366359151e-05 | ||||||
|  | 1.000000000000000021e-03,5.777704863433433301e-04,3.700373624633735868e-04,2.356008778526011383e-04,1.494653635353745394e-04,9.460931494071504256e-05,5.980294757607067669e-05,3.776877234616485572e-05,2.383996747774973522e-05 | ||||||
|  | 1.000000000000000021e-03,5.771316104427772061e-04,3.693913382097967039e-04,2.350943463241932639e-04,1.491059009672212558e-04,9.436655770795449559e-05,5.964342986246977532e-05,3.766561046859827219e-05,2.377388827775711285e-05 | ||||||
|  | 1.000000000000000021e-03,5.764870292064976651e-04,3.687400028810397501e-04,2.345838767890191692e-04,1.487437449736715462e-04,9.412202459622686095e-05,5.948276305296108525e-05,3.756171273589169023e-05,2.370734067344167480e-05 | ||||||
|  | 1.000000000000000021e-03,5.758375946234993610e-04,3.680842155919215072e-04,2.340701414876563216e-04,1.483793719498717782e-04,9.387603703510192111e-05,5.932115823520561543e-05,3.745721560837426419e-05,2.364041205155829344e-05 | ||||||
|  | 1.000000000000000021e-03,5.751833223951592329e-04,3.674240032104748388e-04,2.335531666416808738e-04,1.480128027327277474e-04,9.362861002461524574e-05,5.915862564500113025e-05,3.735212585887714390e-05,2.357310681190604310e-05 | ||||||
|  | 1.000000000000000021e-03,5.745242283439769499e-04,3.667593927483133397e-04,2.330329785818580578e-04,1.476440582313571256e-04,9.337975861033522300e-05,5.899517554647101613e-05,3.724645027783519551e-05,2.350542936525477225e-05 | ||||||
|  | 1.000000000000000021e-03,5.738603284130473379e-04,3.660904113590355527e-04,2.325096037462197861e-04,1.472731594253864234e-04,9.312949788206356194e-05,5.883081823114703288e-05,3.714019567266727830e-05,2.343738413293735195e-05 | ||||||
|  | 1.000000000000000021e-03,5.731917314000997948e-04,3.654171810067180655e-04,2.319831433530600859e-04,1.469001805571756218e-04,9.287787898176902846e-05,5.866558771451522606e-05,3.703338420706373603e-05,2.336898537810763873e-05 | ||||||
|  | 1.000000000000000021e-03,5.725184531760584700e-04,3.647397285916569422e-04,2.314536235223777264e-04,1.465251423190001693e-04,9.262491677678542706e-05,5.849949412959568328e-05,3.692602258076439168e-05,2.330023745100291859e-05 | ||||||
|  | 1.000000000000000021e-03,5.718405097346714646e-04,3.640580811583470273e-04,2.309210704829702432e-04,1.461480654746279682e-04,9.237062617930094123e-05,5.833254763720848617e-05,3.681811751074023914e-05,2.323114471257928647e-05 | ||||||
|  | 1.000000000000000021e-03,5.711579171919053044e-04,3.633722658937428313e-04,2.303855105703487465e-04,1.457689708574830614e-04,9.211502214495855044e-05,5.816475842498649012e-05,3.670967573052717390e-05,2.316171153407365905e-05 | ||||||
|  | 1.000000000000000021e-03,5.704706917853448337e-04,3.626823101255147543e-04,2.298469702246577707e-04,1.453878793688169360e-04,9.185811967146480901e-05,5.799613670639434487e-05,3.660070398956385041e-05,2.309194229656875218e-05 | ||||||
|  | 1.000000000000000021e-03,5.697788498735841109e-04,3.619882413202942504e-04,2.293054759885765847e-04,1.450048119758659754e-04,9.159993379718755254e-05,5.782669271974067121e-05,3.649120905252569737e-05,2.302184139055488024e-05 | ||||||
|  | 1.000000000000000021e-03,5.690839249361781711e-04,3.612915831986411477e-04,2.287622092282637863e-04,1.446206010588695675e-04,9.134102410651873409e-05,5.765679311500335815e-05,3.638142760462866287e-05,2.295156024783083523e-05 | ||||||
|  | 1.000000000000000021e-03,5.683859273133331363e-04,3.605923537461036641e-04,2.282171874164802170e-04,1.442352604283837097e-04,9.108140050118301682e-05,5.748644463023418617e-05,3.627136409615889481e-05,2.288110175599186700e-05 | ||||||
|  | 1.000000000000000021e-03,5.676848674169825831e-04,3.598905710243090802e-04,2.276704280772651710e-04,1.438488039249314222e-04,9.082107289971861372e-05,5.731565401294060850e-05,3.616102298282374168e-05,2.281046880581413228e-05 | ||||||
|  | 1.000000000000000021e-03,5.669807557304629327e-04,3.591862531699841626e-04,2.271219487847658911e-04,1.434612454179789358e-04,9.056005123670258442e-05,5.714442801953895405e-05,3.605040872538299508e-05,2.273966429101268041e-05 | ||||||
|  | 1.000000000000000021e-03,5.662756696284717943e-04,3.584815135619230891e-04,2.265734124911083147e-04,1.430737675597642188e-04,9.029913524493678829e-05,5.697329258726415482e-05,3.593986162522089478e-05,2.266890625682277028e-05 | ||||||
|  | 1.000000000000000021e-03,5.655696121370722921e-04,3.577763576655677066e-04,2.260248242651153531e-04,1.426863741861267136e-04,9.003832758694041048e-05,5.680224948786493348e-05,3.582938283523433764e-05,2.259819544408493697e-05 | ||||||
|  | 1.000000000000000021e-03,5.648625863181645518e-04,3.570707909872514684e-04,2.254761892066869196e-04,1.422990691538204475e-04,8.977763093872482745e-05,5.663130050166089515e-05,3.571897351373497692e-05,2.252753259705453904e-05 | ||||||
|  | 1.000000000000000021e-03,5.641545952693012783e-04,3.563648190736888295e-04,2.249275124461922067e-04,1.419118563399853763e-04,8.951704798938974166e-05,5.646044741725799208e-05,3.560863482425828067e-05,2.245691846327665519e-05 | ||||||
|  | 1.000000000000000021e-03,5.634456421235028989e-04,3.556584475114634488e-04,2.243787991438712611e-04,1.415247396416227112e-04,8.925658144072659398e-05,5.628969203126926030e-05,3.549836793537420297e-05,2.238635379346144160e-05 | ||||||
|  | 1.000000000000000021e-03,5.627357300490819225e-04,3.549516819265270164e-04,2.238300544892383743e-04,1.411377229750731741e-04,8.899623400682166435e-05,5.611903614803531905e-05,3.538817402049950172e-05,2.231583934136070575e-05 | ||||||
|  | 1.000000000000000021e-03,5.620265745740795878e-04,3.542462045793823072e-04,2.232825718355581747e-04,1.407517127660701999e-04,8.873661298955798349e-05,5.594887683102661642e-05,3.527830905094599801e-05,2.224553873809700179e-05 | ||||||
|  | 1.000000000000000021e-03,5.613181716914067464e-04,3.535420099674467737e-04,2.227363458317740963e-04,1.403667046661989041e-04,8.847771519474716161e-05,5.577921186868756777e-05,3.516877154903826080e-05,2.217545101761858074e-05 | ||||||
|  | 1.000000000000000021e-03,5.606105174362018646e-04,3.528390926567629869e-04,2.221913711948466166e-04,1.399826943822104249e-04,8.821953746856249804e-05,5.561003907731979445e-05,3.505956005567386572e-05,2.210557522599888898e-05 | ||||||
|  | 1.000000000000000021e-03,5.599036078855734169e-04,3.521374472813410678e-04,2.216476427089692435e-04,1.395996776753266513e-04,8.796207669700402236e-05,5.544135630070159596e-05,3.495067313006486022e-05,2.203591042126611129e-05 | ||||||
|  | 1.000000000000000021e-03,5.591992581819900257e-04,3.514388991464684675e-04,2.211065862108586844e-04,1.392186639199167455e-04,8.770601346645835294e-05,5.527361030479937100e-05,3.484239951455165907e-05,2.196664147854661471e-05 | ||||||
|  | 1.000000000000000021e-03,5.584974577369657654e-04,3.507434317312190116e-04,2.205681855748304113e-04,1.388396401724235928e-04,8.745133837595373525e-05,5.510679463338290224e-05,3.473473491875524963e-05,2.189776560286087024e-05 | ||||||
|  | 1.000000000000000021e-03,5.577981960279812567e-04,3.500510286412654524e-04,2.200324248112712805e-04,1.384625936044855835e-04,8.719804211084999142e-05,5.494090289064881491e-05,3.462767509292537455e-05,2.182928002589032757e-05 | ||||||
|  | 1.000000000000000021e-03,5.571014625980537805e-04,3.493616736077873519e-04,2.194992880653100025e-04,1.380875115017372141e-04,8.694611544190507637e-05,5.477592874055209164e-05,3.452121582748434684e-05,2.176118200567564087e-05 | ||||||
|  | 1.000000000000000021e-03,5.564072470552914543e-04,3.486753504863699662e-04,2.189687596154907018e-04,1.377143812626113696e-04,8.669554922434540153e-05,5.461186590614181566e-05,3.441535295257522900e-05,2.169346882631773742e-05 | ||||||
|  | 1.000000000000000021e-03,5.557155390724777657e-04,3.479920432559456848e-04,2.184408238724854000e-04,1.373431903971786034e-04,8.644633439696230146e-05,5.444870816891464747e-05,3.431008233762035268e-05,2.162613779768559453e-05 | ||||||
|  | 1.000000000000000021e-03,5.550282308874212147e-04,3.473135853761227104e-04,2.179168797741835634e-04,1.369749146289257855e-04,8.619912270820690987e-05,5.428688083545962664e-05,3.420567782931384528e-05,2.155936384410790980e-05 | ||||||
|  | 1.000000000000000021e-03,5.543453044039096641e-04,3.466399489498413807e-04,2.173969005859271932e-04,1.366095327799803094e-04,8.595389890905566596e-05,5.412637349122350694e-05,3.410213253115887156e-05,2.149314248283782383e-05 | ||||||
|  | 1.000000000000000021e-03,5.536667416543260278e-04,3.459711063207645686e-04,2.168808598269340415e-04,1.362470238846985658e-04,8.571064790824490891e-05,5.396717583150281386e-05,3.399943962027434491e-05,2.142746927933548718e-05 | ||||||
|  | 1.000000000000000021e-03,5.529925247987736454e-04,3.453070300711248903e-04,2.163687312677279435e-04,1.358873671873677324e-04,8.546935477049620155e-05,5.380927766017944798e-05,3.389759234653519571e-05,2.136233984669994517e-05 | ||||||
|  | 1.000000000000000021e-03,5.523242123557685823e-04,3.446492679875326503e-04,2.158617145497228296e-04,1.355314077800207832e-04,8.523058755788532964e-05,5.365305115434923267e-05,3.379683095199963850e-05,2.129790788796336886e-05 | ||||||
|  | 1.000000000000000021e-03,5.516617811459008413e-04,3.439977838203789025e-04,2.153597748770509342e-04,1.351791181086447731e-04,8.499432644189092710e-05,5.349848277838686991e-05,3.369714647650299112e-05,2.123416758034315385e-05 | ||||||
|  | 1.000000000000000021e-03,5.510052081904127453e-04,3.433525416882428740e-04,2.148628778379304833e-04,1.348304709382760146e-04,8.476055183025699440e-05,5.334555916079864168e-05,3.359853006971443923e-05,2.117111317291617240e-05 | ||||||
|  | 1.000000000000000021e-03,5.503544707098636342e-04,3.427135060745518090e-04,2.143709894006651793e-04,1.344854393494213974e-04,8.452924436422564868e-05,5.319426709225049006e-05,3.350097298979682009e-05,2.110873898573355285e-05 | ||||||
|  | 1.000000000000000021e-03,5.497095461228062706e-04,3.420806418242862412e-04,2.138840759097000895e-04,1.341439967345312348e-04,8.430038491581448882e-05,5.304459352362807473e-05,3.340446660208796169e-05,2.104703940894962140e-05 | ||||||
|  | 1.000000000000000021e-03,5.490704120444732210e-04,3.414539141407250565e-04,2.134021040817290626e-04,1.338061167945246396e-04,8.407395458513211085e-05,5.289652556412503305e-05,3.330900237780223545e-05,2.098600890196449472e-05 | ||||||
|  | 1.000000000000000021e-03,5.484371298422446297e-04,3.408333692467681113e-04,2.129251024270059081e-04,1.334718163299163942e-04,8.384996326436759272e-05,5.275006911363530105e-05,3.321458388816914869e-05,2.092564965374723430e-05 | ||||||
|  | 1.000000000000000021e-03,5.478096771889333057e-04,3.402189725469309967e-04,2.124530379214265854e-04,1.331410692793207290e-04,8.362839223924152716e-05,5.260521141428185532e-05,3.312120269498457291e-05,2.086595618361951373e-05 | ||||||
|  | 1.000000000000000021e-03,5.471880319478338028e-04,3.396106897916775086e-04,2.119858778995733334e-04,1.328138498781884043e-04,8.340922301478033581e-05,5.246193986031627375e-05,3.302885046175365648e-05,2.080692307740899109e-05 | ||||||
|  | 1.000000000000000021e-03,5.465721721714859958e-04,3.390084870743713592e-04,2.115235900510876890e-04,1.324901326555763298e-04,8.319243731282516567e-05,5.232024199634728476e-05,3.293751895248773966e-05,2.074854498665493433e-05 | ||||||
|  | 1.000000000000000021e-03,5.459629241404544706e-04,3.384131725428774743e-04,2.110667946787101129e-04,1.321703518944146796e-04,8.297832591380873519e-05,5.218030786215170435e-05,3.284733064718059383e-05,2.069090019482566404e-05 | ||||||
|  | 1.000000000000000021e-03,5.453602635114507746e-04,3.378247083723790616e-04,2.106154557101209946e-04,1.318544791589579420e-04,8.276686841524559784e-05,5.204212355675735553e-05,3.275827635494999894e-05,2.063398273378693265e-05 | ||||||
|  | 1.000000000000000021e-03,5.447641661727002649e-04,3.372430571518834691e-04,2.101695374983407439e-04,1.315424863636820575e-04,8.255804467261116894e-05,5.190567535780167048e-05,3.267034700418964161e-05,2.057778671334094953e-05 | ||||||
|  | 1.000000000000000021e-03,5.441746082424759419e-04,3.366681818805845774e-04,2.097290048174083239e-04,1.312343457694375884e-04,8.235183479637930588e-05,5.177094971942625129e-05,3.258353364113958107e-05,2.052230632028256941e-05 | ||||||
|  | 1.000000000000000021e-03,5.435915660676414983e-04,3.361000459642789163e-04,2.092938228581225045e-04,1.309300299796617602e-04,8.214821914910500468e-05,5.163793327020207291e-05,3.249782742847867687e-05,2.046753581747058517e-05 | ||||||
|  | 1.000000000000000021e-03,5.430150162222109568e-04,3.355386132118161487e-04,2.088639572238308215e-04,1.306295119366350911e-04,8.194717834254394587e-05,5.150661281108238069e-05,3.241321964393507540e-05,2.041346954291065543e-05 | ||||||
|  | 1.000000000000000021e-03,5.424450181544462771e-04,3.349839271155603902e-04,2.084394340599780252e-04,1.303328067075743425e-04,8.174872108664715700e-05,5.137699346328779477e-05,3.232971335519106785e-05,2.036010936323692981e-05 | ||||||
|  | 1.000000000000000021e-03,5.418815485793469040e-04,3.344359518126675877e-04,2.080202193468776877e-04,1.300398875631312602e-04,8.155282824274543232e-05,5.124906220377890154e-05,3.224729995882103797e-05,2.030744969463951815e-05 | ||||||
|  | 1.000000000000000021e-03,5.413245844265015877e-04,3.338946518213946552e-04,2.076062794549138172e-04,1.297507280942760690e-04,8.135948090770286575e-05,5.112280617242197348e-05,3.216597096011364272e-05,2.025548502431296445e-05 | ||||||
|  | 1.000000000000000021e-03,5.407741028387587183e-04,3.333599920378552692e-04,2.071975811406991498e-04,1.294653022088876294e-04,8.116866041129419294e-05,5.099821267012491396e-05,3.208571797180734118e-05,2.020420990962221080e-05 | ||||||
|  | 1.000000000000000021e-03,5.402303025747014556e-04,3.328321561526745862e-04,2.067942601549091974e-04,1.291837026153304184e-04,8.098042783792958120e-05,5.087532120941394917e-05,3.200656629292941073e-05,2.015364045325785942e-05 | ||||||
|  | 1.000000000000000021e-03,5.396931605409548225e-04,3.323111087173311550e-04,2.063962829591101838e-04,1.289059030082810651e-04,8.079476437365657295e-05,5.075411899733799342e-05,3.192850747587867838e-05,2.010377117411100997e-05 | ||||||
|  | 1.000000000000000021e-03,5.391626538584482192e-04,3.317968146613820609e-04,2.060036164003212873e-04,1.286318773981824648e-04,8.061165143636152362e-05,5.063459340114707095e-05,3.185153317990099749e-05,2.005459666083220688e-05 | ||||||
|  | 1.000000000000000021e-03,5.386387598611086340e-04,3.312892392892789490e-04,2.056162277072543561e-04,1.283616001079104806e-04,8.043107067321031531e-05,5.051673194647494236e-05,3.177563516985718072e-05,2.000611157101859271e-05 | ||||||
|  | 1.000000000000000021e-03,5.381214560945620949e-04,3.307883482772016118e-04,2.052340844865845515e-04,1.280950457694747437e-04,8.025300395811590449e-05,5.040052231554306949e-05,3.170080531500530551e-05,1.995831063041139523e-05 | ||||||
|  | 1.000000000000000021e-03,5.376107203148404326e-04,3.302941076699326679e-04,2.048571547192701043e-04,1.278321893207613302e-04,8.007743338923888358e-05,5.028595234538581714e-05,3.162703558779804923e-05,1.991118863210237610e-05 | ||||||
|  | 1.000000000000000021e-03,5.371022748594453389e-04,3.298024246812891291e-04,2.044823390252625600e-04,1.275708788891961756e-04,7.990292563076895462e-05,5.017208832604374468e-05,3.155372544493714152e-05,1.986436223028797206e-05 | ||||||
|  | 1.000000000000000021e-03,5.365961117498912114e-04,3.293132869081722108e-04,2.041096254707852251e-04,1.273111050031557620e-04,7.972947385597059739e-05,5.005892559260894715e-05,3.148087179640124731e-05,1.981782941609088261e-05 | ||||||
|  | 1.000000000000000021e-03,5.360922230056120808e-04,3.288266819633119922e-04,2.037390021489647173e-04,1.270528582181514683e-04,7.955707126027152540e-05,4.994645949643470906e-05,3.140847156340457124e-05,1.977158818812822943e-05 | ||||||
|  | 1.000000000000000021e-03,5.355906006439992324e-04,3.283425974753378354e-04,2.033704571798752555e-04,1.267961291168465381e-04,7.938571106126265876e-05,4.983468540512894492e-05,3.133652167839010846e-05,1.972563655250571181e-05 | ||||||
|  | 1.000000000000000021e-03,5.350891259362026411e-04,3.278589502113704612e-04,2.030023855884717748e-04,1.265397912200834861e-04,7.921463777328526478e-05,4.972310904903239575e-05,3.126470337114675132e-05,1.967977067875568528e-05 | ||||||
|  | 1.000000000000000021e-03,5.345877966909636306e-04,3.273757374134148111e-04,2.026347848040474173e-04,1.262838424862170036e-04,7.904384991646645146e-05,4.961172941171763403e-05,3.119301596587686584e-05,1.963399012641590455e-05 | ||||||
|  | 1.000000000000000021e-03,5.340866106918126799e-04,3.268929562877650259e-04,2.022676522245876859e-04,1.260282808504260116e-04,7.887334599501782170e-05,4.950054546622813158e-05,3.112145877995456692e-05,1.958829445064508602e-05 | ||||||
|  | 1.000000000000000021e-03,5.335855656972701092e-04,3.264106040054970534e-04,2.019009852173301103e-04,1.257731042251948573e-04,7.870312449759831505e-05,4.938955617533215942e-05,3.105003112409614148e-05,1.954268320233478379e-05 | ||||||
|  | 1.000000000000000021e-03,5.330846594410641130e-04,3.259286777029715004e-04,2.015347811193284109e-04,1.255183105007985753e-04,7.853318389767883849e-05,4.927876049177821896e-05,3.097873230253197569e-05,1.949715592822227211e-05 | ||||||
| 
 | 
							
								
								
									
										96
									
								
								tests/data/test_lumped_losses_fiber_no_raman.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								tests/data/test_lumped_losses_fiber_no_raman.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | |||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
|  | 1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05 | ||||||
| 
 | 
							
								
								
									
										98
									
								
								tests/data/test_lumped_losses_raman_fiber.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								tests/data/test_lumped_losses_raman_fiber.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | |||||||
|  | 1.000000000000000021e-03,6.059596816131984903e-04,4.124540545641951000e-04,2.874328952539468305e-04,2.103398919772851445e-04,1.677242405549142946e-04,1.544863001982801454e-04,1.810521006745035243e-04,3.200643516934312716e-04 | ||||||
|  | 1.000000000000000021e-03,6.053276391419512917e-04,4.117105797931639192e-04,2.867132476380170980e-04,2.096494018677202108e-04,1.670078900317705016e-04,1.536235748319029191e-04,1.797412011853683042e-04,3.172302656811062894e-04 | ||||||
|  | 1.000000000000000021e-03,6.046965215788322606e-04,4.109687952835336887e-04,2.859957486816950244e-04,2.089614974033423851e-04,1.662949011112697126e-04,1.527659914515381017e-04,1.784402430016445015e-04,3.144223032044235564e-04 | ||||||
|  | 1.000000000000000021e-03,6.040663257237133005e-04,4.102286952029449651e-04,2.852803900268787471e-04,2.082761669373014350e-04,1.655852558250782110e-04,1.519135165004971508e-04,1.771491455864908956e-04,3.116402083285431824e-04 | ||||||
|  | 1.000000000000000021e-03,6.034134049131552151e-04,4.094420572177277762e-04,2.844940684888993296e-04,2.074903534701979157e-04,1.647299311261353841e-04,1.508247978694524506e-04,1.753757648572244786e-04,3.073546770239318966e-04 | ||||||
|  | 1.000000000000000021e-03,6.027614491955140619e-04,4.086572704905903084e-04,2.837102537033676193e-04,2.067078158689920062e-04,1.638793172508614261e-04,1.497441922066543145e-04,1.736205593148946460e-04,3.031290170068882115e-04 | ||||||
|  | 1.000000000000000021e-03,6.021104551256277167e-04,4.078743283205443272e-04,2.829289352705667755e-04,2.059285379676389937e-04,1.630333854029286287e-04,1.486716352337672398e-04,1.718833358612950819e-04,2.989623714008152688e-04 | ||||||
|  | 1.000000000000000021e-03,6.014582116574243619e-04,4.070908897338878368e-04,2.821481168500803620e-04,2.051508852341138217e-04,1.621907338278938133e-04,1.476057520309239507e-04,1.701623353591907634e-04,2.948510854465446421e-04 | ||||||
|  | 1.000000000000000021e-03,6.008047235362061304e-04,4.063069632907822604e-04,2.813678065291968134e-04,2.043748619094956848e-04,1.613513572535205565e-04,1.465465096091600223e-04,1.684574188261711764e-04,2.907944492354505236e-04 | ||||||
|  | 1.000000000000000021e-03,6.001451360530016092e-04,4.055123728737173791e-04,2.805722092000019225e-04,2.035777116783122080e-04,1.604816172174310248e-04,1.454380432794140279e-04,1.666509749540511247e-04,2.864106919229302104e-04 | ||||||
|  | 1.000000000000000021e-03,5.994843238884264500e-04,4.047173509812383436e-04,2.797772242168449484e-04,2.027823739011739494e-04,1.596154967418240479e-04,1.443369747762361644e-04,1.648627759919576703e-04,2.820911717580149220e-04 | ||||||
|  | 1.000000000000000021e-03,5.988172342183890103e-04,4.039163714190686103e-04,2.789780293498389497e-04,2.019848363041463460e-04,1.587495225986212185e-04,1.432398991427229250e-04,1.630885426393815433e-04,2.778273023594395367e-04 | ||||||
|  | 1.000000000000000021e-03,5.981438884479926745e-04,4.031094770638417378e-04,2.781746763026650849e-04,2.011851525894453846e-04,1.578837467363927922e-04,1.421468562989037501e-04,1.613282432889087106e-04,2.736185440612619660e-04 | ||||||
|  | 1.000000000000000021e-03,5.974643081279905951e-04,4.022967109333065402e-04,2.773672167904255525e-04,2.003833762773818070e-04,1.570182206524130687e-04,1.410578853054891162e-04,1.595818450324428667e-04,2.694643589605560702e-04 | ||||||
|  | 1.000000000000000021e-03,5.967776135628261383e-04,4.014760835454474729e-04,2.765523639715266420e-04,1.995745107850170087e-04,1.561451751437292214e-04,1.399593838969533089e-04,1.578189695554256631e-04,2.652593622585595239e-04 | ||||||
|  | 1.000000000000000021e-03,5.960847301704033955e-04,4.006496794462583626e-04,2.757335282633677394e-04,1.987637005805311633e-04,1.552725686595443394e-04,1.388652425906941482e-04,1.560705931497471889e-04,2.611111091988240428e-04 | ||||||
|  | 1.000000000000000021e-03,5.953856800664869900e-04,3.998175424230218200e-04,2.749107619574642008e-04,1.979509993037016505e-04,1.544004519462355480e-04,1.377754975907092790e-04,1.543366727366940775e-04,2.570190084729973012e-04 | ||||||
|  | 1.000000000000000021e-03,5.946807128856675898e-04,3.989799547069150759e-04,2.740843182982303974e-04,1.971366223883773178e-04,1.535290106655841792e-04,1.366903106980890768e-04,1.526173104925201149e-04,2.529827224768709296e-04 | ||||||
|  | 1.000000000000000021e-03,5.939698501124463306e-04,3.981369586533569987e-04,2.732542475356756692e-04,1.963206208562686219e-04,1.526582921179318820e-04,1.356097131673934353e-04,1.509124557001679569e-04,2.490016526370400561e-04 | ||||||
|  | 1.000000000000000021e-03,5.932465626846949178e-04,3.972749900655482406e-04,2.723996767755988246e-04,1.954732420440092287e-04,1.517449722599865122e-04,1.344633353162260421e-04,1.490787207039270096e-04,2.446311790608478916e-04 | ||||||
|  | 1.000000000000000021e-03,5.925174390191371033e-04,3.964077570693368959e-04,2.715417094444828503e-04,1.946245940839898595e-04,1.508329769024341859e-04,1.333227635443309334e-04,1.472627410071646460e-04,2.403295419535726046e-04 | ||||||
|  | 1.000000000000000021e-03,5.917825975966207411e-04,3.955354074700222146e-04,2.706804869652218665e-04,1.937748023716854423e-04,1.499224142400159925e-04,1.321880784683747445e-04,1.454644877205459041e-04,2.360959501695517580e-04 | ||||||
|  | 1.000000000000000021e-03,5.910420603206251872e-04,3.946579839875351422e-04,2.698160594859791645e-04,1.929239167799043884e-04,1.490133276731937860e-04,1.310592984163628486e-04,1.436838579350653566e-04,2.319294885748935905e-04 | ||||||
|  | 1.000000000000000021e-03,5.902958492424382119e-04,3.937755294749108723e-04,2.689484771457827648e-04,1.920719869699086713e-04,1.481057601269397369e-04,1.299364409184113305e-04,1.419207481479104003e-04,2.278292508796841368e-04 | ||||||
|  | 1.000000000000000021e-03,5.895598685634120817e-04,3.929178479527316910e-04,2.681193531438139815e-04,1.912726116179633686e-04,1.472689584526509451e-04,1.289152165190126341e-04,1.403276367723939690e-04,2.241040180807166735e-04 | ||||||
|  | 1.000000000000000021e-03,5.888182184446727908e-04,3.920550888852155800e-04,2.672869104586279658e-04,1.904718280301954622e-04,1.464329431074320987e-04,1.278983689606465277e-04,1.387482416027983217e-04,2.204326648641897243e-04 | ||||||
|  | 1.000000000000000021e-03,5.880709209312291698e-04,3.911872944022057189e-04,2.664511977530461032e-04,1.896696843025943828e-04,1.455977573633372962e-04,1.268859249854523304e-04,1.371825077963339959e-04,2.168145532732365665e-04 | ||||||
|  | 1.000000000000000021e-03,5.873188516038330012e-04,3.903153927531259398e-04,2.656130037940035156e-04,1.888668181821939697e-04,1.447639292589146184e-04,1.258783532658409540e-04,1.356308744741794301e-04,2.132498546822566535e-04 | ||||||
|  | 1.000000000000000021e-03,5.865620290918570692e-04,3.894394196579139384e-04,2.647723694527710347e-04,1.880632691586897262e-04,1.439314922056974795e-04,1.248756678383702303e-04,1.340932673985179111e-04,2.097378989636096219e-04 | ||||||
|  | 1.000000000000000021e-03,5.858004721379563712e-04,3.885594109297237520e-04,2.639293355828808605e-04,1.872590765580118600e-04,1.431004792703304354e-04,1.238778821782577646e-04,1.325696118981003829e-04,2.062780220293337398e-04 | ||||||
|  | 1.000000000000000021e-03,5.850341996176138979e-04,3.876754025264287241e-04,2.630839431003643525e-04,1.864542796470906004e-04,1.422709233084495310e-04,1.228850093894619591e-04,1.310598332174379369e-04,2.028695668674851068e-04 | ||||||
|  | 1.000000000000000021e-03,5.842633259194077947e-04,3.867875329548579075e-04,2.622363206668650243e-04,1.856489888735660490e-04,1.414429165168560936e-04,1.218971173595769875e-04,1.295639192660443006e-04,1.995119889022209966e-04 | ||||||
|  | 1.000000000000000021e-03,5.834878697730810785e-04,3.858958376209294626e-04,2.613865082576556967e-04,1.848432421885319707e-04,1.406164899573639974e-04,1.209142166826000190e-04,1.280817922197122173e-04,1.962046375108947760e-04 | ||||||
|  | 1.000000000000000021e-03,5.827078500230523962e-04,3.850003520236475163e-04,2.605345458299026889e-04,1.840370773822073991e-04,1.397916743597008157e-04,1.199363174304283899e-04,1.266133739282210172e-04,1.929468682039042694e-04 | ||||||
|  | 1.000000000000000021e-03,5.819334261621241173e-04,3.841195496874485939e-04,2.597054450234843122e-04,1.832615752361228063e-04,1.390067359137023490e-04,1.190124837885568685e-04,1.252266477671892364e-04,1.898342669542842250e-04 | ||||||
|  | 1.000000000000000021e-03,5.811544494713084385e-04,3.832349425929183610e-04,2.588741118031709712e-04,1.824854619290212638e-04,1.382230274271905722e-04,1.180928923649849320e-04,1.238519429087230690e-04,1.867668194223294086e-04 | ||||||
|  | 1.000000000000000021e-03,5.803709388350691226e-04,3.823465658113372784e-04,2.580405852181276633e-04,1.817087742555892370e-04,1.374405795299253087e-04,1.171775570200931022e-04,1.224892004036316632e-04,1.837439681062861012e-04 | ||||||
|  | 1.000000000000000021e-03,5.795844646861092117e-04,3.814560496353979662e-04,2.572062245701910057e-04,1.809325897993571621e-04,1.366602663048694689e-04,1.162672443199922736e-04,1.211391750652958171e-04,1.807664171209839225e-04 | ||||||
|  | 1.000000000000000021e-03,5.787950390386191295e-04,3.805634168176052199e-04,2.563710546191050039e-04,1.801569303693986560e-04,1.358821021611104744e-04,1.153619483579342790e-04,1.198017787120210541e-04,1.778335550584487373e-04 | ||||||
|  | 1.000000000000000021e-03,5.780026739739645147e-04,3.796686901561970007e-04,2.555351001009416268e-04,1.793818176715784992e-04,1.351061013224604760e-04,1.144616629966290335e-04,1.184769233829579004e-04,1.749447775426769835e-04 | ||||||
|  | 1.000000000000000021e-03,5.772073816396077655e-04,3.787718924921195112e-04,2.546983857238086673e-04,1.786072733038042632e-04,1.343322778228697451e-04,1.135663818643436025e-04,1.171645213323757931e-04,1.720994871389106646e-04 | ||||||
|  | 1.000000000000000021e-03,5.764112975619451167e-04,3.778753049229251356e-04,2.538628529985562728e-04,1.778348606584519826e-04,1.335619170774594953e-04,1.126772524533375236e-04,1.158657577413503814e-04,1.692991320527776819e-04 | ||||||
|  | 1.000000000000000021e-03,5.756144252522814222e-04,3.769789335549947914e-04,2.530285065275222683e-04,1.770645798114452998e-04,1.327950095246515803e-04,1.117942393436846088e-04,1.145805009748875411e-04,1.665430248001372392e-04 | ||||||
|  | 1.000000000000000021e-03,5.748167682568085593e-04,3.760827845283660131e-04,2.521953509290719687e-04,1.762964308427695766e-04,1.320315456257037542e-04,1.109173072961205789e-04,1.133086205901110452e-04,1.638304880953399246e-04 | ||||||
|  | 1.000000000000000021e-03,5.740166237139158025e-04,3.751830736799844387e-04,2.513572749088919958e-04,1.755213872380331861e-04,1.312580494760662926e-04,1.100242733780145235e-04,1.120050977276823334e-04,1.610268323297459373e-04 | ||||||
|  | 1.000000000000000021e-03,5.732157063485666254e-04,3.742836154796483610e-04,2.505204393147844274e-04,1.747485543201545441e-04,1.304881340598568315e-04,1.091376023135285023e-04,1.107157077892566201e-04,1.582698947895536752e-04 | ||||||
|  | 1.000000000000000021e-03,5.724140197507473007e-04,3.733844159930685934e-04,2.496848484812796650e-04,1.739779315547772373e-04,1.297217884948703216e-04,1.082572552711356679e-04,1.094403070125688193e-04,1.555589173140119988e-04 | ||||||
|  | 1.000000000000000021e-03,5.716133163514535006e-04,3.724872615728835922e-04,2.488519667094108378e-04,1.732106573421359136e-04,1.289599119326889729e-04,1.073839886960488172e-04,1.081795839980315968e-04,1.528943685588057789e-04 | ||||||
|  | 1.000000000000000021e-03,5.708135916089464952e-04,3.715921440481619780e-04,2.480217821880964816e-04,1.724467146387093834e-04,1.282024761936270685e-04,1.065177436423506841e-04,1.069333674890963240e-04,1.502754491507743331e-04 | ||||||
|  | 1.000000000000000021e-03,5.700148410279018158e-04,3.706990553358867476e-04,2.471942832207120249e-04,1.716860865497342535e-04,1.274494533371790404e-04,1.056584617232978574e-04,1.057014883248694426e-04,1.477013737020834935e-04 | ||||||
|  | 1.000000000000000021e-03,5.692170601522963469e-04,3.698079874222007994e-04,2.463694581964103098e-04,1.709287562926333241e-04,1.267008156164750913e-04,1.048060850476081559e-04,1.044837793145218324e-04,1.451713702741069042e-04 | ||||||
|  | 1.000000000000000021e-03,5.684221107462931718e-04,3.689208973051672467e-04,2.455489480245545849e-04,1.701760222502850749e-04,1.259576042689529907e-04,1.039615052862917467e-04,1.032810864032787402e-04,1.426862118551680341e-04 | ||||||
|  | 1.000000000000000021e-03,5.676299806599446841e-04,3.680377623533836952e-04,2.447327238198633678e-04,1.694278494753442496e-04,1.252197721019686588e-04,1.031246414956518974e-04,1.020932099638295122e-04,1.402450714512258731e-04 | ||||||
|  | 1.000000000000000021e-03,5.668406578186927338e-04,3.671585601102087264e-04,2.439207569480618843e-04,1.686842033525584789e-04,1.244872724153648453e-04,1.022954136930148580e-04,1.009199532576916553e-04,1.378471380449364540e-04 | ||||||
|  | 1.000000000000000021e-03,5.660528798623399357e-04,3.662807588285737852e-04,2.431092838206291959e-04,1.679399278621275505e-04,1.237529841606189703e-04,1.014631173867882653e-04,9.974194130068655907e-05,1.354424501489320950e-04 | ||||||
|  | 1.000000000000000021e-03,5.652678887062091489e-04,3.654068578608936813e-04,2.423020363044335113e-04,1.672001557892942780e-04,1.230240193993821724e-04,1.006384714692423982e-04,9.857860748076281341e-05,1.330810886504238974e-04 | ||||||
|  | 1.000000000000000021e-03,5.644856725120149217e-04,3.645368352560149003e-04,2.414989864020476457e-04,1.664648531857207327e-04,1.223003320760450115e-04,9.982139651422967225e-05,9.742975533494338731e-05,1.307622432316707048e-04 | ||||||
|  | 1.000000000000000021e-03,5.637081598516872297e-04,3.636726247466106157e-04,2.407016951041400575e-04,1.657352124900924413e-04,1.215828418563276393e-04,9.901263879559620603e-05,9.629602344691408898e-05,1.284862679388324466e-04 | ||||||
|  | 1.000000000000000021e-03,5.629353300793490293e-04,3.628141892281135789e-04,2.399101174854294510e-04,1.650111827309744587e-04,1.208714852573268089e-04,9.821209936496322563e-05,9.517719041742417905e-05,1.262523213089875105e-04 | ||||||
|  | 1.000000000000000021e-03,5.621671626935266465e-04,3.619614919160761232e-04,2.391242090587739641e-04,1.642927134849468424e-04,1.201661995513669139e-04,9.741968060975319133e-05,9.407303841474721877e-05,1.240595794224424390e-04 | ||||||
|  | 1.000000000000000021e-03,5.614036373218869204e-04,3.611144963064036881e-04,2.383439257149278542e-04,1.635797548004748762e-04,1.194669226721670609e-04,9.663528612429730903e-05,9.298335293466474341e-05,1.219072350364201328e-04 | ||||||
|  | 1.000000000000000021e-03,5.606463485664969944e-04,3.602748496609082000e-04,2.375706263435288989e-04,1.628733614326239394e-04,1.187744774441648902e-04,9.585958850070355037e-05,9.190871230268097864e-05,1.197956257524449784e-04 | ||||||
|  | 1.000000000000000021e-03,5.598952698555576370e-04,3.594425038433207622e-04,2.368042532426757629e-04,1.621734693226255697e-04,1.180887870128607769e-04,9.509247448928166366e-05,9.084888029067286991e-05,1.177239166851852087e-04 | ||||||
|  | 1.000000000000000021e-03,5.591503748394264367e-04,3.586174111937711294e-04,2.360447493430869353e-04,1.614800151758654528e-04,1.174097755299612002e-04,9.433383251239638840e-05,8.980362478385646723e-05,1.156912913627774928e-04 | ||||||
|  | 1.000000000000000021e-03,5.584225591487143505e-04,3.578196518919505740e-04,2.353197697834314708e-04,1.608280111225492105e-04,1.167814916834832538e-04,9.364209834454310303e-05,8.886089862139266997e-05,1.138670987493162862e-04 | ||||||
|  | 1.000000000000000021e-03,5.577008468242452242e-04,3.570289620106132170e-04,2.346013750077580542e-04,1.601820316992516276e-04,1.161592518078891664e-04,9.295772679954118940e-05,8.793036528463705852e-05,1.120748093307471799e-04 | ||||||
|  | 1.000000000000000021e-03,5.569852125454166723e-04,3.562452965139748743e-04,2.338895121728417183e-04,1.595420198714332595e-04,1.155429900504064843e-04,9.228062559771084612e-05,8.701184300011380421e-05,1.103138112316197746e-04 | ||||||
|  | 1.000000000000000021e-03,5.562757163116399499e-04,3.554686957703368042e-04,2.331841974232642283e-04,1.589079715282182140e-04,1.149326819589807311e-04,9.161073769793274093e-05,8.610518609906000706e-05,1.085835484715731990e-04 | ||||||
|  | 1.000000000000000021e-03,5.555723328562507538e-04,3.546991150005096983e-04,2.324853783642831767e-04,1.582798302759657303e-04,1.143282626503791007e-04,9.094797264045832242e-05,8.521021771090780625e-05,1.068834322603653324e-04 | ||||||
|  | 1.000000000000000021e-03,5.548750371213563657e-04,3.539365098621276230e-04,2.317930031654593444e-04,1.576575403787569985e-04,1.137296680667903865e-04,9.029224125378113518e-05,8.432676390648500317e-05,1.052128860599020399e-04 | ||||||
|  | 1.000000000000000021e-03,5.541838042439771635e-04,3.531808364136874187e-04,2.311070205067102163e-04,1.570410466910287454e-04,1.131368348940622735e-04,8.964345554504144940e-05,8.345465350366406993e-05,1.035713449503019397e-04 | ||||||
|  | 1.000000000000000021e-03,5.534994772986728557e-04,3.524329474767404734e-04,2.304281200650363333e-04,1.564308719194829761e-04,1.125501566344392631e-04,8.900191672771989599e-05,8.259410426967044201e-05,1.019587783174918249e-04 | ||||||
|  | 1.000000000000000021e-03,5.528220286453137825e-04,3.516927939956549431e-04,2.297562446752235638e-04,1.558269550144645319e-04,1.119695640249353838e-04,8.836753049012398612e-05,8.174493812638424233e-05,1.003746189891791522e-04 | ||||||
|  | 1.000000000000000021e-03,5.521514308959529988e-04,3.509603274307335013e-04,2.290913378267074509e-04,1.552292356754889449e-04,1.113949887224841186e-04,8.774020391605217217e-05,8.090698006040516024e-05,9.881831191717569708e-05 | ||||||
|  | 1.000000000000000021e-03,5.514925705077818562e-04,3.502439423799475968e-04,2.284441610897542578e-04,1.546502536108915020e-04,1.108405451476827762e-04,8.713560862370903280e-05,8.009669495978734939e-05,9.729798207441842409e-05 | ||||||
|  | 1.000000000000000021e-03,5.508404954145605355e-04,3.495351144497065954e-04,2.278037808073336661e-04,1.540772565128698055e-04,1.102918428934658313e-04,8.653767235071846409e-05,7.929694151393572473e-05,9.580416231533655223e-05 | ||||||
|  | 1.000000000000000021e-03,5.501951791779016417e-04,3.488337972114359704e-04,2.271701434112839691e-04,1.535101877933933972e-04,1.097488185619751536e-04,8.594630990981442489e-05,7.850756016455258672e-05,9.433633928045583440e-05 | ||||||
|  | 1.000000000000000021e-03,5.495566796872157793e-04,3.481400279377950191e-04,2.265432624126748171e-04,1.529490418493457818e-04,1.092114481281042810e-04,8.536146896299809861e-05,7.772842391839215501e-05,9.289404738934854406e-05 | ||||||
|  | 1.000000000000000021e-03,5.489249706454161527e-04,3.474537605956091817e-04,2.259230848255512310e-04,1.523937628358645337e-04,1.086796692149487770e-04,8.478306608188779627e-05,7.695937762456762194e-05,9.147679298288125297e-05 | ||||||
|  | 1.000000000000000021e-03,5.483000259883204826e-04,3.467749496226811058e-04,2.253095582547179863e-04,1.518442955755717951e-04,1.081534202533376696e-04,8.421101904463252675e-05,7.620026875215024978e-05,9.008409282780761526e-05 | ||||||
|  | 1.000000000000000021e-03,5.476818198739591458e-04,3.461035499001802445e-04,2.247026308546789793e-04,1.513005855077949086e-04,1.076326404207925846e-04,8.364524675486820964e-05,7.545094724756280888e-05,8.871547365198851438e-05 | ||||||
|  | 1.000000000000000021e-03,5.470705529810189179e-04,3.454397485743721506e-04,2.241024413587690614e-04,1.507627254998857578e-04,1.071173841908876651e-04,8.308576484396013343e-05,7.471135773791005180e-05,8.737059031219478156e-05 | ||||||
|  | 1.000000000000000021e-03,5.464661991670638182e-04,3.447835000304132159e-04,2.235089374295866490e-04,1.502306605954647535e-04,1.066075905365267742e-04,8.253249249775968508e-05,7.398135232542971769e-05,8.604898363826276057e-05 | ||||||
|  | 1.000000000000000021e-03,5.458687325221291348e-04,3.441347591201103138e-04,2.229220673120790245e-04,1.497043364932862668e-04,1.061031992194506256e-04,8.198535007121052676e-05,7.326078561528488937e-05,8.475020417489323324e-05 | ||||||
|  | 1.000000000000000021e-03,5.452901895090844558e-04,3.435150570304173014e-04,2.223706511768525117e-04,1.492190839480494894e-04,1.056468106030715887e-04,8.149737756206330190e-05,7.262157722718122260e-05,8.358877577600780481e-05 | ||||||
|  | 1.000000000000000021e-03,5.447184570616723891e-04,3.429026954804162766e-04,2.218256219048080177e-04,1.487392297472955698e-04,1.051953246672348403e-04,8.101471604563164947e-05,7.199020130947719233e-05,8.244600742971828849e-05 | ||||||
|  | 1.000000000000000021e-03,5.441535103689846154e-04,3.422976319891982578e-04,2.212869318272295087e-04,1.482647252612499030e-04,1.047486894350850925e-04,8.053730000430466094e-05,7.136654438032706549e-05,8.132155926679031160e-05 | ||||||
|  | 1.000000000000000021e-03,5.435909997143165834e-04,3.416955774702987799e-04,2.207511658034611989e-04,1.477929951923679644e-04,1.043049394866297369e-04,8.006352324306285982e-05,7.074908147590525608e-05,8.021344078389119761e-05 | ||||||
|  | 1.000000000000000021e-03,5.430309161342643806e-04,3.410965159927432586e-04,2.202183050641030458e-04,1.473240192034464783e-04,1.038640511149413747e-04,7.959335168171117276e-05,7.013774197495506457e-05,7.912139691327875046e-05 | ||||||
|  | 1.000000000000000021e-03,5.424732506674768149e-04,3.405004316631486216e-04,2.196883309178195964e-04,1.468577770769967101e-04,1.034260007962051111e-04,7.912675157408064104e-05,6.953245613429904408e-05,7.804517686317993341e-05 | ||||||
|  | 1.000000000000000021e-03,5.419179943504857889e-04,3.399073086151600896e-04,2.191612247355960430e-04,1.463942486957527610e-04,1.029907651665082401e-04,7.866368947795671801e-05,6.893315503775990498e-05,7.698453395110452940e-05 | ||||||
|  | 1.000000000000000021e-03,5.413629828746738867e-04,3.393149394667066966e-04,2.186351838182767991e-04,1.459320465988429058e-04,1.025572658029062702e-04,7.820326658601671303e-05,6.833895931108436813e-05,7.593823716905742757e-05 | ||||||
|  | 1.000000000000000021e-03,5.408082138671730385e-04,3.387233205925343745e-04,2.181102035828516778e-04,1.454711649598321068e-04,1.021254940975202248e-04,7.774546638666711494e-05,6.774982397495531476e-05,7.490609035628451105e-05 | ||||||
|  | 1.000000000000000021e-03,5.402536849306272763e-04,3.381324483351249330e-04,2.175862794239174624e-04,1.450115979478540569e-04,1.016954414669310805e-04,7.729027246482876178e-05,6.716570445567967391e-05,7.388790009412213962e-05 | ||||||
|  | 1.000000000000000021e-03,5.396844473492076093e-04,3.375153269484326116e-04,2.170269255797531330e-04,1.445081577421817903e-04,1.012119806681102793e-04,7.676796353167371053e-05,6.648955946153636300e-05,7.272015355307609235e-05 | ||||||
|  | 1.000000000000000021e-03,5.391154759339646064e-04,3.368990409960971838e-04,2.164687998325534753e-04,1.440063199340409466e-04,1.007307157169936256e-04,7.624910690660518565e-05,6.582015362379603355e-05,7.157078178685281889e-05 | ||||||
|  | 1.174325560395078800e-03,2.755298774803674553e-03,5.194387759090383395e-03,9.354521953613973567e-03,1.651171618252517473e-02,2.916966879690554432e-02,5.262163370571950466e-02,9.910396847768351836e-02,2.000000000000000111e-01 | ||||||
|  | 4.160571131359890040e-03,8.527170824088577475e-03,1.466969461393815427e-02,2.443642414582058997e-02,3.975038656808106002e-02,6.331729118004528201e-02,9.842489957479945428e-02,1.474045868235714374e-01,2.059999999999999887e-01 | ||||||
| 
 | 
							
								
								
									
										36
									
								
								tests/data/test_lumped_losses_raman_fiber_config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								tests/data/test_lumped_losses_raman_fiber_config.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | |||||||
|  | { | ||||||
|  |   "uid": "Span1", | ||||||
|  |   "params": { | ||||||
|  |     "length": 80, | ||||||
|  |     "loss_coef": 0.2, | ||||||
|  |     "length_units": "km", | ||||||
|  |     "att_in": 0, | ||||||
|  |     "con_in": 0.5, | ||||||
|  |     "con_out": 0.0, | ||||||
|  |     "lumped_losses": [ | ||||||
|  |       { | ||||||
|  |         "position": 7, | ||||||
|  |         "loss": 0.5 | ||||||
|  |       } | ||||||
|  |     ], | ||||||
|  |     "type_variety": "SSMF", | ||||||
|  |     "dispersion": 0.0000167, | ||||||
|  |     "effective_area": 83e-12, | ||||||
|  |     "pmd_coef": 1.265e-15 | ||||||
|  |   }, | ||||||
|  |   "operational": { | ||||||
|  |     "temperature": 283, | ||||||
|  |     "raman_pumps": [ | ||||||
|  |       { | ||||||
|  |         "power": 0.2, | ||||||
|  |         "frequency": 205000000000000, | ||||||
|  |         "propagation_direction": "counterprop" | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         "power": 0.206, | ||||||
|  |         "frequency": 201000000000000, | ||||||
|  |         "propagation_direction": "counterprop" | ||||||
|  |       } | ||||||
|  |     ] | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										97
									
								
								tests/data/test_raman_fiber_expected_results.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								tests/data/test_raman_fiber_expected_results.csv
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,97 @@ | |||||||
|  | ,Unnamed: 0,signal,ase,nli | ||||||
|  | 0,0,0.00028461768874888705,3.436639817118301e-08,2.1584395398371026e-07 | ||||||
|  | 1,1,0.00028211666293476406,3.423996759499589e-08,2.1809245861954257e-07 | ||||||
|  | 2,2,0.0002796385058453953,3.411427963331182e-08,2.2028548201656645e-07 | ||||||
|  | 3,3,0.0002771829951915728,3.398932824433299e-08,2.224238538437057e-07 | ||||||
|  | 4,4,0.00027338904730863836,3.371109366484941e-08,2.2339638015421542e-07 | ||||||
|  | 5,5,0.0002696478418176822,3.3435235312069656e-08,2.2430128879557504e-07 | ||||||
|  | 6,6,0.00026595862771951147,3.316172589770091e-08,2.2514026889123164e-07 | ||||||
|  | 7,7,0.0002623182345801782,3.289051654795761e-08,2.2591288176837496e-07 | ||||||
|  | 8,8,0.00025872603823298804,3.262158136113203e-08,2.2662073272007013e-07 | ||||||
|  | 9,9,0.0002548422077504841,3.231480491053109e-08,2.269632917207947e-07 | ||||||
|  | 10,10,0.0002510150800727548,3.201089350512762e-08,2.2724305184561305e-07 | ||||||
|  | 11,11,0.0002472372108596339,3.1709697987730424e-08,2.274556638142854e-07 | ||||||
|  | 12,12,0.0002435081184388883,3.1411188710954923e-08,2.2760284870806473e-07 | ||||||
|  | 13,13,0.0002398273228957255,3.1115336193393125e-08,2.2768630096746835e-07 | ||||||
|  | 14,14,0.00023610099948769217,3.081056270085416e-08,2.27617695956038e-07 | ||||||
|  | 15,15,0.00023242489102440902,3.050859262250336e-08,2.274887362838919e-07 | ||||||
|  | 16,16,0.00022879847092097078,3.020939430576677e-08,2.273011122655665e-07 | ||||||
|  | 17,17,0.00022522143236587835,2.991293825364657e-08,2.27056704831033e-07 | ||||||
|  | 18,18,0.00022169324298613107,2.9619193056612953e-08,2.2315585168570266e-07 | ||||||
|  | 19,19,0.0002178178461312317,2.9278097616561043e-08,2.189169855906453e-07 | ||||||
|  | 20,20,0.0002140033759047069,2.8940600865395135e-08,2.1475128288390263e-07 | ||||||
|  | 21,21,0.00021024912752446947,2.8606658136588645e-08,2.1065775386659407e-07 | ||||||
|  | 22,22,0.000206554289175574,2.827622313698371e-08,2.0663530613832196e-07 | ||||||
|  | 23,23,0.00020291805701626135,2.7949249962519028e-08,2.0268286030011824e-07 | ||||||
|  | 24,24,0.00019961589106178864,2.765975998385304e-08,1.9907485701921993e-07 | ||||||
|  | 25,25,0.00019636137150032674,2.7373095433009936e-08,1.9552454239910457e-07 | ||||||
|  | 26,26,0.0001931539326017224,2.7089223372231097e-08,1.9203113225618846e-07 | ||||||
|  | 27,27,0.00018999370973089413,2.68081175642488e-08,1.885945418493717e-07 | ||||||
|  | 28,28,0.00018688010986276862,2.6529745205109403e-08,1.8521396370161997e-07 | ||||||
|  | 29,29,0.00018381254538966195,2.6254073731438793e-08,1.818885993764317e-07 | ||||||
|  | 30,30,0.00018079043504395085,2.5981070886269e-08,1.78617660347401e-07 | ||||||
|  | 31,31,0.00017781329518445636,2.5710706310905614e-08,1.7540045799671345e-07 | ||||||
|  | 32,32,0.00017488055045064023,2.544294811944895e-08,1.7223621637516225e-07 | ||||||
|  | 33,33,0.00017199163096488036,2.5177764647772334e-08,1.691241684952796e-07 | ||||||
|  | 34,34,0.00016923198600435235,2.4926164244345613e-08,1.6614800249846462e-07 | ||||||
|  | 35,35,0.00016651223518287261,2.4676978561810828e-08,1.632195038378843e-07 | ||||||
|  | 36,36,0.00016383188581753214,2.443018036493577e-08,1.6033800467387247e-07 | ||||||
|  | 37,37,0.0001611915388800597,2.418575294396746e-08,1.5725354810318075e-07 | ||||||
|  | 38,38,0.0001585906555197023,2.394366896238391e-08,1.5422386234766858e-07 | ||||||
|  | 39,39,0.00015602870309712287,2.3703901303924173e-08,1.5124806354481474e-07 | ||||||
|  | 40,40,0.0001535051551031788,2.3466423066629146e-08,1.4832528036973196e-07 | ||||||
|  | 41,41,0.0001510212597387019,2.3231240549132765e-08,1.4545635735033158e-07 | ||||||
|  | 42,42,0.00014857641307701306,2.2998325757462813e-08,1.4264034538487909e-07 | ||||||
|  | 43,43,0.00014617002011358969,2.276765094680208e-08,1.3987631140917146e-07 | ||||||
|  | 44,44,0.00014368188097051016,2.252080862505795e-08,1.3704924606778587e-07 | ||||||
|  | 45,45,0.00014123500136325632,2.227648394665253e-08,1.342768563640109e-07 | ||||||
|  | 46,46,0.00013882871459443323,2.2034644371118186e-08,1.31558126246417e-07 | ||||||
|  | 47,47,0.00013646341840215168,2.1795267893415555e-08,1.2889305332810146e-07 | ||||||
|  | 48,48,0.00013413841082142,2.155832207437193e-08,1.2628059500046815e-07 | ||||||
|  | 49,49,0.00013185300210097483,2.132377480769977e-08,1.2371972883222934e-07 | ||||||
|  | 50,50,0.00012960651423053282,2.1091594291962705e-08,1.2120945193769904e-07 | ||||||
|  | 51,51,0.00012739961074346843,2.0861774576065466e-08,1.1875002031242091e-07 | ||||||
|  | 52,52,0.00012523156633255863,2.0634283235397628e-08,1.1634039147633555e-07 | ||||||
|  | 53,53,0.00012310166960708747,2.0409088189365173e-08,1.1397954484148417e-07 | ||||||
|  | 54,54,0.00012096529298347188,2.0178855168888422e-08,1.1162594309222065e-07 | ||||||
|  | 55,55,0.00011886718830718708,1.9950983760858723e-08,1.093208043434055e-07 | ||||||
|  | 56,56,0.00011680664424128133,1.9725440474060072e-08,1.0695583879566178e-07 | ||||||
|  | 57,57,0.00011478396058700633,1.950220202088885e-08,1.0464196732373097e-07 | ||||||
|  | 58,58,0.00011279839933843229,1.9281235055452333e-08,1.0237806316789167e-07 | ||||||
|  | 59,59,0.00011084923776207272,1.906250658388995e-08,1.0016302524437989e-07 | ||||||
|  | 60,60,0.00010893576763351642,1.884598391874928e-08,9.79957771514819e-08 | ||||||
|  | 61,61,0.00010705827573621923,1.8631654017664683e-08,9.587614496435341e-08 | ||||||
|  | 62,62,0.00010521603014069265,1.8419483867548078e-08,9.380304193213288e-08 | ||||||
|  | 63,63,0.00010340831493293095,1.8209440802910146e-08,9.1775407295826e-08 | ||||||
|  | 64,64,0.00010178667717264663,1.8029552937387797e-08,8.992671343771878e-08 | ||||||
|  | 65,65,0.00010019319833745167,1.7851381317094802e-08,8.811583172055121e-08 | ||||||
|  | 66,66,9.86273426809622e-05,1.767490377589294e-08,8.634195328719705e-08 | ||||||
|  | 67,67,9.70886230248071e-05,1.7500098774413897e-08,8.460432022445385e-08 | ||||||
|  | 68,68,9.557652367577673e-05,1.7326944621204857e-08,8.290215772518696e-08 | ||||||
|  | 69,69,9.409053958216297e-05,1.7155419863785074e-08,8.123470846820667e-08 | ||||||
|  | 70,70,9.263017577528553e-05,1.698550325493719e-08,7.960123192429599e-08 | ||||||
|  | 71,71,9.119540203213482e-05,1.681718296074974e-08,7.800139303615196e-08 | ||||||
|  | 72,72,8.978572151582878e-05,1.6650437769918198e-08,7.643446000507212e-08 | ||||||
|  | 73,73,8.840064792008674e-05,1.648524670194174e-08,7.489971794966337e-08 | ||||||
|  | 74,74,8.704752218385389e-05,1.6323921332107853e-08,7.340306015991841e-08 | ||||||
|  | 75,75,8.571782151670807e-05,1.616417166590195e-08,7.228178645083984e-08 | ||||||
|  | 76,76,8.441109599127084e-05,1.6005979385519616e-08,7.117988659258102e-08 | ||||||
|  | 77,77,8.312693723019766e-05,1.584932678267078e-08,7.009701621983393e-08 | ||||||
|  | 78,78,8.186491243372442e-05,1.569419608150936e-08,6.90328103730187e-08 | ||||||
|  | 79,79,8.062459786565112e-05,1.554056978222129e-08,6.798691173543069e-08 | ||||||
|  | 80,80,7.94055784447779e-05,1.538843064058219e-08,6.695897028871753e-08 | ||||||
|  | 81,81,7.820755061857071e-05,1.523776381588298e-08,6.594873006137818e-08 | ||||||
|  | 82,82,7.703011159024537e-05,1.5088552513719166e-08,6.495585139392737e-08 | ||||||
|  | 83,83,7.587286701386211e-05,1.494078021244127e-08,6.398000175307732e-08 | ||||||
|  | 84,84,7.483848702669918e-05,1.481852757489104e-08,6.310775801171533e-08 | ||||||
|  | 85,85,7.382059659354297e-05,1.4697575551136038e-08,6.224941913167962e-08 | ||||||
|  | 86,86,7.281889798107282e-05,1.4577917663325962e-08,6.140473404853674e-08 | ||||||
|  | 87,87,7.183165666349203e-05,1.4459532716368791e-08,6.057224011868445e-08 | ||||||
|  | 88,88,7.08586484091438e-05,1.4342415672865158e-08,5.975174825816752e-08 | ||||||
|  | 89,89,6.989965271824705e-05,1.422656189652791e-08,5.8943072529944956e-08 | ||||||
|  | 90,90,6.895445267562359e-05,1.411196715686287e-08,5.814603001970201e-08 | ||||||
|  | 91,91,6.802197391413278e-05,1.3998609279853771e-08,5.735971476442124e-08 | ||||||
|  | 92,92,6.710204336793658e-05,1.3886485591019257e-08,5.6583980825863337e-08 | ||||||
|  | 93,93,6.619449037899918e-05,1.3775593851234834e-08,5.581868429617485e-08 | ||||||
|  | 94,94,6.515268324911003e-05,1.3628882565600955e-08,5.494017759648076e-08 | ||||||
|  | 95,95,6.412720169535454e-05,1.3483606920728348e-08,5.407543748332493e-08 | ||||||
| 
 | 
| @@ -1,97 +0,0 @@ | |||||||
| ,signal,ase,nli |  | ||||||
| 0,0.0002869472910749756,3.829244288314411e-08,2.1570435023738975e-07 |  | ||||||
| 1,0.0002844264441819097,3.810807396068084e-08,2.1799950841473497e-07 |  | ||||||
| 2,0.00028192866252406385,3.792544000755193e-08,2.2023841125047751e-07 |  | ||||||
| 3,0.0002794537215642667,3.7744517714620316e-08,2.2242189941355056e-07 |  | ||||||
| 4,0.00027562432957345563,3.739256592350871e-08,2.2343448272115905e-07 |  | ||||||
| 5,0.0002718482755003939,3.7044482870002475e-08,2.2437826192962336e-07 |  | ||||||
| 6,0.00026812479793132313,3.670020704375223e-08,2.2525495466693408e-07 |  | ||||||
| 7,0.000264450700138397,3.635954085714981e-08,2.2606415187873477e-07 |  | ||||||
| 8,0.0002608253488030976,3.602242835595967e-08,2.2680748521505387e-07 |  | ||||||
| 9,0.0002569046888856947,3.564392097524325e-08,2.2718285844823122e-07 |  | ||||||
| 10,0.0002530414048172964,3.52696660940159e-08,2.2749429758474536e-07 |  | ||||||
| 11,0.0002492279873569917,3.489974200864255e-08,2.277374766527899e-07 |  | ||||||
| 12,0.00024546394589921574,3.453407358954537e-08,2.2791414400785136e-07 |  | ||||||
| 13,0.00024174879169001578,3.4172586853993816e-08,2.280260208417818e-07 |  | ||||||
| 14,0.00023798746912554602,3.3802283179520985e-08,2.2798420759778034e-07 |  | ||||||
| 15,0.00023427697848580554,3.343627022987542e-08,2.2788101592695744e-07 |  | ||||||
| 16,0.0002306167836320285,3.307447309241581e-08,2.2771816297650914e-07 |  | ||||||
| 17,0.00022700656967539738,3.2716831574363364e-08,2.274975560288182e-07 |  | ||||||
| 18,0.00022344579480967338,3.236327278261661e-08,2.2361822442592406e-07 |  | ||||||
| 19,0.00021953361935365365,3.195819964288877e-08,2.1939761734541424e-07 |  | ||||||
| 20,0.000215683131390894,3.155821693631402e-08,2.152494588710531e-07 |  | ||||||
| 21,0.0002118936126056039,3.116322947665684e-08,2.1117277567387026e-07 |  | ||||||
| 22,0.00020816423698459974,3.0773146233359933e-08,2.0716649124095414e-07 |  | ||||||
| 23,0.000204494186708796,3.0387877710694614e-08,2.0322954179937734e-07 |  | ||||||
| 24,0.0002011608152067422,3.0044038268833097e-08,1.9963693210325328e-07 |  | ||||||
| 25,0.0001978756946189507,2.9704204306604607e-08,1.9610141536963302e-07 |  | ||||||
| 26,0.00019463824873067792,2.9368307297032184e-08,1.9262221997374404e-07 |  | ||||||
| 27,0.00019144860669288407,2.903632861769827e-08,1.8919927457566036e-07 |  | ||||||
| 28,0.00018830616497929743,2.870820070744311e-08,1.8583178406705711e-07 |  | ||||||
| 29,0.0001852103256336822,2.838385708911634e-08,1.8251896218718027e-07 |  | ||||||
| 30,0.0001821604972098109,2.8063232252848876e-08,1.7926003240910756e-07 |  | ||||||
| 31,0.00017915618670059162,2.774625963676283e-08,1.76054318231953e-07 |  | ||||||
| 32,0.00017619680881745593,2.7432875871797347e-08,1.729010553429381e-07 |  | ||||||
| 33,0.0001732817839023698,2.712301856538676e-08,1.6979948820365403e-07 |  | ||||||
| 34,0.0001704966413678542,2.6828122477482957e-08,1.6683312331765736e-07 |  | ||||||
| 35,0.00016775189226190024,2.6536528664560742e-08,1.639139770351803e-07 |  | ||||||
| 36,0.00016504703499518105,2.624818226917535e-08,1.6104139135569604e-07 |  | ||||||
| 37,0.00016238266779776653,2.5963117448579666e-08,1.5795381794641793e-07 |  | ||||||
| 38,0.0001597582427278871,2.568127942199337e-08,1.5492098715709327e-07 |  | ||||||
| 39,0.0001571732182027887,2.5402614261982925e-08,1.5194201541883415e-07 |  | ||||||
| 40,0.00015462705891567335,2.5127068868391087e-08,1.4901603171959048e-07 |  | ||||||
| 41,0.00015212101646395513,2.4854550603641668e-08,1.4614388817380648e-07 |  | ||||||
| 42,0.00014965447757985992,2.4585009902449718e-08,1.4332463586635585e-07 |  | ||||||
| 43,0.0001472268380950584,2.4318397887399997e-08,1.4055734193945962e-07 |  | ||||||
| 44,0.0001447164668892332,2.4034551917480693e-08,1.377259000826997e-07 |  | ||||||
| 45,0.00014224784112376056,2.3753930444781328e-08,1.3494914625940223e-07 |  | ||||||
| 46,0.000139820283675003,2.3476479506890216e-08,1.3222606385781202e-07 |  | ||||||
| 47,0.00013743418748444287,2.3202247900619965e-08,1.295566531341862e-07 |  | ||||||
| 48,0.00013508884015386686,2.2931181973013504e-08,1.2693987096025158e-07 |  | ||||||
| 49,0.00013278354172498307,2.2663228905058608e-08,1.2437469442130953e-07 |  | ||||||
| 50,0.00013051760419724657,2.2398336706395863e-08,1.2186012017917007e-07 |  | ||||||
| 51,0.00012829168984638487,2.2136423459712534e-08,1.1939640981689728e-07 |  | ||||||
| 52,0.00012610506317956756,2.1877440279108582e-08,1.1698252030563078e-07 |  | ||||||
| 53,0.00012395700285919374,2.1621338937233993e-08,1.1461743054419825e-07 |  | ||||||
| 54,0.00012180241033650921,2.136015630373758e-08,1.1225922783040025e-07 |  | ||||||
| 55,0.0001196865090578088,2.11019103466444e-08,1.0994951537260489e-07 |  | ||||||
| 56,0.00011760857776205185,2.0846552296319304e-08,1.0757395097863843e-07 |  | ||||||
| 57,0.00011556891128259512,2.0594154864038522e-08,1.0524972555992818e-07 |  | ||||||
| 58,0.00011356676177304645,2.0344670536408355e-08,1.0297570549834491e-07 |  | ||||||
| 59,0.00011160139690545148,2.009805268169949e-08,1.007507830554809e-07 |  | ||||||
| 60,0.00010967209909252316,1.9854255584746143e-08,9.857387536569294e-08 |  | ||||||
| 61,0.00010777915187088834,1.961321154131787e-08,9.644480679617587e-08 |  | ||||||
| 62,0.00010592181397175025,1.9374877782865603e-08,9.43624842461164e-08 |  | ||||||
| 63,0.00010409936038609485,1.913921236065976e-08,9.232584080120623e-08 |  | ||||||
| 64,0.00010246447558376296,1.8936229484424864e-08,9.046927135292076e-08 |  | ||||||
| 65,0.00010085803630103994,1.873544193319646e-08,8.865067925960422e-08 |  | ||||||
| 66,9.927950010555374e-05,1.8536821682157304e-08,8.686925127148483e-08 |  | ||||||
| 67,9.772837346090753e-05,1.834034757300294e-08,8.512422533827403e-08 |  | ||||||
| 68,9.62041343011343e-05,1.8145993316507615e-08,8.341482250640209e-08 |  | ||||||
| 69,9.470627135912848e-05,1.7953733512786736e-08,8.174028142913557e-08 |  | ||||||
| 70,9.32342835979764e-05,1.776354374489084e-08,8.009985766376519e-08 |  | ||||||
| 71,9.178813743816069e-05,1.757538990695628e-08,7.849321446941075e-08 |  | ||||||
| 72,9.036733009485282e-05,1.7389250225057777e-08,7.691961625609573e-08 |  | ||||||
| 73,8.897136946428169e-05,1.7205104136353174e-08,7.537834446343352e-08 |  | ||||||
| 74,8.760740745801088e-05,1.7025340034280735e-08,7.38751341742058e-08 |  | ||||||
| 75,8.626710469266231e-05,1.6847609082084475e-08,7.274492099364066e-08 |  | ||||||
| 76,8.495000573672366e-05,1.6671897815367364e-08,7.16342744751107e-08 |  | ||||||
| 77,8.365569697520734e-05,1.6498202874185357e-08,7.054284583689086e-08 |  | ||||||
| 78,8.238374036673638e-05,1.6326516066391613e-08,6.94702656996508e-08 |  | ||||||
| 79,8.11337070649851e-05,1.615683240442047e-08,6.84161724378069e-08 |  | ||||||
| 80,7.990517700271111e-05,1.5989150837085435e-08,6.738021182875641e-08 |  | ||||||
| 81,7.869784230919362e-05,1.5823472723367315e-08,6.63621242598539e-08 |  | ||||||
| 82,7.751129541079501e-05,1.5659808141896922e-08,6.536156604375558e-08 |  | ||||||
| 83,7.634513730458697e-05,1.5498175122781168e-08,6.437820072038669e-08 |  | ||||||
| 84,7.530262080974513e-05,1.5364277079429572e-08,6.349909645089698e-08 |  | ||||||
| 85,7.427675504203511e-05,1.523236493234819e-08,6.263403294276124e-08 |  | ||||||
| 86,7.326723873728716e-05,1.510251249079146e-08,6.178275615432246e-08 |  | ||||||
| 87,7.227232864620995e-05,1.4974078108462424e-08,6.094379608687809e-08 |  | ||||||
| 88,7.1291797553153e-05,1.4847055996011248e-08,6.011696114034367e-08 |  | ||||||
| 89,7.032542203609039e-05,1.4721440784517874e-08,5.930206291361685e-08 |  | ||||||
| 90,6.937298231673965e-05,1.4597227547292096e-08,5.849891607818969e-08 |  | ||||||
| 91,6.843339696762385e-05,1.447443282270653e-08,5.7706608718023645e-08 |  | ||||||
| 92,6.750649045006057e-05,1.4353051811356354e-08,5.6924992809748396e-08 |  | ||||||
| 93,6.65920896785063e-05,1.4233080214004659e-08,5.615392239860827e-08 |  | ||||||
| 94,6.554258932109667e-05,1.407504972937325e-08,5.5268928972034444e-08 |  | ||||||
| 95,6.450957734109368e-05,1.3918655180382722e-08,5.439783940506079e-08 |  | ||||||
| 
 | 
							
								
								
									
										38
									
								
								tests/data/test_science_utils_fiber_config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								tests/data/test_science_utils_fiber_config.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | |||||||
|  | { | ||||||
|  |   "uid": "Span1", | ||||||
|  |   "params": { | ||||||
|  |     "length": 80, | ||||||
|  |     "loss_coef": 0.2, | ||||||
|  |     "length_units": "km", | ||||||
|  |     "att_in": 0, | ||||||
|  |     "con_in": 0.5, | ||||||
|  |     "con_out": 0.5, | ||||||
|  |     "type_variety": "SSMF", | ||||||
|  |     "dispersion": 0.0000167, | ||||||
|  |     "effective_area": 83e-12, | ||||||
|  |     "pmd_coef": 1.265e-15 | ||||||
|  |   }, | ||||||
|  |   "operational": { | ||||||
|  |         "temperature": 283, | ||||||
|  |         "raman_pumps": [ | ||||||
|  |           { | ||||||
|  |             "power": 224.403e-3, | ||||||
|  |             "frequency": 205e12, | ||||||
|  |             "propagation_direction": "counterprop" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "power": 231.135e-3, | ||||||
|  |             "frequency": 201e12, | ||||||
|  |             "propagation_direction": "counterprop" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |   "metadata": { | ||||||
|  |     "location": { | ||||||
|  |       "latitude": 1, | ||||||
|  |       "longitude": 0, | ||||||
|  |       "city": null, | ||||||
|  |       "region": "" | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -14,6 +14,7 @@ Transceiver trx_Stockholm | |||||||
|   OSNR ASE (signal bw, dB):  30.98 |   OSNR ASE (signal bw, dB):  30.98 | ||||||
|   CD (ps/nm):                0.00 |   CD (ps/nm):                0.00 | ||||||
|   PMD (ps):                  0.00 |   PMD (ps):                  0.00 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
| Roadm roadm_Stockholm | Roadm roadm_Stockholm | ||||||
|   effective loss (dB):  22.00 |   effective loss (dB):  22.00 | ||||||
|   pch out (dBm):        -20.00 |   pch out (dBm):        -20.00 | ||||||
| @@ -229,7 +230,8 @@ Transceiver trx_Gothenburg | |||||||
|   OSNR ASE (0.1nm, dB):      21.20 |   OSNR ASE (0.1nm, dB):      21.20 | ||||||
|   OSNR ASE (signal bw, dB):  17.18 |   OSNR ASE (signal bw, dB):  17.18 | ||||||
|   CD (ps/nm):                8350.42 |   CD (ps/nm):                8350.42 | ||||||
|   PMD (ps):                  0.89 |   PMD (ps):                  7.99 | ||||||
|  |   PDL (dB):                  3.74 | ||||||
|  |  | ||||||
| Transmission result for input power = 2.00 dBm: | Transmission result for input power = 2.00 dBm: | ||||||
|   Final GSNR (0.1 nm): [1;36;40m18.90 dB[0m |   Final GSNR (0.1 nm): [1;36;40m18.90 dB[0m | ||||||
|   | |||||||
| @@ -14,6 +14,7 @@ Transceiver trx_Stockholm | |||||||
|   OSNR ASE (signal bw, dB):  30.98 |   OSNR ASE (signal bw, dB):  30.98 | ||||||
|   CD (ps/nm):                0.00 |   CD (ps/nm):                0.00 | ||||||
|   PMD (ps):                  0.00 |   PMD (ps):                  0.00 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
| Roadm roadm_Stockholm | Roadm roadm_Stockholm | ||||||
|   effective loss (dB):  22.00 |   effective loss (dB):  22.00 | ||||||
|   pch out (dBm):        -20.00 |   pch out (dBm):        -20.00 | ||||||
| @@ -229,7 +230,8 @@ Transceiver trx_Gothenburg | |||||||
|   OSNR ASE (0.1nm, dB):      21.84 |   OSNR ASE (0.1nm, dB):      21.84 | ||||||
|   OSNR ASE (signal bw, dB):  17.82 |   OSNR ASE (signal bw, dB):  17.82 | ||||||
|   CD (ps/nm):                8350.42 |   CD (ps/nm):                8350.42 | ||||||
|   PMD (ps):                  0.89 |   PMD (ps):                  7.99 | ||||||
|  |   PDL (dB):                  3.74 | ||||||
|  |  | ||||||
| Transmission result for input power = 2.00 dBm: | Transmission result for input power = 2.00 dBm: | ||||||
|   Final GSNR (0.1 nm): [1;36;40m19.27 dB[0m |   Final GSNR (0.1 nm): [1;36;40m19.27 dB[0m | ||||||
|   | |||||||
| @@ -146,7 +146,7 @@ req id   demand                                GSNR@bandwidth A-Z (Z-A)   GSNR@0 | |||||||
| 0       trx Lorient_KMA to trx Vannes_KBE :             24.83                    28.92                      14                     mode 1                   100.0                      1                     (-284,4)         | 0       trx Lorient_KMA to trx Vannes_KBE :             24.83                    28.92                      14                     mode 1                   100.0                      1                     (-284,4)         | ||||||
| 1       trx Brest_KLA to trx Vannes_KBE :               17.75                    21.83                      14                     mode 1                   200.0                      2                     (-272,8)         | 1       trx Brest_KLA to trx Vannes_KBE :               17.75                    21.83                      14                     mode 1                   200.0                      2                     (-272,8)         | ||||||
| 3       trx Lannion_CAS to trx Rennes_STA :             22.21                    26.29                      13                     mode 1                    60.0                      1                     (-284,4)         | 3       trx Lannion_CAS to trx Rennes_STA :             22.21                    26.29                      13                     mode 1                    60.0                      1                     (-284,4)         | ||||||
| 4       trx Rennes_STA to trx Lannion_CAS :             16.07                    23.29                      17                     mode 2                   150.0                      1                     (-258,6)         | 4       trx Rennes_STA to trx Lannion_CAS :             16.06                    23.29                      17                     mode 2                   150.0                      1                     (-258,6)         | ||||||
| 5       trx Rennes_STA to trx Lannion_CAS :             20.31                    27.54                      17                     mode 2                    20.0                      1                     (-274,6)         | 5       trx Rennes_STA to trx Lannion_CAS :             20.31                    27.54                      17                     mode 2                    20.0                      1                     (-274,6)         | ||||||
| 7 | 6   trx Lannion_CAS to trx Lorient_KMA :            19.52                    23.61                      14                     mode 1                   700.0                      7                    (-224,28)         | 7 | 6   trx Lannion_CAS to trx Lorient_KMA :            19.52                    23.61                      14                     mode 1                   700.0                      7                    (-224,28)         | ||||||
| 7b      trx Lannion_CAS to trx Lorient_KMA :            19.61                    23.69                      14                     mode 1                   400.0                      4                    (-172,24)         | 7b      trx Lannion_CAS to trx Lorient_KMA :            19.61                    23.69                      14                     mode 1                   400.0                      4                    (-172,24)         | ||||||
|   | |||||||
| @@ -14,6 +14,7 @@ Transceiver Site_A | |||||||
|   OSNR ASE (signal bw, dB):  35.92 |   OSNR ASE (signal bw, dB):  35.92 | ||||||
|   CD (ps/nm):                0.00 |   CD (ps/nm):                0.00 | ||||||
|   PMD (ps):                  0.00 |   PMD (ps):                  0.00 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
| Fiber          Span1 | Fiber          Span1 | ||||||
|   type_variety:                SSMF |   type_variety:                SSMF | ||||||
|   length (km):                 80.00 |   length (km):                 80.00 | ||||||
| @@ -42,6 +43,7 @@ Transceiver Site_B | |||||||
|   OSNR ASE (signal bw, dB):  29.21 |   OSNR ASE (signal bw, dB):  29.21 | ||||||
|   CD (ps/nm):                1336.00 |   CD (ps/nm):                1336.00 | ||||||
|   PMD (ps):                  0.36 |   PMD (ps):                  0.36 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
|  |  | ||||||
| Transmission result for input power = 0.00 dBm: | Transmission result for input power = 0.00 dBm: | ||||||
|   Final GSNR (0.1 nm): [1;36;40m31.17 dB[0m |   Final GSNR (0.1 nm): [1;36;40m31.17 dB[0m | ||||||
|   | |||||||
| @@ -14,6 +14,7 @@ Transceiver Site_A | |||||||
|   OSNR ASE (signal bw, dB):  35.92 |   OSNR ASE (signal bw, dB):  35.92 | ||||||
|   CD (ps/nm):                0.00 |   CD (ps/nm):                0.00 | ||||||
|   PMD (ps):                  0.00 |   PMD (ps):                  0.00 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
| RamanFiber          Span1 | RamanFiber          Span1 | ||||||
|   type_variety:                SSMF |   type_variety:                SSMF | ||||||
|   length (km):                 80.00 |   length (km):                 80.00 | ||||||
| @@ -21,109 +22,112 @@ RamanFiber          Span1 | |||||||
|   total loss (dB):             17.00 |   total loss (dB):             17.00 | ||||||
|   (includes conn loss (dB) in: 0.50 out: 0.50) |   (includes conn loss (dB) in: 0.50 out: 0.50) | ||||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) |   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||||
|   pch out (dBm): -7.74 |   pch out (dBm): -7.77 | ||||||
|  | Fused Fused1 | ||||||
|  |   loss (dB): 0.00 | ||||||
| Edfa Edfa1 | Edfa Edfa1 | ||||||
|   type_variety:           std_low_gain |   type_variety:           std_low_gain | ||||||
|   effective gain(dB):     5.74 |   effective gain(dB):     5.77 | ||||||
|   (before att_in and before output VOA) |   (before att_in and before output VOA) | ||||||
|   noise figure (dB):      13.26 |   noise figure (dB):      13.23 | ||||||
|   (including att_in) |   (including att_in) | ||||||
|   pad att_in (dB):        2.26 |   pad att_in (dB):        2.23 | ||||||
|   Power In (dBm):         11.07 |   Power In (dBm):         11.04 | ||||||
|   Power Out (dBm):        16.82 |   Power Out (dBm):        16.81 | ||||||
|   Delta_P (dB):           -2.00 |   Delta_P (dB):           -2.00 | ||||||
|   target pch (dBm):       -2.00 |   target pch (dBm):       -2.00 | ||||||
|   effective pch (dBm):    -2.00 |   effective pch (dBm):    -2.00 | ||||||
|   output VOA (dB):        0.00 |   output VOA (dB):        0.00 | ||||||
| Transceiver Site_B | Transceiver Site_B | ||||||
|   GSNR (0.1nm, dB):          31.43 |   GSNR (0.1nm, dB):          31.44 | ||||||
|   GSNR (signal bw, dB):      27.35 |   GSNR (signal bw, dB):      27.36 | ||||||
|   OSNR ASE (0.1nm, dB):      34.18 |   OSNR ASE (0.1nm, dB):      34.21 | ||||||
|   OSNR ASE (signal bw, dB):  30.10 |   OSNR ASE (signal bw, dB):  30.13 | ||||||
|   CD (ps/nm):                1336.00 |   CD (ps/nm):                1336.00 | ||||||
|   PMD (ps):                  0.36 |   PMD (ps):                  0.36 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
|  |  | ||||||
| Transmission result for input power = 0.00 dBm: | Transmission result for input power = 0.00 dBm: | ||||||
|   Final GSNR (0.1 nm): [1;36;40m31.43 dB[0m |   Final GSNR (0.1 nm): [1;36;40m31.44 dB[0m | ||||||
|  |  | ||||||
| The GSNR per channel at the end of the line is: | The GSNR per channel at the end of the line is: | ||||||
| Ch. #   Channel frequency (THz)       Channel power (dBm)    OSNR ASE (signal bw, dB)     SNR NLI (signal bw, dB)        GSNR (signal bw, dB) | Ch. #   Channel frequency (THz)       Channel power (dBm)    OSNR ASE (signal bw, dB)     SNR NLI (signal bw, dB)        GSNR (signal bw, dB) | ||||||
|     1                    191.35                      0.21                       31.56                       31.47                       28.50 |     1                    191.35                      0.21                       31.62                       31.43                       28.52 | ||||||
|     2                    191.40                      0.17                       31.54                       31.38                       28.45 |     2                    191.40                      0.17                       31.60                       31.35                       28.46 | ||||||
|     3                    191.45                      0.14                       31.52                       31.30                       28.40 |     3                    191.45                      0.13                       31.58                       31.26                       28.41 | ||||||
|     4                    191.50                      0.10                       31.50                       31.22                       28.34 |     4                    191.50                      0.09                       31.56                       31.18                       28.36 | ||||||
|     5                    191.55                      0.04                       31.47                       31.14                       28.29 |     5                    191.55                      0.03                       31.53                       31.10                       28.30 | ||||||
|     6                    191.60                     -0.02                       31.44                       31.06                       28.23 |     6                    191.60                     -0.02                       31.50                       31.02                       28.24 | ||||||
|     7                    191.65                     -0.08                       31.41                       30.98                       28.18 |     7                    191.65                     -0.08                       31.46                       30.94                       28.19 | ||||||
|     8                    191.70                     -0.14                       31.37                       30.90                       28.12 |     8                    191.70                     -0.14                       31.43                       30.87                       28.13 | ||||||
|     9                    191.75                     -0.20                       31.34                       30.83                       28.07 |     9                    191.75                     -0.20                       31.40                       30.79                       28.08 | ||||||
|    10                    191.80                     -0.26                       31.31                       30.75                       28.01 |    10                    191.80                     -0.27                       31.37                       30.72                       28.02 | ||||||
|    11                    191.85                     -0.33                       31.27                       30.68                       27.96 |    11                    191.85                     -0.33                       31.33                       30.65                       27.97 | ||||||
|    12                    191.90                     -0.39                       31.24                       30.61                       27.90 |    12                    191.90                     -0.40                       31.29                       30.58                       27.91 | ||||||
|    13                    191.95                     -0.46                       31.20                       30.54                       27.85 |    13                    191.95                     -0.46                       31.26                       30.51                       27.86 | ||||||
|    14                    192.00                     -0.52                       31.17                       30.47                       27.79 |    14                    192.00                     -0.53                       31.22                       30.44                       27.80 | ||||||
|    15                    192.05                     -0.59                       31.13                       30.40                       27.74 |    15                    192.05                     -0.59                       31.18                       30.37                       27.75 | ||||||
|    16                    192.10                     -0.66                       31.10                       30.33                       27.69 |    16                    192.10                     -0.66                       31.15                       30.30                       27.69 | ||||||
|    17                    192.15                     -0.72                       31.06                       30.26                       27.63 |    17                    192.15                     -0.73                       31.11                       30.24                       27.64 | ||||||
|    18                    192.20                     -0.79                       31.02                       30.20                       27.58 |    18                    192.20                     -0.80                       31.07                       30.17                       27.59 | ||||||
|    19                    192.25                     -0.86                       30.98                       30.21                       27.57 |    19                    192.25                     -0.86                       31.03                       30.18                       27.57 | ||||||
|    20                    192.30                     -0.94                       30.94                       30.21                       27.55 |    20                    192.30                     -0.94                       30.99                       30.19                       27.56 | ||||||
|    21                    192.35                     -1.01                       30.90                       30.22                       27.54 |    21                    192.35                     -1.02                       30.94                       30.20                       27.54 | ||||||
|    22                    192.40                     -1.09                       30.86                       30.23                       27.52 |    22                    192.40                     -1.09                       30.90                       30.20                       27.53 | ||||||
|    23                    192.45                     -1.16                       30.81                       30.23                       27.50 |    23                    192.45                     -1.17                       30.86                       30.21                       27.51 | ||||||
|    24                    192.50                     -1.24                       30.77                       30.24                       27.49 |    24                    192.50                     -1.24                       30.81                       30.22                       27.50 | ||||||
|    25                    192.55                     -1.31                       30.73                       30.25                       27.47 |    25                    192.55                     -1.31                       30.77                       30.23                       27.48 | ||||||
|    26                    192.60                     -1.38                       30.69                       30.25                       27.46 |    26                    192.60                     -1.38                       30.73                       30.23                       27.46 | ||||||
|    27                    192.65                     -1.45                       30.65                       30.26                       27.44 |    27                    192.65                     -1.45                       30.69                       30.24                       27.45 | ||||||
|    28                    192.70                     -1.52                       30.61                       30.27                       27.42 |    28                    192.70                     -1.52                       30.65                       30.25                       27.43 | ||||||
|    29                    192.75                     -1.59                       30.56                       30.28                       27.41 |    29                    192.75                     -1.59                       30.60                       30.26                       27.42 | ||||||
|    30                    192.80                     -1.66                       30.52                       30.28                       27.39 |    30                    192.80                     -1.67                       30.56                       30.27                       27.40 | ||||||
|    31                    192.85                     -1.73                       30.48                       30.29                       27.37 |    31                    192.85                     -1.74                       30.52                       30.27                       27.38 | ||||||
|    32                    192.90                     -1.80                       30.44                       30.30                       27.36 |    32                    192.90                     -1.81                       30.47                       30.28                       27.37 | ||||||
|    33                    192.95                     -1.87                       30.39                       30.30                       27.34 |    33                    192.95                     -1.88                       30.43                       30.29                       27.35 | ||||||
|    34                    193.00                     -1.94                       30.35                       30.31                       27.32 |    34                    193.00                     -1.95                       30.39                       30.30                       27.33 | ||||||
|    35                    193.05                     -2.01                       30.31                       30.32                       27.30 |    35                    193.05                     -2.02                       30.34                       30.30                       27.31 | ||||||
|    36                    193.10                     -2.08                       30.27                       30.33                       27.29 |    36                    193.10                     -2.08                       30.30                       30.31                       27.30 | ||||||
|    37                    193.15                     -2.15                       30.22                       30.33                       27.27 |    37                    193.15                     -2.15                       30.26                       30.32                       27.28 | ||||||
|    38                    193.20                     -2.22                       30.18                       30.35                       27.25 |    38                    193.20                     -2.22                       30.21                       30.34                       27.26 | ||||||
|    39                    193.25                     -2.29                       30.14                       30.37                       27.24 |    39                    193.25                     -2.29                       30.17                       30.36                       27.25 | ||||||
|    40                    193.30                     -2.36                       30.09                       30.39                       27.23 |    40                    193.30                     -2.36                       30.13                       30.37                       27.24 | ||||||
|    41                    193.35                     -2.43                       30.05                       30.40                       27.21 |    41                    193.35                     -2.43                       30.08                       30.39                       27.22 | ||||||
|    42                    193.40                     -2.49                       30.01                       30.42                       27.20 |    42                    193.40                     -2.50                       30.04                       30.41                       27.21 | ||||||
|    43                    193.45                     -2.56                       29.96                       30.44                       27.18 |    43                    193.45                     -2.56                       29.99                       30.43                       27.19 | ||||||
|    44                    193.50                     -2.63                       29.92                       30.46                       27.17 |    44                    193.50                     -2.63                       29.95                       30.44                       27.18 | ||||||
|    45                    193.55                     -2.70                       29.87                       30.47                       27.15 |    45                    193.55                     -2.70                       29.90                       30.46                       27.16 | ||||||
|    46                    193.60                     -2.78                       29.83                       30.49                       27.13 |    46                    193.60                     -2.78                       29.85                       30.48                       27.15 | ||||||
|    47                    193.65                     -2.85                       29.78                       30.51                       27.12 |    47                    193.65                     -2.85                       29.80                       30.50                       27.13 | ||||||
|    48                    193.70                     -2.92                       29.73                       30.53                       27.10 |    48                    193.70                     -2.92                       29.76                       30.52                       27.11 | ||||||
|    49                    193.75                     -2.99                       29.68                       30.54                       27.08 |    49                    193.75                     -2.99                       29.71                       30.54                       27.09 | ||||||
|    50                    193.80                     -3.06                       29.64                       30.56                       27.06 |    50                    193.80                     -3.06                       29.66                       30.55                       27.07 | ||||||
|    51                    193.85                     -3.14                       29.59                       30.58                       27.05 |    51                    193.85                     -3.14                       29.61                       30.57                       27.06 | ||||||
|    52                    193.90                     -3.21                       29.54                       30.60                       27.03 |    52                    193.90                     -3.21                       29.56                       30.59                       27.04 | ||||||
|    53                    193.95                     -3.28                       29.49                       30.62                       27.01 |    53                    193.95                     -3.28                       29.52                       30.61                       27.02 | ||||||
|    54                    194.00                     -3.35                       29.44                       30.64                       26.99 |    54                    194.00                     -3.35                       29.47                       30.63                       27.00 | ||||||
|    55                    194.05                     -3.42                       29.39                       30.65                       26.97 |    55                    194.05                     -3.42                       29.42                       30.65                       26.98 | ||||||
|    56                    194.10                     -3.50                       29.34                       30.67                       26.95 |    56                    194.10                     -3.50                       29.37                       30.67                       26.96 | ||||||
|    57                    194.15                     -3.57                       29.29                       30.73                       26.94 |    57                    194.15                     -3.57                       29.32                       30.72                       26.95 | ||||||
|    58                    194.20                     -3.64                       29.24                       30.79                       26.94 |    58                    194.20                     -3.64                       29.26                       30.78                       26.95 | ||||||
|    59                    194.25                     -3.72                       29.19                       30.85                       26.93 |    59                    194.25                     -3.72                       29.21                       30.84                       26.94 | ||||||
|    60                    194.30                     -3.79                       29.14                       30.91                       26.93 |    60                    194.30                     -3.79                       29.16                       30.90                       26.94 | ||||||
|    61                    194.35                     -3.86                       29.09                       30.97                       26.92 |    61                    194.35                     -3.86                       29.11                       30.96                       26.93 | ||||||
|    62                    194.40                     -3.93                       29.04                       31.03                       26.91 |    62                    194.40                     -3.93                       29.06                       31.02                       26.92 | ||||||
|    63                    194.45                     -4.01                       28.99                       31.09                       26.90 |    63                    194.45                     -4.01                       29.01                       31.09                       26.91 | ||||||
|    64                    194.50                     -4.08                       28.94                       31.15                       26.90 |    64                    194.50                     -4.08                       28.96                       31.15                       26.91 | ||||||
|    65                    194.55                     -4.14                       28.89                       31.22                       26.89 |    65                    194.55                     -4.14                       28.91                       31.21                       26.90 | ||||||
|    66                    194.60                     -4.21                       28.85                       31.28                       26.88 |    66                    194.60                     -4.21                       28.86                       31.28                       26.90 | ||||||
|    67                    194.65                     -4.28                       28.80                       31.35                       26.88 |    67                    194.65                     -4.27                       28.82                       31.34                       26.89 | ||||||
|    68                    194.70                     -4.34                       28.75                       31.41                       26.87 |    68                    194.70                     -4.34                       28.77                       31.41                       26.88 | ||||||
|    69                    194.75                     -4.41                       28.70                       31.48                       26.86 |    69                    194.75                     -4.41                       28.72                       31.48                       26.88 | ||||||
|    70                    194.80                     -4.47                       28.66                       31.55                       26.86 |    70                    194.80                     -4.47                       28.67                       31.55                       26.87 | ||||||
|    71                    194.85                     -4.54                       28.61                       31.62                       26.85 |    71                    194.85                     -4.54                       28.63                       31.62                       26.86 | ||||||
|    72                    194.90                     -4.60                       28.56                       31.69                       26.84 |    72                    194.90                     -4.60                       28.58                       31.69                       26.85 | ||||||
|    73                    194.95                     -4.67                       28.51                       31.77                       26.83 |    73                    194.95                     -4.67                       28.53                       31.76                       26.84 | ||||||
|    74                    195.00                     -4.73                       28.47                       31.84                       26.82 |    74                    195.00                     -4.73                       28.48                       31.84                       26.83 | ||||||
|    75                    195.05                     -4.80                       28.42                       31.91                       26.81 |    75                    195.05                     -4.80                       28.43                       31.91                       26.82 | ||||||
|    76                    195.10                     -4.86                       28.37                       31.91                       26.78 |    76                    195.10                     -4.86                       28.38                       31.91                       26.79 | ||||||
|  |  | ||||||
| (No source node specified: picked Site_A) | (No source node specified: picked Site_A) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -250,6 +250,7 @@ Transceiver trx Lannion_CAS | |||||||
|   OSNR ASE (signal bw, dB):  95.92 |   OSNR ASE (signal bw, dB):  95.92 | ||||||
|   CD (ps/nm):                0.00 |   CD (ps/nm):                0.00 | ||||||
|   PMD (ps):                  0.00 |   PMD (ps):                  0.00 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
| Roadm roadm Lannion_CAS | Roadm roadm Lannion_CAS | ||||||
|   effective loss (dB):  23.00 |   effective loss (dB):  23.00 | ||||||
|   pch out (dBm):        -20.00 |   pch out (dBm):        -20.00 | ||||||
| @@ -296,19 +297,19 @@ Fiber          fiber (Loudeac → Lorient_KMA)-F054 | |||||||
|   pch out (dBm): -26.82 |   pch out (dBm): -26.82 | ||||||
| Edfa west edfa in Lorient_KMA to Loudeac | Edfa west edfa in Lorient_KMA to Loudeac | ||||||
|   type_variety:           test |   type_variety:           test | ||||||
|   effective gain(dB):     28.00 |   effective gain(dB):     27.99 | ||||||
|   (before att_in and before output VOA) |   (before att_in and before output VOA) | ||||||
|   noise figure (dB):      5.76 |   noise figure (dB):      5.76 | ||||||
|   (including att_in) |   (including att_in) | ||||||
|   pad att_in (dB):        0.00 |   pad att_in (dB):        0.00 | ||||||
|   Power In (dBm):         -6.99 |   Power In (dBm):         -6.99 | ||||||
|   Power Out (dBm):        21.04 |   Power Out (dBm):        21.03 | ||||||
|   Delta_P (dB):           -1.82 |   Delta_P (dB):           -1.82 | ||||||
|   target pch (dBm):       1.18 |   target pch (dBm):       1.18 | ||||||
|   effective pch (dBm):    1.18 |   effective pch (dBm):    1.17 | ||||||
|   output VOA (dB):        0.00 |   output VOA (dB):        0.00 | ||||||
| Roadm roadm Lorient_KMA | Roadm roadm Lorient_KMA | ||||||
|   effective loss (dB):  21.18 |   effective loss (dB):  21.17 | ||||||
|   pch out (dBm):        -20.00 |   pch out (dBm):        -20.00 | ||||||
| Transceiver trx Lorient_KMA | Transceiver trx Lorient_KMA | ||||||
|   GSNR (0.1nm, dB):          23.94 |   GSNR (0.1nm, dB):          23.94 | ||||||
| @@ -317,6 +318,7 @@ Transceiver trx Lorient_KMA | |||||||
|   OSNR ASE (signal bw, dB):  20.20 |   OSNR ASE (signal bw, dB):  20.20 | ||||||
|   CD (ps/nm):                2171.00 |   CD (ps/nm):                2171.00 | ||||||
|   PMD (ps):                  0.46 |   PMD (ps):                  0.46 | ||||||
|  |   PDL (dB):                  0.00 | ||||||
|  |  | ||||||
| Transmission result for input power = 3.00 dBm: | Transmission result for input power = 3.00 dBm: | ||||||
|   Final GSNR (0.1 nm): [1;36;40m23.94 dB[0m |   Final GSNR (0.1 nm): [1;36;40m23.94 dB[0m | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								tests/requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/requirements.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | pytest>=6.2.5,<7 | ||||||
| @@ -80,13 +80,12 @@ def si(nch_and_spacing, bw): | |||||||
| def test_variable_gain_nf(gain, nf_expected, setup_edfa_variable_gain, si): | def test_variable_gain_nf(gain, nf_expected, setup_edfa_variable_gain, si): | ||||||
|     """=> unitary test for variable gain model Edfa._calc_nf() (and Edfa.interpol_params)""" |     """=> unitary test for variable gain model Edfa._calc_nf() (and Edfa.interpol_params)""" | ||||||
|     edfa = setup_edfa_variable_gain |     edfa = setup_edfa_variable_gain | ||||||
|     frequencies = array([c.frequency for c in si.carriers]) |     si.signal /= db2lin(gain) | ||||||
|     pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers]) |     si.nli /= db2lin(gain) | ||||||
|     pin = pin / db2lin(gain) |     si.ase /= db2lin(gain) | ||||||
|     baud_rates = array([c.baud_rate for c in si.carriers]) |  | ||||||
|     edfa.operational.gain_target = gain |     edfa.operational.gain_target = gain | ||||||
|     pref = Pref(0, -gain, lin2db(len(frequencies))) |     si.pref = si.pref._replace(p_span0=0, p_spani=-gain, neq_ch=lin2db(si.number_of_channels)) | ||||||
|     edfa.interpol_params(frequencies, pin, baud_rates, pref) |     edfa.interpol_params(si) | ||||||
|     result = edfa.nf |     result = edfa.nf | ||||||
|     assert pytest.approx(nf_expected, abs=0.01) == result[0] |     assert pytest.approx(nf_expected, abs=0.01) == result[0] | ||||||
|  |  | ||||||
| @@ -95,23 +94,20 @@ def test_variable_gain_nf(gain, nf_expected, setup_edfa_variable_gain, si): | |||||||
| def test_fixed_gain_nf(gain, nf_expected, setup_edfa_fixed_gain, si): | def test_fixed_gain_nf(gain, nf_expected, setup_edfa_fixed_gain, si): | ||||||
|     """=> unitary test for fixed gain model Edfa._calc_nf() (and Edfa.interpol_params)""" |     """=> unitary test for fixed gain model Edfa._calc_nf() (and Edfa.interpol_params)""" | ||||||
|     edfa = setup_edfa_fixed_gain |     edfa = setup_edfa_fixed_gain | ||||||
|     frequencies = array([c.frequency for c in si.carriers]) |     si.signal /= db2lin(gain) | ||||||
|     pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers]) |     si.nli /= db2lin(gain) | ||||||
|     pin = pin / db2lin(gain) |     si.ase /= db2lin(gain) | ||||||
|     baud_rates = array([c.baud_rate for c in si.carriers]) |  | ||||||
|     edfa.operational.gain_target = gain |     edfa.operational.gain_target = gain | ||||||
|     pref = Pref(0, -gain, lin2db(len(frequencies))) |     si.pref = si.pref._replace(p_span0=0, p_spani=-gain, neq_ch=lin2db(si.number_of_channels)) | ||||||
|     edfa.interpol_params(frequencies, pin, baud_rates, pref) |     edfa.interpol_params(si) | ||||||
|  |  | ||||||
|     assert pytest.approx(nf_expected, abs=0.01) == edfa.nf[0] |     assert pytest.approx(nf_expected, abs=0.01) == edfa.nf[0] | ||||||
|  |  | ||||||
|  |  | ||||||
| def test_si(si, nch_and_spacing): | def test_si(si, nch_and_spacing): | ||||||
|     """basic total power check of the channel comb generation""" |     """basic total power check of the channel comb generation""" | ||||||
|     nb_channel = nch_and_spacing[0] |     nb_channel = nch_and_spacing[0] | ||||||
|     pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers]) |     p_tot = sum(si.signal + si.ase + si.nli) | ||||||
|     p_tot = pin.sum() |     expected_p_tot = si.signal[0] * nb_channel | ||||||
|     expected_p_tot = si.carriers[0].power.signal * nb_channel |  | ||||||
|     assert pytest.approx(expected_p_tot, abs=0.01) == p_tot |     assert pytest.approx(expected_p_tot, abs=0.01) == p_tot | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -122,14 +118,13 @@ def test_compare_nf_models(gain, setup_edfa_variable_gain, si): | |||||||
|      between gain_min and gain_flatmax some discrepancy is expected but target < 0.5dB |      between gain_min and gain_flatmax some discrepancy is expected but target < 0.5dB | ||||||
|      => unitary test for Edfa._calc_nf (and Edfa.interpol_params)""" |      => unitary test for Edfa._calc_nf (and Edfa.interpol_params)""" | ||||||
|     edfa = setup_edfa_variable_gain |     edfa = setup_edfa_variable_gain | ||||||
|     frequencies = array([c.frequency for c in si.carriers]) |     si.signal /= db2lin(gain) | ||||||
|     pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers]) |     si.nli /= db2lin(gain) | ||||||
|     pin = pin / db2lin(gain) |     si.ase /= db2lin(gain) | ||||||
|     baud_rates = array([c.baud_rate for c in si.carriers]) |  | ||||||
|     edfa.operational.gain_target = gain |     edfa.operational.gain_target = gain | ||||||
|     # edfa is variable gain type |     # edfa is variable gain type | ||||||
|     pref = Pref(0, -gain, lin2db(len(frequencies))) |     si.pref = si.pref._replace(p_span0=0, p_spani=-gain, neq_ch=lin2db(si.number_of_channels)) | ||||||
|     edfa.interpol_params(frequencies, pin, baud_rates, pref) |     edfa.interpol_params(si) | ||||||
|     nf_model = edfa.nf[0] |     nf_model = edfa.nf[0] | ||||||
|  |  | ||||||
|     # change edfa type variety to a polynomial |     # change edfa type variety to a polynomial | ||||||
| @@ -155,7 +150,7 @@ def test_compare_nf_models(gain, setup_edfa_variable_gain, si): | |||||||
|     edfa = Edfa(**el_config) |     edfa = Edfa(**el_config) | ||||||
|  |  | ||||||
|     # edfa is variable gain type |     # edfa is variable gain type | ||||||
|     edfa.interpol_params(frequencies, pin, baud_rates, pref) |     edfa.interpol_params(si) | ||||||
|     nf_poly = edfa.nf[0] |     nf_poly = edfa.nf[0] | ||||||
|     print(nf_poly, nf_model) |     print(nf_poly, nf_model) | ||||||
|     assert pytest.approx(nf_model, abs=0.5) == nf_poly |     assert pytest.approx(nf_model, abs=0.5) == nf_poly | ||||||
| @@ -183,21 +178,16 @@ def test_ase_noise(gain, si, setup_trx, bw): | |||||||
|     si = span(si) |     si = span(si) | ||||||
|     print(span) |     print(span) | ||||||
|  |  | ||||||
|     frequencies = array([c.frequency for c in si.carriers]) |     si.pref = si.pref._replace(p_span0=0, p_spani=-gain, neq_ch=lin2db(si.number_of_channels)) | ||||||
|     pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers]) |     edfa.interpol_params(si) | ||||||
|     baud_rates = array([c.baud_rate for c in si.carriers]) |  | ||||||
|     pref = Pref(0, -gain, lin2db(len(frequencies))) |  | ||||||
|     edfa.interpol_params(frequencies, pin, baud_rates, pref) |  | ||||||
|     nf = edfa.nf |     nf = edfa.nf | ||||||
|     print('nf', nf) |     print('nf', nf) | ||||||
|     pin = lin2db(pin[0] * 1e3) |     pin = lin2db((si.signal[0] + si.ase[0] + si.nli[0]) * 1e3) | ||||||
|     osnr_expected = pin - nf[0] + 58 |     osnr_expected = pin - nf[0] + 58 | ||||||
|  |  | ||||||
|     si = edfa(si) |     si = edfa(si) | ||||||
|     print(edfa) |     print(edfa) | ||||||
|     pout = array([c.power.signal for c in si.carriers]) |     osnr = lin2db(si.signal[0] / si.ase[0]) - lin2db(12.5e9 / bw) | ||||||
|     pase = array([c.power.ase for c in si.carriers]) |  | ||||||
|     osnr = lin2db(pout[0] / pase[0]) - lin2db(12.5e9 / bw) |  | ||||||
|     assert pytest.approx(osnr_expected, abs=0.01) == osnr |     assert pytest.approx(osnr_expected, abs=0.01) == osnr | ||||||
|  |  | ||||||
|     trx = setup_trx |     trx = setup_trx | ||||||
|   | |||||||
							
								
								
									
										50
									
								
								tests/test_info.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								tests/test_info.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | |||||||
|  | #!/usr/bin/env python3 | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
|  | import pytest | ||||||
|  | from numpy import array, zeros, ones | ||||||
|  | from numpy.testing import assert_array_equal | ||||||
|  |  | ||||||
|  | from gnpy.core.info import create_arbitrary_spectral_information | ||||||
|  | from gnpy.core.exceptions import SpectrumError | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def test_create_arbitrary_spectral_information(): | ||||||
|  |     si = create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], | ||||||
|  |                                                baud_rate=32e9, signal=[1, 1, 1]) | ||||||
|  |     assert_array_equal(si.baud_rate, array([32e9, 32e9, 32e9])) | ||||||
|  |     assert_array_equal(si.slot_width, array([37.5e9, 37.5e9, 37.5e9])) | ||||||
|  |     assert_array_equal(si.signal, ones(3)) | ||||||
|  |     assert_array_equal(si.nli, zeros(3)) | ||||||
|  |     assert_array_equal(si.ase, zeros(3)) | ||||||
|  |     assert_array_equal(si.roll_off, zeros(3)) | ||||||
|  |     assert_array_equal(si.chromatic_dispersion, zeros(3)) | ||||||
|  |     assert_array_equal(si.pmd, zeros(3)) | ||||||
|  |     assert_array_equal(si.channel_number, array([1, 2, 3])) | ||||||
|  |     assert_array_equal(si.number_of_channels, 3) | ||||||
|  |     assert_array_equal(si.df, array([[0, 50e9, 100e9], [-50e9, 0, 50e9], [-100e9, -50e9, 0]])) | ||||||
|  |  | ||||||
|  |     with pytest.raises(SpectrumError, match='Spectra cannot be summed: channels overlapping.'): | ||||||
|  |         si += si | ||||||
|  |  | ||||||
|  |     si = create_arbitrary_spectral_information(frequency=array([193.35e12, 193.3e12, 193.25e12]), | ||||||
|  |                                                slot_width=array([50e9, 50e9, 50e9]), | ||||||
|  |                                                baud_rate=32e9, signal=array([1, 2, 3])) | ||||||
|  |     assert_array_equal(si.signal, array([3, 2, 1])) | ||||||
|  |  | ||||||
|  |     with pytest.raises(SpectrumError, match='Spectrum baud rate, including the roll off, ' | ||||||
|  |                                             r'larger than the slot width for channels: \[1, 3\].'): | ||||||
|  |         create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], signal=1, | ||||||
|  |                                               baud_rate=[64e9, 32e9, 64e9], slot_width=50e9) | ||||||
|  |     with pytest.raises(SpectrumError, match='Spectrum required slot widths larger than the frequency spectral ' | ||||||
|  |                                             r'distances between channels: \[\(1, 2\), \(3, 4\)\].'): | ||||||
|  |         create_arbitrary_spectral_information(frequency=[193.26e12, 193.3e12, 193.35e12, 193.39e12], signal=1, | ||||||
|  |                                               baud_rate=32e9, slot_width=50e9) | ||||||
|  |     with pytest.raises(SpectrumError, match='Spectrum required slot widths larger than the frequency spectral ' | ||||||
|  |                                             r'distances between channels: \[\(1, 2\), \(2, 3\)\].'): | ||||||
|  |         create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], signal=1, baud_rate=49e9, | ||||||
|  |                                               roll_off=0.1) | ||||||
|  |  | ||||||
|  |     with pytest.raises(SpectrumError, | ||||||
|  |                        match='Dimension mismatch in input fields.'): | ||||||
|  |         create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], signal=[1, 2], baud_rate=49e9) | ||||||
| @@ -1,26 +1,23 @@ | |||||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| from pathlib import Path | """ | ||||||
|  | Checks that the class SimParams behaves as a mutable Singleton. | ||||||
|  | """ | ||||||
|  |  | ||||||
|  | import pytest | ||||||
| from gnpy.core.parameters import SimParams | from gnpy.core.parameters import SimParams | ||||||
| from gnpy.core.science_utils import Simulation |  | ||||||
| from gnpy.tools.json_io import load_json |  | ||||||
|  |  | ||||||
| TEST_DIR = Path(__file__).parent |  | ||||||
| DATA_DIR = TEST_DIR / 'data' |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @pytest.mark.usefixtures('set_sim_params') | ||||||
| def test_sim_parameters(): | def test_sim_parameters(): | ||||||
|     j = load_json(DATA_DIR / 'sim_params.json') |     sim_params = {'nli_params': {}, 'raman_params': {}} | ||||||
|     sim_params = SimParams(**j) |     SimParams.set_params(sim_params) | ||||||
|     Simulation.set_params(sim_params) |     s1 = SimParams.get() | ||||||
|     s1 = Simulation.get_simulation() |     assert s1.nli_params.method == 'gn_model_analytic' | ||||||
|     assert s1.sim_params.raman_params.flag_raman |     s2 = SimParams.get() | ||||||
|     s2 = Simulation.get_simulation() |     assert not s1.raman_params.flag | ||||||
|     assert s2.sim_params.raman_params.flag_raman |     sim_params['raman_params']['flag'] = True | ||||||
|     j['raman_parameters']['flag_raman'] = False |     SimParams.set_params(sim_params) | ||||||
|     sim_params = SimParams(**j) |     assert s2.raman_params.flag | ||||||
|     Simulation.set_params(sim_params) |     assert s1.raman_params.flag | ||||||
|     assert not s2.sim_params.raman_params.flag_raman |  | ||||||
|     assert not s1.sim_params.raman_params.flag_raman |  | ||||||
|   | |||||||
| @@ -21,7 +21,6 @@ import shutil | |||||||
| from pandas import read_csv | from pandas import read_csv | ||||||
| from xlrd import open_workbook | from xlrd import open_workbook | ||||||
| import pytest | import pytest | ||||||
| from tests.compare import compare_networks, compare_services |  | ||||||
| from copy import deepcopy | from copy import deepcopy | ||||||
| from gnpy.core.utils import automatic_nch, lin2db | from gnpy.core.utils import automatic_nch, lin2db | ||||||
| from gnpy.core.network import build_network | from gnpy.core.network import build_network | ||||||
| @@ -56,15 +55,7 @@ def test_excel_json_generation(tmpdir, xls_input, expected_json_output): | |||||||
|     actual_json_output = xls_copy.with_suffix('.json') |     actual_json_output = xls_copy.with_suffix('.json') | ||||||
|     actual = load_json(actual_json_output) |     actual = load_json(actual_json_output) | ||||||
|     unlink(actual_json_output) |     unlink(actual_json_output) | ||||||
|     expected = load_json(expected_json_output) |     assert actual == load_json(expected_json_output) | ||||||
|  |  | ||||||
|     results = compare_networks(expected, actual) |  | ||||||
|     assert not results.elements.missing |  | ||||||
|     assert not results.elements.extra |  | ||||||
|     assert not results.elements.different |  | ||||||
|     assert not results.connections.missing |  | ||||||
|     assert not results.connections.extra |  | ||||||
|     assert not results.connections.different |  | ||||||
|  |  | ||||||
| # assume xls entries | # assume xls entries | ||||||
| # test that the build network gives correct results in gain mode | # test that the build network gives correct results in gain mode | ||||||
| @@ -95,15 +86,7 @@ def test_auto_design_generation_fromxlsgainmode(tmpdir, xls_input, expected_json | |||||||
|     save_network(network, actual_json_output) |     save_network(network, actual_json_output) | ||||||
|     actual = load_json(actual_json_output) |     actual = load_json(actual_json_output) | ||||||
|     unlink(actual_json_output) |     unlink(actual_json_output) | ||||||
|     expected = load_json(expected_json_output) |     assert actual == load_json(expected_json_output) | ||||||
|  |  | ||||||
|     results = compare_networks(expected, actual) |  | ||||||
|     assert not results.elements.missing |  | ||||||
|     assert not results.elements.extra |  | ||||||
|     assert not results.elements.different |  | ||||||
|     assert not results.connections.missing |  | ||||||
|     assert not results.connections.extra |  | ||||||
|     assert not results.connections.different |  | ||||||
|  |  | ||||||
| # test that autodesign creates same file as an input file already autodesigned | # test that autodesign creates same file as an input file already autodesigned | ||||||
|  |  | ||||||
| @@ -134,15 +117,7 @@ def test_auto_design_generation_fromjson(tmpdir, json_input, power_mode): | |||||||
|     save_network(network, actual_json_output) |     save_network(network, actual_json_output) | ||||||
|     actual = load_json(actual_json_output) |     actual = load_json(actual_json_output) | ||||||
|     unlink(actual_json_output) |     unlink(actual_json_output) | ||||||
|     expected = load_json(json_input) |     assert actual == load_json(json_input) | ||||||
|  |  | ||||||
|     results = compare_networks(expected, actual) |  | ||||||
|     assert not results.elements.missing |  | ||||||
|     assert not results.elements.extra |  | ||||||
|     assert not results.elements.different |  | ||||||
|     assert not results.connections.missing |  | ||||||
|     assert not results.connections.extra |  | ||||||
|     assert not results.connections.different |  | ||||||
|  |  | ||||||
| # test services creation | # test services creation | ||||||
|  |  | ||||||
| @@ -162,15 +137,7 @@ def test_excel_service_json_generation(xls_input, expected_json_output): | |||||||
|                                              equipment['SI']['default'].f_max, equipment['SI']['default'].spacing)) |                                              equipment['SI']['default'].f_max, equipment['SI']['default'].spacing)) | ||||||
|     build_network(network, equipment, p_db, p_total_db) |     build_network(network, equipment, p_db, p_total_db) | ||||||
|     from_xls = read_service_sheet(xls_input, equipment, network, network_filename=DATA_DIR / 'testTopology.xls') |     from_xls = read_service_sheet(xls_input, equipment, network, network_filename=DATA_DIR / 'testTopology.xls') | ||||||
|     expected = load_json(expected_json_output) |     assert from_xls == load_json(expected_json_output) | ||||||
|  |  | ||||||
|     results = compare_services(expected, from_xls) |  | ||||||
|     assert not results.requests.missing |  | ||||||
|     assert not results.requests.extra |  | ||||||
|     assert not results.requests.different |  | ||||||
|     assert not results.synchronizations.missing |  | ||||||
|     assert not results.synchronizations.extra |  | ||||||
|     assert not results.synchronizations.different |  | ||||||
|  |  | ||||||
|     # TODO verify that requested bandwidth is not zero ! |     # TODO verify that requested bandwidth is not zero ! | ||||||
|  |  | ||||||
| @@ -391,6 +358,7 @@ def test_excel_ila_constraints(source, destination, route_list, hoptype, expecte | |||||||
|         'cost': None, |         'cost': None, | ||||||
|         'roll_off': 0, |         'roll_off': 0, | ||||||
|         'tx_osnr': 0, |         'tx_osnr': 0, | ||||||
|  |         'penalties': None, | ||||||
|         'min_spacing': None, |         'min_spacing': None, | ||||||
|         'nb_channel': 0, |         'nb_channel': 0, | ||||||
|         'power': 0, |         'power': 0, | ||||||
|   | |||||||
| @@ -12,6 +12,8 @@ checks that restrictions in roadms are correctly applied during autodesign | |||||||
|  |  | ||||||
| from pathlib import Path | from pathlib import Path | ||||||
| import pytest | import pytest | ||||||
|  | from numpy.testing import assert_allclose | ||||||
|  |  | ||||||
| from gnpy.core.utils import lin2db, automatic_nch | from gnpy.core.utils import lin2db, automatic_nch | ||||||
| from gnpy.core.elements import Fused, Roadm, Edfa | from gnpy.core.elements import Fused, Roadm, Edfa | ||||||
| from gnpy.core.network import build_network | from gnpy.core.network import build_network | ||||||
| @@ -254,10 +256,11 @@ def test_roadm_target_power(prev_node_type, effective_pch_out_db, power_dbm): | |||||||
|         req.power, req.spacing) |         req.power, req.spacing) | ||||||
|     for i, el in enumerate(path): |     for i, el in enumerate(path): | ||||||
|         if isinstance(el, Roadm): |         if isinstance(el, Roadm): | ||||||
|             carriers_power_in_roadm = min([c.power.signal + c.power.nli + c.power.ase for c in si.carriers]) |             min_power_in_roadm = min(si.signal + si.ase + si.nli) | ||||||
|             si = el(si, degree=path[i + 1].uid) |             si = el(si, degree=path[i + 1].uid) | ||||||
|  |             power_out_roadm = si.signal + si.ase + si.nli | ||||||
|             if el.uid == 'roadm node B': |             if el.uid == 'roadm node B': | ||||||
|                 print('input', carriers_power_in_roadm) |                 print('input', min_power_in_roadm) | ||||||
|                 # if previous was an EDFA, power level at ROADM input is enough for the ROADM to apply its |                 # if previous was an EDFA, power level at ROADM input is enough for the ROADM to apply its | ||||||
|                 # target power (as specified in equipment ie -20 dBm) |                 # target power (as specified in equipment ie -20 dBm) | ||||||
|                 # if it is a Fused, the input power to the ROADM is smaller than the target power, and the |                 # if it is a Fused, the input power to the ROADM is smaller than the target power, and the | ||||||
| @@ -266,23 +269,17 @@ def test_roadm_target_power(prev_node_type, effective_pch_out_db, power_dbm): | |||||||
|                 # corresponds to -22dBm + power_dbm |                 # corresponds to -22dBm + power_dbm | ||||||
|                 # next step (for ROADM modelling) will be to apply a minimum loss for ROADMs ! |                 # next step (for ROADM modelling) will be to apply a minimum loss for ROADMs ! | ||||||
|                 if prev_node_type == 'edfa': |                 if prev_node_type == 'edfa': | ||||||
|                     assert el.effective_pch_out_db == effective_pch_out_db |                     # edfa prev_node sets input power to roadm to a high enough value: | ||||||
|                 if prev_node_type == 'fused': |                     # check that target power is correctly set in the ROADM | ||||||
|                     # then output power == input_power == effective_pch_out_db + power_dbm |                     assert_allclose(el.ref_pch_out_dbm, effective_pch_out_db, rtol=1e-3) | ||||||
|                     assert effective_pch_out_db + power_dbm == \ |                     # Check that egress power of roadm is equal to target power | ||||||
|                         pytest.approx(lin2db(carriers_power_in_roadm * 1e3), rel=1e-3) |                     assert_allclose(power_out_roadm, db2lin(effective_pch_out_db - 30), rtol=1e-3) | ||||||
|                     assert el.effective_pch_out_db == effective_pch_out_db + power_dbm |                 elif prev_node_type == 'fused': | ||||||
|                 for carrier in si.carriers: |                     # fused prev_node does reamplfy power after fiber propagation, so input power | ||||||
|                     print(carrier.power.signal + carrier.power.nli + carrier.power.ase) |                     # to roadm is low. | ||||||
|                     power = carrier.power.signal + carrier.power.nli + carrier.power.ase |                     # check that target power correctly reports power_dbm from previous propagation | ||||||
|                     if prev_node_type == 'edfa': |                     assert_allclose(el.ref_pch_out_dbm, effective_pch_out_db + power_dbm, rtol=1e-3) | ||||||
|                         # edfa prev_node sets input power to roadm to a high enough value: |                     # Check that egress power of roadm is equalized to the min carrier input power. | ||||||
|                         # Check that egress power of roadm is equal to target power |                     assert_allclose(power_out_roadm, min_power_in_roadm, rtol=1e-3) | ||||||
|                         assert power == pytest.approx(db2lin(effective_pch_out_db - 30), rel=1e-3) |  | ||||||
|                     elif prev_node_type == 'fused': |  | ||||||
|                         # fused prev_node does reamplfy power after fiber propagation, so input power |  | ||||||
|                         # to roadm is low. |  | ||||||
|                         # Check that egress power of roadm is equalized to the min carrier input power. |  | ||||||
|                         assert power == pytest.approx(carriers_power_in_roadm, rel=1e-3) |  | ||||||
|         else: |         else: | ||||||
|             si = el(si) |             si = el(si) | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
| # @Author: Alessio Ferrari |  | ||||||
| """ | """ | ||||||
| Checks that RamanFiber propagates properly the spectral information. In this way, also the RamanSolver and the NliSolver | Checks that RamanFiber propagates properly the spectral information. In this way, also the RamanSolver and the NliSolver | ||||||
| are tested. | are tested. | ||||||
| @@ -9,40 +9,120 @@ are tested. | |||||||
| from pathlib import Path | from pathlib import Path | ||||||
| from pandas import read_csv | from pandas import read_csv | ||||||
| from numpy.testing import assert_allclose | from numpy.testing import assert_allclose | ||||||
|  | from numpy import array, genfromtxt | ||||||
|  | import pytest | ||||||
|  |  | ||||||
| from gnpy.core.info import create_input_spectral_information | from gnpy.core.info import create_input_spectral_information, create_arbitrary_spectral_information | ||||||
| from gnpy.core.elements import RamanFiber | from gnpy.core.elements import Fiber, RamanFiber | ||||||
| from gnpy.core.parameters import SimParams | from gnpy.core.parameters import SimParams | ||||||
| from gnpy.core.science_utils import Simulation |  | ||||||
| from gnpy.tools.json_io import load_json | from gnpy.tools.json_io import load_json | ||||||
|  | from gnpy.core.exceptions import NetworkTopologyError | ||||||
|  | from gnpy.core.science_utils import RamanSolver | ||||||
|  |  | ||||||
| TEST_DIR = Path(__file__).parent | TEST_DIR = Path(__file__).parent | ||||||
|  |  | ||||||
|  |  | ||||||
| def test_raman_fiber(): | def test_fiber(): | ||||||
|     """ Test the accuracy of propagating the RamanFiber.""" |     """ Test the accuracy of propagating the Fiber.""" | ||||||
|     # spectral information generation |     fiber = Fiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json')) | ||||||
|     power = 1e-3 |  | ||||||
|     eqpt_params = load_json(TEST_DIR / 'data' / 'eqpt_config.json') |  | ||||||
|     spectral_info_params = eqpt_params['SI'][0] |  | ||||||
|     spectral_info_params.pop('power_dbm') |  | ||||||
|     spectral_info_params.pop('power_range_db') |  | ||||||
|     spectral_info_params.pop('tx_osnr') |  | ||||||
|     spectral_info_params.pop('sys_margins') |  | ||||||
|     spectral_info_input = create_input_spectral_information(power=power, **spectral_info_params) |  | ||||||
|  |  | ||||||
|     sim_params = SimParams(**load_json(TEST_DIR / 'data' / 'sim_params.json')) |     # fix grid spectral information generation | ||||||
|     Simulation.set_params(sim_params) |     spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15, | ||||||
|     fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'raman_fiber_config.json')) |                                                             baud_rate=32e9, power=1e-3, spacing=50e9) | ||||||
|  |     # propagation | ||||||
|  |     spectral_info_out = fiber(spectral_info_input) | ||||||
|  |  | ||||||
|  |     p_signal = spectral_info_out.signal | ||||||
|  |     p_nli = spectral_info_out.nli | ||||||
|  |  | ||||||
|  |     expected_results = read_csv(TEST_DIR / 'data' / 'test_fiber_fix_expected_results.csv') | ||||||
|  |     assert_allclose(p_signal, expected_results['signal'], rtol=1e-3) | ||||||
|  |     assert_allclose(p_nli, expected_results['nli'], rtol=1e-3) | ||||||
|  |  | ||||||
|  |     # flex grid spectral information generation | ||||||
|  |     frequency = 191e12 + array([0, 50e9, 150e9, 225e9, 275e9]) | ||||||
|  |     slot_width = array([37.5e9, 50e9, 75e9, 50e9, 37.5e9]) | ||||||
|  |     baud_rate = array([32e9, 42e9, 64e9, 42e9, 32e9]) | ||||||
|  |     signal = 1e-3 + array([0, -1e-4, 3e-4, -2e-4, +2e-4]) | ||||||
|  |     spectral_info_input = create_arbitrary_spectral_information(frequency=frequency, slot_width=slot_width, | ||||||
|  |                                                                 signal=signal, baud_rate=baud_rate, roll_off=0.15) | ||||||
|  |  | ||||||
|     # propagation |     # propagation | ||||||
|     spectral_info_out = fiber(spectral_info_input) |     spectral_info_out = fiber(spectral_info_input) | ||||||
|  |  | ||||||
|     p_signal = [carrier.power.signal for carrier in spectral_info_out.carriers] |     p_signal = spectral_info_out.signal | ||||||
|     p_ase = [carrier.power.ase for carrier in spectral_info_out.carriers] |     p_nli = spectral_info_out.nli | ||||||
|     p_nli = [carrier.power.nli for carrier in spectral_info_out.carriers] |  | ||||||
|  |  | ||||||
|     expected_results = read_csv(TEST_DIR / 'data' / 'test_science_utils_expected_results.csv') |     expected_results = read_csv(TEST_DIR / 'data' / 'test_fiber_flex_expected_results.csv') | ||||||
|  |     assert_allclose(p_signal, expected_results['signal'], rtol=1e-3) | ||||||
|  |     assert_allclose(p_nli, expected_results['nli'], rtol=1e-3) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @pytest.mark.usefixtures('set_sim_params') | ||||||
|  | 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) | ||||||
|  |     SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json')) | ||||||
|  |     fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json')) | ||||||
|  |  | ||||||
|  |     # propagation | ||||||
|  |     spectral_info_out = fiber(spectral_info_input) | ||||||
|  |  | ||||||
|  |     p_signal = spectral_info_out.signal | ||||||
|  |     p_ase = spectral_info_out.ase | ||||||
|  |     p_nli = spectral_info_out.nli | ||||||
|  |  | ||||||
|  |     expected_results = read_csv(TEST_DIR / 'data' / 'test_raman_fiber_expected_results.csv') | ||||||
|     assert_allclose(p_signal, expected_results['signal'], rtol=1e-3) |     assert_allclose(p_signal, expected_results['signal'], rtol=1e-3) | ||||||
|     assert_allclose(p_ase, expected_results['ase'], rtol=1e-3) |     assert_allclose(p_ase, expected_results['ase'], rtol=1e-3) | ||||||
|     assert_allclose(p_nli, expected_results['nli'], rtol=1e-3) |     assert_allclose(p_nli, expected_results['nli'], rtol=1e-3) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @pytest.mark.parametrize( | ||||||
|  |     "loss, position, errmsg", | ||||||
|  |     ((0.5, -2, "Lumped loss positions must be between 0 and the fiber length (80.0 km), boundaries excluded."), | ||||||
|  |      (0.5, 81, "Lumped loss positions must be between 0 and the fiber length (80.0 km), boundaries excluded."))) | ||||||
|  | @pytest.mark.usefixtures('set_sim_params') | ||||||
|  | def test_fiber_lumped_losses(loss, position, errmsg, set_sim_params): | ||||||
|  |     """ Lumped losses length sanity checking.""" | ||||||
|  |     SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json')) | ||||||
|  |     fiber_dict = load_json(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber_config.json') | ||||||
|  |     fiber_dict['params']['lumped_losses'] = [{'position': position, 'loss': loss}] | ||||||
|  |     with pytest.raises(NetworkTopologyError) as e: | ||||||
|  |         Fiber(**fiber_dict) | ||||||
|  |     assert str(e.value) == errmsg | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @pytest.mark.usefixtures('set_sim_params') | ||||||
|  | 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) | ||||||
|  |  | ||||||
|  |     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')) | ||||||
|  |     raman_fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber_config.json')) | ||||||
|  |  | ||||||
|  |     # propagation | ||||||
|  |     # without Raman pumps | ||||||
|  |     stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering( | ||||||
|  |         spectral_info_input, fiber) | ||||||
|  |     power_profile = stimulated_raman_scattering.power_profile | ||||||
|  |     expected_power_profile = genfromtxt(TEST_DIR / 'data' / 'test_lumped_losses_fiber_no_pumps.csv', delimiter=',') | ||||||
|  |     assert_allclose(power_profile, expected_power_profile, rtol=1e-3) | ||||||
|  |  | ||||||
|  |     # with Raman pumps | ||||||
|  |     expected_power_profile = genfromtxt(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber.csv', delimiter=',') | ||||||
|  |     stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering( | ||||||
|  |         spectral_info_input, raman_fiber) | ||||||
|  |     power_profile = stimulated_raman_scattering.power_profile | ||||||
|  |     assert_allclose(power_profile, expected_power_profile, rtol=1e-3) | ||||||
|  |  | ||||||
|  |     # without Stimulated Raman Scattering | ||||||
|  |     expected_power_profile = genfromtxt(TEST_DIR / 'data' / 'test_lumped_losses_fiber_no_raman.csv', delimiter=',') | ||||||
|  |     stimulated_raman_scattering = RamanSolver.calculate_attenuation_profile(spectral_info_input, fiber) | ||||||
|  |     power_profile = stimulated_raman_scattering.power_profile | ||||||
|  |     assert_allclose(power_profile, expected_power_profile, rtol=1e-3) | ||||||
|   | |||||||
| @@ -291,6 +291,7 @@ def request_set(): | |||||||
|         'cost': 1, |         'cost': 1, | ||||||
|         'roll_off': 0.15, |         'roll_off': 0.15, | ||||||
|         'tx_osnr': 38, |         'tx_osnr': 38, | ||||||
|  |         'penalties': {}, | ||||||
|         'min_spacing': 37.5e9, |         'min_spacing': 37.5e9, | ||||||
|         'nb_channel': None, |         'nb_channel': None, | ||||||
|         'power': 0, |         'power': 0, | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								tox.ini
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tox.ini
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ skipsdist = True | |||||||
| [testenv] | [testenv] | ||||||
| deps = | deps = | ||||||
| 	-r{toxinidir}/requirements.txt | 	-r{toxinidir}/requirements.txt | ||||||
| 	pytest>=5.0.0,<6 | 	-r{toxinidir}/tests/requirements.txt | ||||||
| 	cover: pytest-cov | 	cover: pytest-cov | ||||||
| 	linters: flake8 | 	linters: flake8 | ||||||
| 	linters: pep8-naming | 	linters: pep8-naming | ||||||
| @@ -43,3 +43,4 @@ commands = | |||||||
| [flake8] | [flake8] | ||||||
| max-line-length = 120 | max-line-length = 120 | ||||||
| max-complexity = 15 | max-complexity = 15 | ||||||
|  | ignore = N806 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user