Skip to content

Commit

Permalink
update type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanielloNTIA committed Jan 16, 2024
1 parent 489f829 commit fb3e310
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scos_actions/signal_processing/calibration.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import logging
from typing import Tuple
from typing import Optional, Tuple

import numpy as np
from its_preselector.preselector import Preselector
from scipy.constants import Boltzmann

from scos_actions.signal_processing.unit_conversion import (
convert_celsius_to_fahrenheit,
convert_celsius_to_kelvins,
Expand Down Expand Up @@ -65,7 +64,9 @@ def y_factor(
return noise_figure_dB, gain_dB


def get_linear_enr(preselector: Preselector, cal_source_idx: int = None) -> float:
def get_linear_enr(
preselector: Preselector, cal_source_idx: Optional[int] = None
) -> float:
"""
Get the excess noise ratio of a calibration source.
Expand Down Expand Up @@ -108,7 +109,7 @@ def get_linear_enr(preselector: Preselector, cal_source_idx: int = None) -> floa


def get_temperature(
preselector: Preselector, sensor_idx: int = None
preselector: Preselector, sensor_idx: Optional[int] = None
) -> Tuple[float, float, float]:
"""
Get the temperature from a preselector sensor.
Expand Down

0 comments on commit fb3e310

Please sign in to comment.