Fix return types

This commit is contained in:
Lukas Klass 2020-05-16 15:55:50 +02:00
parent a9e5c37e78
commit 2bedde4bf7
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ class ASensor:
@abstractmethod @abstractmethod
@u.quantity_input(exp_time="time") @u.quantity_input(exp_time="time")
def getSNR(self, exp_time: u.Quantity): def getSNR(self, exp_time: u.Quantity) -> u.dimensionless_unscaled:
""" """
Calculate the signal to noise ratio (SNR) for the given exposure time. Calculate the signal to noise ratio (SNR) for the given exposure time.
@ -33,14 +33,14 @@ class ASensor:
Returns Returns
------- -------
snr : float snr : Quantity
The calculated SNR The calculated SNR
""" """
pass pass
@abstractmethod @abstractmethod
@u.quantity_input(snr=u.dimensionless_unscaled) @u.quantity_input(snr=u.dimensionless_unscaled)
def getExpTime(self, snr: u.Quantity): def getExpTime(self, snr: u.Quantity) -> u.s:
""" """
Calculate the necessary exposure time in order to achieve the given SNR. Calculate the necessary exposure time in order to achieve the given SNR.
@ -58,7 +58,7 @@ class ASensor:
@abstractmethod @abstractmethod
@u.quantity_input(exp_time="time", snr=u.dimensionless_unscaled, target_brightness=u.mag) @u.quantity_input(exp_time="time", snr=u.dimensionless_unscaled, target_brightness=u.mag)
def getSensitivity(self, exp_time: u.Quantity, snr: u.Quantity, target_brightness: u.Quantity): def getSensitivity(self, exp_time: u.Quantity, snr: u.Quantity, target_brightness: u.Quantity) -> u.mag:
""" """
Calculate the sensitivity of the telescope detector combination. Calculate the sensitivity of the telescope detector combination.

View File

@ -150,7 +150,7 @@ class Imager(ASensor):
return exp_time return exp_time
@u.quantity_input(exp_time="time", snr=u.dimensionless_unscaled, target_brightness=u.mag) @u.quantity_input(exp_time="time", snr=u.dimensionless_unscaled, target_brightness=u.mag)
def getSensitivity(self, exp_time: u.Quantity, snr: u.Quantity, target_brightness: u.Quantity): def getSensitivity(self, exp_time: u.Quantity, snr: u.Quantity, target_brightness: u.Quantity) -> u.mag:
""" """
Calculate the sensitivity of the telescope detector combination. Calculate the sensitivity of the telescope detector combination.