add lognormal method

This commit is contained in:
markus 2021-01-25 14:13:21 +01:00
parent c8800b180d
commit 8f3e279045

View file

@ -32,6 +32,11 @@ log_viral_load_frequencies = ((1.880302953, 2.958422139, 3.308759599, 3.67692158
0.005084746, 0.002966102))
def lognormal(csi: float, lamb: float, samples: int) -> np.ndarray:
sf_norm = sct.norm.sf(np.random.normal(size=samples))
return sct.lognorm.isf(sf_norm, csi, loc=0, scale=np.exp(lamb))
@dataclass(frozen=True)
class MCVirus:
#: Biological decay (inactivation of the virus in air)