diff --git a/gnpy/core/info.py b/gnpy/core/info.py index 05c665156..1fcb60e46 100644 --- a/gnpy/core/info.py +++ b/gnpy/core/info.py @@ -11,7 +11,7 @@ from __future__ import annotations from collections import namedtuple from collections.abc import Iterable -from typing import Union, List +from typing import Union, List, Optional from dataclasses import dataclass from numpy import argsort, mean, array, append, ones, ceil, any, zeros, outer, full, ndarray, asarray @@ -325,7 +325,7 @@ def is_in_band(frequency: float, band: dict) -> bool: return False -def demuxed_spectral_information(input_si: SpectralInformation, band: dict) -> SpectralInformation: +def demuxed_spectral_information(input_si: SpectralInformation, band: dict) -> Optional[SpectralInformation]: """extract a si based on band """ filtered_indices = [i for i, f in enumerate(input_si.frequency) diff --git a/gnpy/core/network.py b/gnpy/core/network.py index c03c45e34..ada3eecb5 100644 --- a/gnpy/core/network.py +++ b/gnpy/core/network.py @@ -368,7 +368,7 @@ def compute_band_power_deviation_and_tilt(srs_power_deviation, design_bands: dic return deviation_db, tilt_target -def compute_tilt_using_previous_and_next_spans(prev_node, next_node, design_bands: List[str], +def compute_tilt_using_previous_and_next_spans(prev_node, next_node, design_bands: Dict[str, float], input_powers: Dict[str, float], equipment: dict, network: DiGraph, prev_weight: float = 1.0, next_weight: float = 0) -> Tuple[Dict[str, float], Dict[str, float]]: """Compute the power deviation per band and the tilt target based on previous and next spans.