diff --git a/cara/models.py b/cara/models.py index 1a71f1aa..88eaf91a 100644 --- a/cara/models.py +++ b/cara/models.py @@ -460,7 +460,7 @@ class Mask: η_leaks: _VectorisedFloat #: Filtration efficiency of masks when inhaling. - η_inhale: float + η_inhale: _VectorisedFloat #: Particle sizes in cm. particle_sizes: typing.Tuple[float, float, float, float] = ( @@ -695,7 +695,7 @@ class ExposureModel: #: The number of times the exposure event is repeated (default 1). repeats: int = 1 - def quanta_exposure(self) -> float: + def quanta_exposure(self) -> _VectorisedFloat: """The number of virus quanta per meter^3.""" exposure = 0.0 @@ -707,7 +707,7 @@ class ExposureModel: exposure += integrate(self.concentration_model.concentration, start, stop) return exposure * self.repeats - def infection_probability(self): + def infection_probability(self) -> _VectorisedFloat: exposure = self.quanta_exposure() inf_aero = ( @@ -719,12 +719,12 @@ class ExposureModel: # Probability of infection. return (1 - np.exp(-inf_aero)) * 100 - def expected_new_cases(self): + def expected_new_cases(self) -> _VectorisedFloat: prob = self.infection_probability() exposed_occupants = self.exposed.number return prob * exposed_occupants / 100 - def reproduction_number(self): + def reproduction_number(self) -> _VectorisedFloat: """ The reproduction number can be thought of as the expected number of cases directly generated by one infected case in a population.