Commit graph

520 commits

Author SHA1 Message Date
Luis Aleixo
d09d6f0ec8 methods updated to reflect changes 2024-01-26 10:30:59 +01:00
Luis Aleixo
b498e776f7 updated data registry to reflect changes in test data service 2024-01-26 10:30:37 +01:00
Luis Aleixo
2deba13950 bugfix 2023-12-22 08:37:41 +00:00
Andre Henriques
45b81b1761 Merge branch 'feature/inject-data-service' into 'master'
inject data registry instance instead of static config

Closes #365

See merge request caimira/caimira!476
2023-12-20 14:44:25 +01:00
Luis Aleixo
ddecd91a85 increased version 2023-12-20 13:20:01 +00:00
Luis Aleixo
17a5fa6316 Merge branch 'feature/resizable_histogram' into 'master'
Result uncertainties resizable

See merge request caimira/caimira!477
2023-12-15 14:49:04 +01:00
Luis Aleixo
d3daca23d3 updated enum values and removed fixme references 2023-12-14 15:44:39 +01:00
Nicola Tarocco
00ff1af71d fix enums for data service 2023-12-14 15:34:08 +01:00
Luis Aleixo
d79ef934cb finished injection of data_service param 2023-12-14 15:34:08 +01:00
Luis Aleixo
20e8bf1df7 added data_service attr where needed 2023-12-14 15:34:08 +01:00
Nicola Tarocco
2abdd130cf config: remove Ref: config parsing 2023-12-14 15:34:08 +01:00
Nicola Tarocco
bb51eaa360 config: inject data registry instance instead of static config
* closes #365
2023-12-14 15:34:08 +01:00
Luis Aleixo
e0867f1b27 updated minor version 2023-12-14 14:49:28 +01:00
Luis Aleixo
23c8959244 fixed bug related to specific breaks 2023-12-14 14:49:06 +01:00
Luis Aleixo
503a831f41 result uncertainties resizable 2023-12-13 15:57:57 +01:00
Luis Aleixo
2244a1dd19 updated concentration and dose labels to "Infectious Respiratory Particles" 2023-12-13 09:46:30 +01:00
Luis Aleixo
600cee9c9e minor version update 2023-12-12 16:23:07 +01:00
Nicolas Mounet
d53d62f3f3 Renaming finf in test_full_algorithm 2023-12-12 16:23:07 +01:00
Nicolas Mounet
1f90d08163 Multiplying all emission rate values by 0.305 (average of uniform distribution of f_inf - 0.01 to 0.6) in test_monte_carlo_full_models, to adapt it to f_inf now included in emission rate 2023-12-01 07:35:07 +01:00
Nicolas Mounet
605a2d3fb7 Adapting test_full_algorithm to new concentration with f_inf included (f_inf and HI displaced in SimpleConcentrationModel) 2023-12-01 07:33:26 +01:00
Nicolas Mounet
5b4345e40a Multiplying all known concentrations in test_exposure_model by f_inf=0.5, as concentration is now with f_inf included 2023-12-01 07:32:03 +01:00
Nicolas Mounet
b39131c14c Putting f_inf in emission rate, in models.py, and removing it from dose computation 2023-12-01 07:30:29 +01:00
Luis Aleixo
d70029d0ed Merge branch 'feature/CO2_fit' into 'master'
Fit ventilation and exhalation rates on CO2 sensor data

See merge request caimira/caimira!444
2023-11-22 15:43:00 +01:00
Luis Aleixo
f6abdc91c6 merged tests (custom and fixed) 2023-11-22 14:45:57 +01:00
Luis Aleixo
15e792a3ee modified UI text for CO2 file upload 2023-11-22 14:45:26 +01:00
Luis Aleixo
eca8e035c4 added test for natural and mechanical ventilation fitting algorithm 2023-11-22 10:15:04 +01:00
Nicola Tarocco
6cad72356d
data service: add JWT expiration validation 2023-11-21 14:34:05 +01:00
Luis Aleixo
afdc3cbec8 added explanative text and tooltip question mark 2023-11-21 09:57:21 +01:00
Luis Aleixo
3da67c8c95 add superclass FormData for CO2FormData and VirusFormData 2023-11-21 09:45:42 +01:00
Luis
ac2e8b799d Added validation for the case the header is not a string 2023-11-21 09:45:41 +01:00
Luis
43a6b6e0a6 moved interface methods from init file to co2_model_generator 2023-11-21 09:45:41 +01:00
Luis
96a2b614dc updated validation error message 2023-11-21 09:43:30 +01:00
Luis
0fb4cd895e replaced Population class by simplePopulation on CO2DataModel method 2023-11-21 09:43:29 +01:00
Luis Aleixo
9245166c4a simplified logic for building a CO2 model 2023-11-21 09:43:29 +01:00
Luis Aleixo
446cc88345 removed unused parameters 2023-11-21 09:43:29 +01:00
Luis Aleixo
2c8819934b updated blocking variable name 2023-11-21 09:43:29 +01:00
Luis Aleixo
f05d48221f updated jquery methods namely on the finding mechanism 2023-11-21 09:43:29 +01:00
Luis Aleixo
d377d6ae94 modified procedure to download CO2 template file 2023-11-21 09:43:29 +01:00
Luis Aleixo
3dc0364d2e optimised validation method 2023-11-21 09:43:29 +01:00
Luis Aleixo
58926b7163 updated no file error label 2023-11-21 09:43:29 +01:00
Luis Aleixo
2992b270ff removed ventilation values from plot 2023-11-21 09:43:29 +01:00
Luis Aleixo
9696d413bd deleted input value (not necessary) 2023-11-21 09:43:28 +01:00
Luis Aleixo
5f4a9c3702 added predictive CO2 line and time labels 2023-11-21 09:43:28 +01:00
Luis Aleixo
c83b5cdcab added correct pelt suggestion for transition times 2023-11-21 09:43:28 +01:00
Luis Aleixo
69c1c10f6e modified fitting label and handled error display 2023-11-21 09:43:28 +01:00
Luis Aleixo
f64aeb8c22 replaced more JavaScript entries with jQuery 2023-11-21 09:43:28 +01:00
Luis Aleixo
b0d94f2318 formatting issues and introduction of pelt algorithm to display suggested transition times 2023-11-21 09:43:28 +01:00
Luis Aleixo
1c8775c807 back-end optimizations using heritage 2023-11-21 09:43:28 +01:00
Luis Aleixo
965b931773 validation on the excel file given as input (using SheetJS) 2023-11-21 09:43:27 +01:00
Luis Aleixo
6aa485c3d8 use more css classes 2023-11-21 09:43:27 +01:00
Luis Aleixo
16eac4101a added error handling on valid excel files and replaced plain javascript with jquery calls 2023-11-21 09:43:27 +01:00
Luis Aleixo
effc606fc9 replaced alert message on file upload 2023-11-21 09:43:27 +01:00
Luis Aleixo
ab0ec4c4ca version update and UI bugfix on form submission 2023-11-21 09:43:27 +01:00
Luis Aleixo
7da8cc438e back-end updates for co2 logic 2023-11-21 09:42:16 +01:00
Luis Aleixo
7e29c0c5cf ui modifications on js logic 2023-11-21 09:42:16 +01:00
Luis Aleixo
6581586982 ui modifications on html components 2023-11-21 09:42:15 +01:00
Luis Aleixo
caeaa8c39e renamed clear fitting algorithm method 2023-11-21 09:42:15 +01:00
Luis Aleixo
36d7cc0c3f updated one text entry and variable declaration on JS 2023-11-21 09:42:15 +01:00
Luis Aleixo
e861f6ac4e deal with modal button labels and pre-selected ventilation options 2023-11-21 09:42:15 +01:00
Luis Aleixo
a80c804832 added visualisation for ach table in form and report 2023-11-21 09:42:15 +01:00
Luis Aleixo
780467c195 simplified the way to select previous ventilations 2023-11-21 09:42:15 +01:00
Luis Aleixo
ddfe158467 added report data 2023-11-21 09:42:15 +01:00
Luis Aleixo
be732da4ea form modifications - table format 2023-11-21 09:42:15 +01:00
Luis Aleixo
6c86238743 added ventilation option validations on form 2023-11-21 09:42:15 +01:00
Luis Aleixo
be684ee3a6 added back compatibility (form report -> calculator) 2023-11-21 09:42:14 +01:00
Luis Aleixo
1b8aa4f2c1 fixed download template by adding file to CERNBox resources 2023-11-21 09:42:14 +01:00
Luis Aleixo
7a01d39fba added additional ventilation option 2023-11-21 09:42:14 +01:00
Luis Aleixo
8329376a58 rebased and made respective changes 2023-11-21 09:41:24 +01:00
Luis Aleixo
8d2eb38025 edited form display 2023-11-21 09:41:23 +01:00
Luis Aleixo
33f4491195 added lines to generated plot 2023-11-21 09:41:23 +01:00
Luis Aleixo
147cfe757e UI modifications and CO2 fitting calculation on form side 2023-11-21 09:41:23 +01:00
Luis Aleixo
15d28e1711 added a way to download an excel template; added a preview feature to the display CO2 table 2023-11-21 09:41:23 +01:00
Luis Aleixo
210275fc3d added fixed intervals for all the ventilation types 2023-11-21 09:41:23 +01:00
Luis Aleixo
1217201a4d added missing script file 2023-11-21 09:41:23 +01:00
Luis Aleixo
8ff01f4137 added UI elements for CO2 calculations 2023-11-21 09:41:23 +01:00
Luis Aleixo
827327b70e removed unused references from report generator 2023-11-21 09:40:27 +01:00
Luis Aleixo
b79cb8779d fixed mypy errors 2023-11-21 09:40:27 +01:00
Luis Aleixo
106ceec1f9 added co2 model generator 2023-11-21 09:40:27 +01:00
Luis Aleixo
0518642bd4 adapted model generator to consider data from the co2 fitting 2023-11-21 09:40:27 +01:00
Luis Aleixo
ee989e17fe added server-side endpoint for CO2Data 2023-11-21 09:40:27 +01:00
Luis Aleixo
76ed60aaac updated models.py 2023-11-21 09:40:27 +01:00
Luis Aleixo
e75846a3b2 generate initial CO2 plot 2023-11-21 09:40:27 +01:00
Luis Aleixo
2faeabf05c ui modifications 2023-11-21 09:40:26 +01:00
Luis Aleixo
61fc627e35 added CO2 data class 2023-11-21 09:40:26 +01:00
Luis Aleixo
36d105b358 updated version 2023-11-17 11:38:15 +01:00
Luis Aleixo
34449788cc added # type: ignore annotations and modified default precise activity 2023-11-17 09:16:33 +01:00
Nicola Tarocco
035190564c
refactor data service 2023-11-16 16:11:49 +01:00
Luis Aleixo
e0714d6aad added module init 2023-10-26 17:11:16 +02:00
Luis Aleixo
3f75fc77cd injected parameters in models, model and report generator 2023-10-26 16:29:20 +02:00
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