Commit graph

431 commits

Author SHA1 Message Date
Luis Aleixo
3cc90593c2 infected data in monte carlo data file with helper methods 2023-10-26 16:28:40 +02:00
Luis Aleixo
ac050ee49c adapted defaults from configuration file 2023-10-26 16:27:56 +02:00
Luis Aleixo
ef212f9455 moved data service to separate module and removed logic from caimira calculator module 2023-10-26 16:27:27 +02:00
Luis Aleixo
b1aa3af332 defined global store with configuration 2023-10-26 16:20:44 +02:00
Luis Aleixo
bb0bcebde8 fixed bug on precise activity 2023-10-20 12:40:06 +02:00
CERN\Andrejh
e0b027ef47 Merge branch 'update/commun_text_update' of https://gitlab.cern.ch/cara/cara into update/commun_text_update
# Conflicts:
#	caimira/apps/templates/about.html.j2
2023-10-05 10:10:15 +02:00
CERN\Andrejh
d71b6ad4f2 typos 2023-10-05 10:08:22 +02:00
CERN\Andrejh
febc66af09 additiobal updates 2023-10-05 08:48:15 +02:00
CERN\Andrejh
1a7624fde2 about text update 2023-10-05 08:48:15 +02:00
Andre Henriques
19f4e2c188 update Acknowledgements 2023-10-05 08:48:15 +02:00
CERN\Andrejh
4257d835db additiobal updates 2023-10-04 17:54:42 +02:00
CERN\Andrejh
b5bb363a71 about text update 2023-10-04 17:49:34 +02:00
Nicolas Mounet
e0a321dd86 fixing mypy issue 2023-10-04 16:00:11 +02:00
Nicolas Mounet
9712ffc8ae Adapting zero removal rate case to case when RR is an array 2023-10-04 16:00:11 +02:00
Luis Aleixo
c8f2b32fef modified CO2 concentration when ventilation is close to 0. (RR) 2023-10-04 16:00:11 +02:00
Luis Aleixo
6a9d0c0ec2 expert apps updates following new matplotlib release 2023-10-03 15:14:51 +02:00
Andre Henriques
dd29dbf473 update Acknowledgements 2023-10-03 12:02:00 +02:00
Luis Aleixo
4f1a497954 modified env var fetch method 2023-09-13 09:49:06 +02:00
Luis Aleixo
1d72ef7aa7 increased patch version 2023-09-05 10:17:43 +02:00
Nicolas Mounet
878e4b26cd Increasing number of samples in test_conditional_probability.py 2023-09-02 11:21:17 +02:00
Nicolas Mounet
82f4e14905 relaxing tolerances on conditional prob. test 2023-09-01 16:18:10 +02:00
Nicolas Mounet
f8530d4724 Centering the interval for vl uncertainty computation in report generator -> improving test accuracy 2023-09-01 15:21:04 +02:00
Luis Aleixo
27da077493 added full vl value on key of viral load 2023-08-04 11:17:10 +02:00
Luis Aleixo
77143c13c0 added vl_data on percentiles 2023-08-03 16:16:26 +02:00
Luis Aleixo
1abfe3cfe5 added a method to manufacture conditional probability and send it in the report 2023-08-03 15:01:31 +02:00
Luis Aleixo
96e9aead44 removed manufacture viral load scenarios method and related references 2023-08-03 15:01:06 +02:00
Luis Aleixo
c4d527f1a5 solved seed problem with conditional prob test 2023-08-02 14:49:03 +02:00
Luis Aleixo
6622315dd9 changed mypy type 2023-07-31 17:33:44 +02:00
Luis Aleixo
b6e1afc2a6 Increased test sample size 2023-07-31 17:05:48 +02:00
Luis Aleixo
88c23da962 increased sample size 2023-07-28 17:39:17 +02:00
Luis Aleixo
7d338d3e2d separated vl method and added a test file 2023-07-28 17:39:17 +02:00
Luis Aleixo
fe60e1703f added mypy typing check 2023-07-28 17:39:17 +02:00
Luis Aleixo
b6051778eb modified method to calculate conditional probability 2023-07-28 17:39:16 +02:00
Nicolas Mounet
d26218c7e5 Inputing arguments as keywords in populations definition, in test_exposure_model 2023-07-28 10:34:21 +02:00
Luis Aleixo
8e877ec357 created a simple population class for the CO2 concentration model 2023-07-25 13:18:33 +02:00
Luis Aleixo
68bc8cc6a1 Merge branch 'feature/vl_dist' into 'master'
Propagate viral load distribution to front-end side

See merge request caimira/caimira!457
2023-07-19 18:32:05 +02:00
Luis Aleixo
e732fb48d7 data service: add toggle env var to make it optional 2023-07-19 11:39:39 +02:00
Luis Aleixo
c9a64a2d92 handled exceptions 2023-07-17 17:28:46 +02:00
Luis Aleixo
f9fb2a12fb added a test file 2023-07-17 17:28:09 +02:00
Luis Aleixo
38587c43ef added the data service as an external component (class) 2023-07-17 17:28:09 +02:00
Luis Aleixo
9c33ac1df0 updated server-side logic 2023-07-17 17:28:09 +02:00
Luis Aleixo
6cc6121075 developed server side API connection to Service Data (WP3) 2023-07-17 17:28:09 +02:00
Luis Aleixo
43630cda2c added logarithm of viral load distribution to jinja variable 2023-07-14 11:23:42 +02:00
Luis Aleixo
2d1e8af30f added viral load distribution as a variable to display in the front-end side 2023-07-12 17:11:03 +02:00
Nicolas Mounet
fcee962a83 Merge branch 'feature/dose_list' into 'master'
New logic for probability of infection

See merge request caimira/caimira!451
2023-06-29 15:07:00 +02:00
Luis Aleixo
07d692b964 expanded pytest raises on tests to each single case 2023-06-29 10:02:26 +01:00
Luis Aleixo
2ec9a7f262 removed unused block of code 2023-06-29 10:01:59 +01:00
Andre Henriques
f6579fb31a Merge branch 'feature/CO2_profile' into 'master'
CO₂ Concentration Plot

Closes #307 and #297

See merge request caimira/caimira!428
2023-06-16 14:58:58 +02:00
Luis Aleixo
96da4cc980 version update 2023-06-15 14:53:52 +02:00
Luis Aleixo
706c352392 removed unused methods 2023-06-13 16:00:30 +02:00
Luis Aleixo
f45ca3904d added logic with IntPiecewiseConstant for dynamic CO2 2023-06-13 15:58:27 +02:00
Luis Aleixo
a261ac4bf0 added method to combine different present intervals 2023-06-12 15:19:55 +02:00
Luis Aleixo
4f6a967864 added way to determine size of tooltip 2023-06-12 15:19:06 +02:00
Luis Aleixo
800578f031 adjustments to d3 plot 2023-06-12 15:19:06 +02:00
Luis Aleixo
34cdfa536c changed color scheme for build generic graph 2023-06-12 15:19:06 +02:00
Luis Aleixo
bc7dae3610 changed CO2 label and added hlines with legends 2023-06-12 15:19:06 +02:00
Luis Aleixo
b17a1b991a modified draw alternative scenarios method to be a generic plot and added export CO2 cvs data 2023-06-12 15:19:06 +02:00
Luis Aleixo
e67960e035 added methods to generate CO2 model 2023-06-12 15:19:06 +02:00
Luis Aleixo
6bfebc76d4 added frontend visualisation for CO2 plot 2023-06-12 15:17:40 +02:00
Luis Aleixo
290ffcf3d0 fixed x attribute for dash line (mean of PI) on histogram 2023-06-12 14:22:58 +02:00
Luis Aleixo
422d2245c5 dose list implementation 2023-06-08 16:46:05 +02:00
Luis Aleixo
c42c2b0b8b turned infection probability method private 2023-06-08 16:46:05 +02:00
Luis Aleixo
a16957d319 updated deposited_exposure method and infection probability tests 2023-06-08 16:46:05 +02:00
Luis Aleixo
e8cf3d160a adapted dynamic total probability rule 2023-06-08 16:46:05 +02:00
Luis Aleixo
ec54c40785 added probability of infection based on dynamic occupants 2023-06-08 16:46:05 +02:00
Luis Aleixo
2a3c598488 updated dynamic total_prob_rule method 2023-06-08 16:46:05 +02:00
Luis Aleixo
df77bdd1b5 tests for incidence rate 2023-06-08 16:46:05 +02:00
Luis Aleixo
77c0c5f3a6 dynamic exposed for incidence rate 2023-06-08 16:46:05 +02:00
Nicola Tarocco
a9ce6d9c8d
remove Git LFS and change data file URL
* removes the Excel file stored in Git LFS and disable LFS
* replaces the local Excel file with an URL to download the file from a
  static website
2023-06-07 11:39:56 +02:00
Luis Aleixo
4bf8c73d1b fixed spacing issue 2023-06-02 14:51:36 +02:00
Luis Aleixo
a547700779 removed results from report and re-added timeout values 2023-06-02 14:49:18 +02:00
Luis Aleixo
d04869ce16 added generation of conditional probability of infection values based on form condition 2023-06-02 14:42:38 +02:00
Luis Aleixo
7542683da2 added two more viral load scenarios 2023-06-01 17:20:39 +02:00
Luis Aleixo
96b6a84b76 improved report generator methods 2023-06-01 16:31:04 +02:00
Luis Aleixo
207606e97e added more vl values for calculation 2023-05-31 16:52:30 +02:00
Luis Aleixo
ca786d7e7f added results with different viral load values 2023-05-31 16:36:56 +02:00
Luis Aleixo
0cb6477cb2 modified file name and references. removed unused variables 2023-05-26 09:44:47 +02:00
Luis Aleixo
1171e51f90 removed private reference for DEFAULT_DATA variables 2023-05-25 16:43:45 +02:00
Luis Aleixo
14a6fb73a7 adapted model_generator validation references 2023-05-25 16:43:45 +02:00
Luis Aleixo
98f6e3446b added default data file 2023-05-25 16:43:45 +02:00
Luis Aleixo
ce99afb965 added static url to base urls 2023-05-15 10:23:14 +02:00
Luis Aleixo
4e6b7479e6 fixed breaking condition 2023-05-15 10:02:11 +02:00
Luis Aleixo
f1b0ad1e30 base urls definition 2023-05-12 16:55:31 +02:00
Luis Aleixo
5525df36eb version update 2023-05-12 09:15:25 +02:00
Luis Aleixo
18978aef20 adapted deployment configs 2023-05-09 17:20:34 +02:00
Luis Aleixo
7fd0e0f8ec updated env var EXTRA_PAGES structure 2023-05-09 17:13:46 +02:00
Luis Aleixo
fb18a2a715 added tests for generic pages 2023-05-08 11:18:11 +02:00
Luis Aleixo
2d3a925fc5 adapted init methods to consider readme and about pages as generic 2023-05-08 10:55:02 +02:00
Luis Aleixo
74dd8ed6e8 applied matomo script code 2023-05-05 16:33:19 +02:00
Luis Aleixo
7cbe9bb050 updated version 2023-05-03 16:35:01 +02:00
Luis Aleixo
022abad186 updated branch according to review: - new presence_interval() method in the population class that avoids repetition of if conditions through the code. - typo fix. -tests were updated accordingly 2023-04-28 12:05:30 +02:00
Luis Aleixo
bcb1d1012a modified dynamic tests for InfectedPopulation 2023-04-28 08:54:59 +02:00
Nicolas Mounet
fe19cb5976 Change all normalization factors and emission rates (when present) into 'per person' quantities (i.e. do not normalize anymore by the number of infected people) - to allow dynamic number of infected people. Changing the test accordingly, and the documentation. Adding a __post_init__ check in ExposureModel to forbid the use of dynamic number of exposed people, for now. 2023-04-28 08:54:59 +02:00
Luis Aleixo
e494151d78 added test for dynamic and static population 2023-04-28 08:54:59 +02:00
Luis Aleixo
801955317f added verifications for unexpected jumps 2023-04-28 08:54:58 +02:00
Luis Aleixo
70f7e86524 test for dynamic occupants 2023-04-28 08:54:58 +02:00
Luis Aleixo
fe7cbf45b7 added expert apps validation for presence times 2023-04-28 08:54:58 +02:00
Luis Aleixo
a3d66b8463 updated number of points per hour to be 15 instead of 25 2023-04-26 15:16:33 +02:00
Luis Aleixo
e4636e5fe6 interesting times to be proportional to the simulation time 2023-04-26 15:16:33 +02:00
Luis Aleixo
be828b05b4 fixed mechanical ventilation typo in expert app 2023-04-19 16:57:53 +02:00
Luis Aleixo
0e1f5b404e typo in mechanival_w 2023-04-19 16:02:40 +02:00
Luis Aleixo
997344fa5d removed voila and pytest-mypy pins 2023-04-19 15:57:01 +02:00
Luis Aleixo
f6abd5f6fd removed pin from mypy 2023-04-18 17:21:21 +02:00
Luis Aleixo
d21ff6cafa added customization for error pages 2023-04-13 16:24:49 +02:00
Luis Aleixo
3b29ac8299 increased release number (minor update) 2023-03-31 09:56:13 +02:00
Luis Aleixo
308c469f81 updated plot labels and legend 2023-03-31 09:55:39 +02:00
Luis Aleixo
2289c99e70 fixed card issues 2023-03-31 09:55:39 +02:00
Luis Aleixo
370852367c fixed bug with set_cookie 2023-03-31 09:55:39 +02:00
Luis Aleixo
39b00701c3 added conditional logic to render uncertainties plots 2023-03-31 09:55:38 +02:00
Luis Aleixo
de07bdcd79 adapted method for uncertainties plot 2023-03-31 09:55:38 +02:00
Luis Aleixo
f199e974d5 added checkbox for conditional probability generation 2023-03-31 09:55:38 +02:00
Luis Aleixo
8b25fb631c removed tqdm package 2023-03-31 09:55:38 +02:00
Luis Aleixo
d7039a958a added method to generate P(I|vl) uncertainties graphs 2023-03-31 09:55:38 +02:00
Luis Aleixo
188ed7a531 added mean line on histogram plot 2023-03-31 09:55:38 +02:00
Luis Aleixo
f54aab1d46 d3 implementation for poi bins 2023-03-31 09:55:38 +02:00
Luis Aleixo
f26bc0f2af removed beta from expert app and increased version (minor) 2023-03-23 15:36:14 +01:00
Luis Aleixo
8a72d27fb1 updated expert app notebook and tests 2023-03-23 12:02:19 +01:00
Luis Aleixo
1f6b3dd96e added workaround for default ventilation 2023-03-23 11:40:00 +01:00
Luis Aleixo
61f13655fd updated file names 2023-03-23 11:37:48 +01:00
Luis Aleixo
ee29f12f35 updated typos and got back the state tests 2023-03-23 11:37:48 +01:00
Luis Aleixo
9c810e17e8 updated ventilation scheme 2023-03-23 11:37:47 +01:00
Luis Aleixo
9d52bd41ec added scenario default values 2023-03-23 11:37:47 +01:00
Luis Aleixo
b01a4efd46 added co2 atmospheric concentration widget 2023-03-23 11:37:47 +01:00
Luis Aleixo
8014497699 added handles for labels. remove button is working. fixed ventilation start time 2023-03-23 11:37:47 +01:00
Luis Aleixo
25cea29532 updated correct package versions 2023-03-23 11:37:47 +01:00
Luis Aleixo
a15f32d2a7 reversed tab namming 2023-03-23 11:37:06 +01:00
Luis Aleixo
830c0d0edb modified test values to consider min ventilation 2023-03-23 11:35:40 +01:00
Luis Aleixo
8782069a9c added services and fixed ventilation 2023-03-23 11:35:40 +01:00
Luis Aleixo
3d7332644d bounded min value for start ventilation 2023-03-23 11:35:40 +01:00
Luis Aleixo
0f8dd421c6 updated simulator image 2023-03-23 11:35:40 +01:00
Luis Aleixo
1770c31977 used lower case for CO2 app 2023-03-23 11:35:39 +01:00
Luis Aleixo
22f12f67b0 updated expert app layout 2023-03-23 11:35:39 +01:00
Luis Aleixo
4a965edde6 fixed mypy errors 2023-03-23 11:35:39 +01:00
Luis Aleixo
11be1abf8e initial tests for CO2_expert 2023-03-23 11:35:39 +01:00
Luis Aleixo
730e584590 changed min and max values for presence widgets 2023-03-22 15:33:02 +01:00
Luis Aleixo
f3a0ebaa91 modified presence widgets 2023-03-22 10:35:15 +01:00
Luis Aleixo
b734d3550d removed unused script files 2023-03-21 09:18:51 +00:00
Luis Aleixo
57f125b072 added relative paths to the functions 2023-03-21 09:18:39 +00:00
Luis Aleixo
b010c5348f added missing rstrip to calculator prefix 2023-03-20 15:54:33 +00:00
Luis Aleixo
b5586bb748 fixed paths on templates 2023-03-17 15:36:34 +01:00
Luis Aleixo
24e530cb11 adapted test test_webapp.py 2023-03-17 12:09:15 +01:00
Luis Aleixo
1146cf76c9 modified templates to consider a relative path 2023-03-17 12:08:58 +01:00
Luis Aleixo
ae54c55872 adapted code to receive an APPLICATION_ROOT 2023-03-17 12:07:56 +01:00
Luis Aleixo
8cb749abb2 added favicon 2023-02-22 17:10:04 +01:00
Luis Aleixo
e97065cef0 updated ipywidgets according to new documentation 2023-02-16 12:25:42 +01:00
Luis Aleixo
3e9ad0b933 modified method to update plot lines on expert app 2023-02-14 10:24:51 +01:00
Luis Aleixo
aa2030b2ab added a method to get a nested attribute on a dataclass 2023-02-13 15:04:35 +01:00
Luis Aleixo
70c7c8689a fixed precise activity bug for exposed population 2023-02-10 11:03:06 +01:00
Andre Henriques
52d634923b Merge branch 'feature/CO2_profile' into 'master'
CO2 concentration

See merge request caimira/caimira!412
2023-01-31 09:20:41 +01:00
Luis Aleixo
6197e3962f Updated documentation and added a docstring to the newly created tests 2023-01-30 16:30:31 +01:00
Luis Aleixo
eed3629dd5 handled the case when the removal rate is 0 and changed documentation 2023-01-27 16:47:39 +01:00
Luis Aleixo
f880046384 added a test for the zero ventilation rate case 2023-01-27 16:46:52 +01:00
Luis Aleixo
75aa7dbd0f fixed missing activity type 2023-01-24 16:08:41 +01:00
Luis Aleixo
f14aa0a8a5 added logic for precise breaks for both infected and exposed 2023-01-23 11:11:08 +01:00
Luis Aleixo
9e2957931c Updated UML diagram 2023-01-11 15:23:07 +01:00
Luis Aleixo
e59d4b3d59 updated background_concentration name to min_background_concentration 2023-01-11 13:54:05 +01:00
Luis Aleixo
2043f34b69 updated atmospheric concentration to background concentration (more generic) 2023-01-10 13:06:02 +01:00
CERN\Andrejh
86444b4dc0 update documentation 2023-01-10 13:01:49 +01:00
Luis Aleixo
2b71d586ef added tests on vectorisation for an integrated concentration 2023-01-10 12:31:24 +01:00
Luis Aleixo
1e0d0a8de2 updated documentation and added tests for the integrated concentration 2023-01-10 09:51:44 +01:00
Luis Aleixo
371145c062 increased version number 2023-01-10 09:51:44 +01:00
Nicolas Mounet
2a481c1500 Correcting bug in models._ConcentrationModelBase (wrong value of concentration_limit when no one is present, for non-zero atmospheric concentration) 2023-01-10 09:51:44 +01:00
Luis Aleixo
dc12ee3359 Initial atmosphere_concentration normalized 2023-01-10 09:51:44 +01:00
Nicolas Mounet
ec6add4881 Solving a failing mypy test in test_full_algorithm 2023-01-10 09:51:44 +01:00
Nicolas Mounet
266a3727e8 Changing structure of CO2 concentration model. Renaming one input of ConcentrationModel (infected->population) since it is now inherited from _ConcentrationModelBase, which requires subsequent changes in the apps. 2023-01-10 09:51:44 +01:00
Luis Aleixo
17644f3259 added percentage of BR for CO2 as input parameter 2023-01-10 09:51:44 +01:00
Luis Aleixo
a7a9ca43da Removed co2 activities and adapted formula 2023-01-10 09:51:43 +01:00
Luis Aleixo
2e5559d017 added CO2 initial room concentration on the formula 2023-01-10 09:51:43 +01:00
Luis Aleixo
fe9a593122 adapted co2 formula to have an initial state 2023-01-10 09:51:43 +01:00
Luis Aleixo
35e64674a4 added initial state change 2023-01-10 09:51:43 +01:00
Luis Aleixo
980a97c0cb correction of initial value 2023-01-10 09:51:43 +01:00
Luis Aleixo
9a9dd91835 added co2 concentration time 2023-01-10 09:51:43 +01:00
Luis Aleixo
b04ebcfaf6 fixed numpy update error 2023-01-10 09:45:08 +01:00
Andre Henriques
1290f57deb Merge branch 'feature/bug_report_form' into 'master'
Check for nan values on probabilistic exposure

Closes #295

See merge request caimira/caimira!420
2022-12-15 17:32:40 +01:00
Luis Aleixo
87318a72c8 check for nan values on probabilistic exposure 2022-12-15 16:12:30 +00:00
Luis Aleixo
37d699d483 updated GitLab repository URL 2022-12-15 14:30:11 +00:00
Andre Henriques
d3a7fa5f2f Merge branch 'feature/global_incident_rates' into 'master'
Global incident rates

Closes #279

See merge request cara/caimira!405
2022-12-12 10:28:11 +01:00
Luis Aleixo
d2ea27ce79 removed ARIA references 2022-12-06 10:03:24 +01:00
Luis Aleixo
21953de4a2 added reference for external dependencies (react) in calculator.form.html.j2 file 2022-12-06 09:59:57 +01:00
Luis Aleixo
388465ba9b added tests for simulation time start and end with breaks 2022-12-06 09:59:57 +01:00
Luis Aleixo
0b37aeca7d added tests for aria breaks and precise activities 2022-12-06 09:59:57 +01:00
Luis Aleixo
180bf4dae5 completed validation on ARIA inputs model_generator 2022-12-06 09:59:57 +01:00
Luis Aleixo
5cce495692 changed precise activity type object structure 2022-12-06 09:59:57 +01:00
Luis Aleixo
06eaaf7dd1 added additional typing return types 2022-12-06 09:59:57 +01:00
Luis Aleixo
8cccb0eba9 added method and validation to generate precise activities from ARIA 2022-12-06 09:59:57 +01:00
Luis Aleixo
f8eb35f18b added a method to generate break times based on ARIA inputs 2022-12-06 09:59:57 +01:00
Luis Aleixo
a4b2801f0b additional typo 2022-12-05 17:08:09 +01:00
Luis Aleixo
09c22cda6e typo issue 292 2022-12-05 17:04:52 +01:00
Luis Aleixo
1cbc1d1113 handle WHO message when input changes by user 2022-11-29 16:50:54 +01:00
Luis Aleixo
2d909bc905 Added a 0-value verification for geographical cases 2022-11-25 16:19:46 +01:00
Luis Aleixo
5915a0d520 used 7-day rolling average 2022-11-25 16:19:45 +01:00
Luis Aleixo
1a93439984 added incidence rate from API to UI 2022-11-25 16:19:45 +01:00
Luis Aleixo
917567c5df added server side API for global incident rates 2022-11-25 16:18:48 +01:00
Andre Henriques
20b65b6081 Merge branch 'feature/HI_data' into 'master'
Host Immunity Data

See merge request cara/caimira!401
2022-11-23 16:54:52 +01:00
Luis Aleixo
e3215d0f5c added return type for function that has variable annotations 2022-11-18 11:55:09 +01:00
Luis Aleixo
2b19ea163f updated userguide for VE data and moved vaccination block under virus type 2022-11-14 08:57:16 +01:00
Luis Aleixo
db85c41fa0 added VE script and excel file 2022-11-10 16:09:33 +01:00
Luis Aleixo
a239b4f1ba Increased version number 2022-11-10 16:09:33 +01:00
Luis Aleixo
e82f6e58d2 test for host immunity vectorisation 2022-11-10 16:09:32 +01:00
Luis Aleixo
98b08a05e0 moved select options (primary and booster vaccines) to JS 2022-11-10 16:09:32 +01:00