Bugs fixed in monte_carlo/data.py; updating ExposureModel for diameter dependent exposure
This commit is contained in:
parent
28a9e5d5b3
commit
acdd22cb07
2 changed files with 11 additions and 3 deletions
|
|
@ -923,7 +923,7 @@ class ExposureModel:
|
|||
|
||||
def exposure(self) -> _VectorisedFloat:
|
||||
"""The number of virus per meter^3."""
|
||||
return (self._normed_exposure() *
|
||||
return (np.array(self._normed_exposure()).mean() *
|
||||
self.concentration_model.infected.emission_rate_when_present())
|
||||
|
||||
def infection_probability(self) -> _VectorisedFloat:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
from dataclasses import dataclass
|
||||
import typing
|
||||
|
||||
import numpy as np
|
||||
from scipy import special as sp
|
||||
|
||||
import cara.monte_carlo as mc
|
||||
from cara.monte_carlo.sampleable import Normal,LogNormal,LogCustomKernel,CustomKernel,Uniform
|
||||
|
|
@ -138,10 +142,14 @@ mask_distributions = {
|
|||
def expiration_distribution(BLO_factors: typing.Tuple[float, float, float]):
|
||||
"""
|
||||
Returns an Expiration with an aerosol diameter distribution, defined
|
||||
by the BLO factors
|
||||
by the BLO factors.
|
||||
Note: integration boundaries for normalization are chosen as 0.1 and
|
||||
30 microns respectively - this is an historical choice based on
|
||||
previous implementations of the model (it limits the influence of
|
||||
the O-mode).
|
||||
"""
|
||||
return mc.Expiration(CustomKernel(dscan,
|
||||
BLOmodel(BLO_factors).normalized_distribution(dscan),
|
||||
BLOmodel(BLO_factors).normalized_distribution(dscan, 0.1, 30.),
|
||||
kernel_bandwidth=0.1))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue