CARA merge requestshttps://gitlab.cern.ch/cara/cara/-/merge_requests2022-01-12T09:28:54+01:00https://gitlab.cern.ch/cara/cara/-/merge_requests/316Probability that one individual is infected2022-01-12T09:28:54+01:00Luis AleixoProbability that one individual is infectedImplementation of the probability of one individual is infected in a given population (@mandrein) - [Probability_to_be_infected.pptx](/uploads/4ad38929c2845b5e8e0789378a6a91ce/Probability_to_be_infected.pptx).
On the **Event data** the...Implementation of the probability of one individual is infected in a given population (@mandrein) - [Probability_to_be_infected.pptx](/uploads/4ad38929c2845b5e8e0789378a6a91ce/Probability_to_be_infected.pptx).
On the **Event data** there is a new section for ```Recurrent events``` or ```Specific events``` (radio buttons). If the later is checked, two new UI input fields are displayed - ```Population (# Inhabitants)``` and ```New confirmed cases (Cases 7-day average)``` needed for the calculation of the new probability.
This probability uses the previous CARA probability multiplied by a Binomial distribution that follows the probability of having ```x``` infected persons in an event with ```n``` people. ```n``` is the ```Total number of occupants```, while ```x``` is a value that goes from ```1``` until the number of infected people, if lower than ```10```:
- Calculate the P(I) when the number of infection persons is ```1``` and multiply by the distribution output when ```x``` is ```1```.
- Calculate the P(I) when the number of infection persons is ```2``` and multiply by the distribution output when ```x``` is ```2```.
- ...
The final probability is a sum of all these calculations.
A low-level test was implemented in ```test_exposure_model.py``` with two case scenarios.
Performance tests:
```
Before:
[I 220110 15:45:17 web:2239] 200 GET /calculator/baseline-model/result (::1) 1504.54ms
[I 220110 15:45:17 web:2239] 200 GET /calculator/baseline-model/result (::1) 245.28ms
```
```
After:
[I 220110 15:43:28 web:2239] 200 POST /calculator/report (::1) 1571.35ms
[I 220110 15:43:30 web:2239] 200 POST /calculator/report (::1) 317.34ms
```
Assuming a total population of ```270000``` inhabitants and ```100``` cumulative cases in the past 7 days, the probability of on-site transmission, having at least 1 new infection in an event with ```10``` occupants, is ```0.38%```.
![Screenshot_2022-01-10_at_15.52.44](/uploads/c2fbdc28ff8f0308823becdc843bca99/Screenshot_2022-01-10_at_15.52.44.png)
@mandrein In this implementation we ask for the 7-day average of new reported cases instead of the 10-days, and the ```ascertainment bias``` is currently ```5```.Luis AleixoLuis Aleixohttps://gitlab.cern.ch/cara/cara/-/merge_requests/307Model updates with virology parameters2022-01-17T14:21:18+01:00Luis AleixoModel updates with virology parametersModifications to be inline with the most recent paper:
- Introducing a diameter as a vectorised parameter of Expiration. The BLO model is put back as part of the Monte-Carlo model, and new ```expiration_distributions``` are created in ...Modifications to be inline with the most recent paper:
- Introducing a diameter as a vectorised parameter of Expiration. The BLO model is put back as part of the Monte-Carlo model, and new ```expiration_distributions``` are created in ```monte_carlo/data.py```.
- The ```exposure``` of ```ExposureModel``` is computed with a mean, when a diameter distribution is present - it correspond to the Monte-Carlo integration of the diameter-dependent model.
- In the ```calculator```, the ```model_generator``` now uses the Monte-Carlo BLO model and proper weighting of distributions when needed.
- The BLO particle concentration emission values,```cn```, were updated on the ```B - 0.06``` and ```L - 0.2``` modes.
- Number of samples increased to ```250000``` in ```model_generator``` and Monte-Carlo tests (because of the need to accurately sample the diameters).
- The gravitational settling is now fully diameter dependent, as well as the ```f_dep``` (fraction of virus deposited on the respiratory tract). An evaporation factor (default value = ```0.3```) was also introduced in ```ConcentrationModel```, reducing the size of the aerosols before applying the formulas.
- Inhaled dose formula considers now the ```f_inf``` (fraction of infectious virus) with the ```host_immunity``` added to the ```InfectedPopulation```, and the ```viable-to-RNA``` distribution (uniform ```[0.01 - 0.6]```) added to the ```Virus``` class.
- ```halflife``` value for low humidity changed to ```6.43```.
- The ```infectious_dose_distribution``` is now a uniform distribution ```[10 - 100]```.
- The formula for the probability of infection was updated according to the new values for the reported increase of transmissibility of a VoC - ```transmissibility_factor```, as well as the respective```host_immunity``` values. Added the Beta and Omicron VoCs.
- ```Talking``` references replaced by ```Speaking```.
- Inclusion of the Toronto temperatures.
Pipeline was fixed according to these changes.Luis AleixoLuis Aleixohttps://gitlab.cern.ch/cara/cara/-/merge_requests/297Ventilation scheme block - Window height, width and opening distance2021-11-25T15:44:05+01:00Luis AleixoVentilation scheme block - Window height, width and opening distanceThis MR solve issues of https://gitlab.cern.ch/cara/cara/-/issues/112:
**Ventilation scheme block:**
* [X] Add the window_type, window_height and window_width as an input
Added the two different window types: ```Sliding/Side-Hung``` a...This MR solve issues of https://gitlab.cern.ch/cara/cara/-/issues/112:
**Ventilation scheme block:**
* [X] Add the window_type, window_height and window_width as an input
Added the two different window types: ```Sliding/Side-Hung``` and ```Top-or Bottom-Hung```. The former does not contain a widget for the ```Width of window (m)```, while the later does. For both window types, ```window_height``` and ```opening_length``` are asked.Luis AleixoLuis Aleixohttps://gitlab.cern.ch/cara/cara/-/merge_requests/296Expert App Ventilation and Resizable window2021-11-24T10:18:07+01:00Luis AleixoExpert App Ventilation and Resizable windowThis MR is the first of some that are going to solve issues of https://gitlab.cern.ch/cara/cara/-/issues/112.
The main implementations on this are:
- Resizable size for **desktop** screens (previously it was hard to view the entire App...This MR is the first of some that are going to solve issues of https://gitlab.cern.ch/cara/cara/-/issues/112.
The main implementations on this are:
- Resizable size for **desktop** screens (previously it was hard to view the entire App on a ```13.3”``` diagonal display, for example).
- Ventilation has now the ```No ventilation``` option.
- Added ```RadioButtons``` for ```Air supply flow rate``` or ```Air changes per hour``` on ```Mechanical Ventilation```.
- Changed header (text and image).
- ```ToggleButtons``` style.
![Screenshot_2021-11-24_at_10.10.13](/uploads/4ee2221b65668ca13155d92c4a54073d/Screenshot_2021-11-24_at_10.10.13.png)Luis AleixoLuis Aleixo