updated plot labels and legend
This commit is contained in:
parent
2289c99e70
commit
308c469f81
3 changed files with 9 additions and 4 deletions
|
|
@ -132,7 +132,7 @@ def calculate_report_data(form: FormData, model: models.ExposureModel) -> typing
|
|||
])
|
||||
|
||||
prob = np.array(model.infection_probability())
|
||||
prob_dist_count, prob_dist_bins = np.histogram(prob, bins=100, density=True)
|
||||
prob_dist_count, prob_dist_bins = np.histogram(prob/100, bins=100, density=True)
|
||||
prob_probabilistic_exposure = np.array(model.total_probability_rule()).mean()
|
||||
er = np.array(model.concentration_model.infected.emission_rate_when_present()).mean()
|
||||
exposed_occupants = model.exposed.number
|
||||
|
|
@ -234,7 +234,7 @@ def uncertainties_plot(exposure_model: models.ExposureModel):
|
|||
axs[1, 0].set_xticklabels(['$10^{' + str(i) + '}$' for i in range(2, 13, 2)])
|
||||
axs[1, 0].set_xlim(2, 10)
|
||||
axs[1, 0].set_xlabel('Viral load\n(RNA copies)', fontsize=12)
|
||||
axs[0, 0].set_ylabel('Probability of infection\nfor a given viral load', fontsize=12)
|
||||
axs[0, 0].set_ylabel('Conditional Probability\nof Infection', fontsize=12)
|
||||
|
||||
axs[0, 0].text(9.5, -0.01, '$(i)$')
|
||||
axs[1, 0].text(9.5, axs[1, 0].get_ylim()[1] * 0.8, '$(ii)$')
|
||||
|
|
|
|||
|
|
@ -980,7 +980,7 @@ function draw_histogram(svg_id, prob, prob_sd) {
|
|||
|
||||
// Plot tile
|
||||
vis.append("svg:text")
|
||||
.attr("x", x(50))
|
||||
.attr("x", x(0.5))
|
||||
.attr("y", 0 + margins.top)
|
||||
.attr("text-anchor", "middle")
|
||||
.style("font-size", "16px")
|
||||
|
|
|
|||
|
|
@ -207,11 +207,16 @@
|
|||
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="conditional_probability_plot" class="tabbed form-check-input" name="conditional_probability_plot" value="1" onClick="conditional_probability_plot(this.checked, {{ form.conditional_probability_plot | int }});">
|
||||
<label id="label_conditional_probability_plot" for="conditional_probability_plot" class="form-check-label col-sm-12">Generate conditional probability of infection plot</label>
|
||||
<label id="label_conditional_probability_plot" for="conditional_probability_plot" class="form-check-label col-sm-12">Generate full uncertainty data (as function of the viral load)</label>
|
||||
</div>
|
||||
{% if form.conditional_probability_plot %}
|
||||
<div id="conditional_probability_div">
|
||||
<img src= "{{ uncertainties_plot_src }}" />
|
||||
<div class="ml-5">
|
||||
<p>(i) Predictive probability of infection for a given value of the viral load</p>
|
||||
<p>(ii) Histogram of the viral load data</p>
|
||||
<p>(iii) Histogram of the conditional probability of infection (result of total predictive probability in the middle)</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue