mirror of
				https://github.com/Telecominfraproject/oopt-gnpy.git
				synced 2025-10-30 01:32:21 +00:00 
			
		
		
		
	fix typing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I0f1621b669b4db833d0760368cd834f3186ee2db
This commit is contained in:
		| @@ -11,7 +11,7 @@ This module contains classes for modelling :class:`SpectralInformation`. | |||||||
| from __future__ import annotations | from __future__ import annotations | ||||||
| from collections import namedtuple | from collections import namedtuple | ||||||
| from collections.abc import Iterable | from collections.abc import Iterable | ||||||
| from typing import Union, List | from typing import Union, List, Optional | ||||||
| from dataclasses import dataclass | from dataclasses import dataclass | ||||||
| from numpy import argsort, mean, array, append, ones, ceil, any, zeros, outer, full, ndarray, asarray | 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 |     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 |     """extract a si based on band | ||||||
|     """ |     """ | ||||||
|     filtered_indices = [i for i, f in enumerate(input_si.frequency) |     filtered_indices = [i for i, f in enumerate(input_si.frequency) | ||||||
|   | |||||||
| @@ -368,7 +368,7 @@ def compute_band_power_deviation_and_tilt(srs_power_deviation, design_bands: dic | |||||||
|     return deviation_db, tilt_target |     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, |         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]]: |         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. |     """Compute the power deviation per band and the tilt target based on previous and next spans. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 EstherLerouzic
					EstherLerouzic