other variable names
This commit is contained in:
parent
4b63281f02
commit
9a43db9c5a
6 changed files with 12 additions and 10 deletions
|
|
@ -116,7 +116,7 @@ def plot(times, concentrations, model: models.ExposureModel):
|
|||
|
||||
ax.set_xlabel('Time of day')
|
||||
ax.set_ylabel('Mean concentration ($q/m^3$)')
|
||||
ax.set_title('Mean concentration of infectious quanta')
|
||||
ax.set_title('Mean concentration of infectious virus')
|
||||
ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter("%H:%M"))
|
||||
|
||||
# Plot presence of exposed person
|
||||
|
|
@ -237,7 +237,7 @@ def comparison_plot(scenarios: typing.Dict[str, dict], sample_times: np.ndarray)
|
|||
|
||||
ax.set_xlabel('Time of day')
|
||||
ax.set_ylabel('Mean concentration ($q/m^3$)')
|
||||
ax.set_title('Mean concentration of infectious quanta')
|
||||
ax.set_title('Mean concentration of infectious virus')
|
||||
|
||||
return fig
|
||||
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@
|
|||
|
||||
<p class="data_text"> <strong> Notes for alternative scenarios: </strong><br>
|
||||
<ol>
|
||||
<li>This graph shows the concentration of infectious quanta in the air. The filtration of Type I and FFP2 masks, if worn, applies not only to the emission rate but also to the individual exposure (i.e. inhalation).
|
||||
<li>This graph shows the concentration of infectious virus in the air. The filtration of Type I and FFP2 masks, if worn, applies not only to the emission rate but also to the individual exposure (i.e. inhalation).
|
||||
For this reason, scenarios with different types of mask will show the same concentration on the graph but have different absorbed doses and infection probabilities.</li>
|
||||
<li>If you have selected more sophisticated options, such as HEPA filtration or FFP2 masks, alternatives will be indicated in the plot as the "base scenario with/without...", representing a variation on the inputs inserted in the form.<br>
|
||||
The other alternative scenarios shown for comparison will not include either HEPA filtration or FFP2 masks.</li>
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ It is determined by:</p>
|
|||
<ul>
|
||||
<li>The presence of the infected person, who emits airborne viruses in the volume.</li>
|
||||
<li>The emission rate is related to the type of activity of the infected person (sitting, light exercise), their level of vocalisation (breathing, talking or shouting).</li>
|
||||
<li>The accumulation of infectious quanta in the volume, which is driven, among other factors, by ventilation (if applicable).<ul>
|
||||
<li>The accumulation of infectious virus in the volume, which is driven, among other factors, by ventilation (if applicable).<ul>
|
||||
<li>In a mechanical ventilation scenario, the removal rate is constant, based on fresh airflow supply in and out of the simulated space.</li>
|
||||
<li>Under natural ventilation conditions, the effectiveness of ventilation relies upon the hourly temperature difference between the inside and outside air temperature.</li>
|
||||
<li>A HEPA filter removes infectious virus from the air at a constant rate and is modelled in the same way as mechanical ventilation, however air passed through a HEPA filter is recycled (i.e. it is not fresh air).</li>
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ class ExposureModelResult(View):
|
|||
|
||||
ax.set_xlabel('Time (hours)')
|
||||
ax.set_ylabel('Concentration ($q/m^3$)')
|
||||
ax.set_title('Concentration of infectious quanta')
|
||||
ax.set_title('Concentration of infectious virus')
|
||||
else:
|
||||
self.ax.ignore_existing_data_limits = True
|
||||
self.line.set_data(ts, concentration)
|
||||
|
|
@ -154,7 +154,7 @@ class ExposureModelResult(View):
|
|||
def update_textual_result(self, model: models.ExposureModel):
|
||||
lines = []
|
||||
P = model.infection_probability()
|
||||
lines.append(f'Emission rate (quanta/hr): {np.round(model.concentration_model.infected.emission_rate_when_present(),0)}')
|
||||
lines.append(f'Emission rate (virus/hr): {np.round(model.concentration_model.infected.emission_rate_when_present(),0)}')
|
||||
lines.append(f'Probability of infection: {np.round(P, 0)}%')
|
||||
|
||||
lines.append(f'Number of exposed: {model.exposed.number}')
|
||||
|
|
@ -186,7 +186,7 @@ class ExposureComparissonResult(View):
|
|||
ax.spines['top'].set_visible(False)
|
||||
ax.set_xlabel('Time (hours)')
|
||||
ax.set_ylabel('Concentration ($q/m^3$)')
|
||||
ax.set_title('Concentration of infectious quanta')
|
||||
ax.set_title('Concentration of infectious virus')
|
||||
return ax
|
||||
|
||||
def scenarios_updated(self, scenarios: typing.Sequence[ScenarioType], _):
|
||||
|
|
|
|||
|
|
@ -803,7 +803,7 @@ class ConcentrationModel:
|
|||
|
||||
def concentration(self, time: float) -> _VectorisedFloat:
|
||||
"""
|
||||
Virus quanta concentration, as a function of time.
|
||||
Virus exposure concentration, as a function of time.
|
||||
The formulas used here assume that all parameters (ventilation,
|
||||
emission rate) are constant between two state changes - only
|
||||
the value of these parameters at the next state change, are used.
|
||||
|
|
@ -867,7 +867,7 @@ class ExposureModel:
|
|||
fraction_deposited: _VectorisedFloat = 0.6
|
||||
|
||||
def exposure(self) -> _VectorisedFloat:
|
||||
"""The number of virus quanta per meter^3."""
|
||||
"""The number of virus per meter^3."""
|
||||
exposure = 0.0
|
||||
|
||||
for start, stop in self.exposed.presence.boundaries():
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@ import cara.models
|
|||
@pytest.mark.parametrize(
|
||||
"override_params", [
|
||||
{'viral_load_in_sputum': np.array([5e8, 1e9])},
|
||||
{'infectious_dose': np.array([50, 20])},
|
||||
{'exhalation_rate': np.array([0.75, 0.81])},
|
||||
]
|
||||
)
|
||||
def test_infected_population_vectorisation(override_params):
|
||||
defaults = {
|
||||
'viral_load_in_sputum': 1e9,
|
||||
'infectious_dose': 50,
|
||||
'exhalation_rate': 0.75,
|
||||
}
|
||||
defaults.update(override_params)
|
||||
|
|
@ -31,7 +33,7 @@ def test_infected_population_vectorisation(override_params):
|
|||
),
|
||||
virus=cara.models.Virus(
|
||||
viral_load_in_sputum=defaults['viral_load_in_sputum'],
|
||||
infectious_dose=defaults['quantum_infectious_dose'],
|
||||
infectious_dose=defaults['infectious_dose'],
|
||||
),
|
||||
expiration=cara.models.Expiration((1., 0., 0.)),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue