Skip to content

Commit 748fe41

Browse files
committed
Merge branch 'main' gf github.com:Priesemann-Group/testing-artefacts-pharmaco-multipath
forgot to push
2 parents e6bd820 + 0e23e76 commit 748fe41

File tree

5 files changed

+1010
-676
lines changed

5 files changed

+1010
-676
lines changed

notebooks/bigHIVmodel.ipynb

Lines changed: 323 additions & 119 deletions
Large diffs are not rendered by default.

notebooks/min_PrEP_VS_lambda_P.ipynb

Lines changed: 463 additions & 339 deletions
Large diffs are not rendered by default.

notebooks/notebook_for_final_fig.ipynb

Lines changed: 204 additions & 217 deletions
Large diffs are not rendered by default.

src/tapm/HIVandSTI/bigmodel_STI.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ def duration2rate(x):
9999
[14.0, 24.0, 167.0, 203.0],
100100
[15.0, 40.0, 120.0, 203.0],
101101
[10.0, 38.0, 141.3, 203.0],
102+
[2.0, 80.0, 53.3, 200.0],
103+
[2.0, 63.5, 100.0, 200.0],
104+
[75, 39, 18.5, 2],
102105
])
103-
c = sets_of_c[2]
106+
c = sets_of_c[2] # 2, 5, 7
104107

105108
#H = 5.0 # HIV hazard
106109
#P = 50.0 # PrEP fraction

src/tapm/utils.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ def save_results(results, filename):
1919
np.save(f"../results/{filename}.npy", results)
2020
logger.info(f"Results saved to ../results/{filename}.npy")
2121

22+
# Load the results from a file
23+
def load_results(filename):
24+
"""
25+
Load the results from a file.
26+
27+
Parameters:
28+
filename (str): Name of the file to load the results from.
29+
30+
Returns:
31+
dict: Loaded results.
32+
"""
33+
# Load the results from a file
34+
results = np.load(f"../results/{filename}.npy", allow_pickle=True).item()
35+
logger.info(f"Results loaded from ../results/{filename}.npy")
36+
return results
37+
2238

2339
# Define a function to read and evaluate the file
2440
# PD: using np and jnp in calculation of args in HIVandSTI.py (in fraction2rate() etc.)

0 commit comments

Comments
 (0)