environmental
laser.cholera.metapop.environmental
¶
Environmental-reservoir component — tracks W(t) shedding from infectious people and decay.
Owns model.patches.W (the contaminated-water reservoir, one value per
patch per tick) and model.patches.delta_jt (per-patch decay rate
derived from psi_jt via a Beta CDF map). On each tick:
- Decay: Poisson draw at rate
delta_jt[tick] * W, clamped not to exceed the current reservoir. - Shedding from symptomatic cases: Poisson draw at
zeta_1 * Isym, attenuated by(1 - theta_j)for WASH coverage. - Shedding from asymptomatic cases: Poisson draw at
zeta_2 * Iasym, attenuated the same way.
W is consumed by
EnvToHuman to drive
environmental transmission.
Environmental
¶
Environmental-reservoir component: maintains patches.W per tick.
Attributes:
| Name | Type | Description |
|---|---|---|
model |
The parent |
Source code in src/laser/cholera/metapop/environmental.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
__init__
¶
Allocate W / delta_jt and pre-compute the suitability-to-decay map.
delta_jt is built once from params.psi_jt via
map_suitability_to_decay
(a Beta-CDF interpolator between decay_days_short and
decay_days_long).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Model
|
The |
required |
Raises:
| Type | Description |
|---|---|
AttributeError
|
When |
ValueError
|
When any of |
Source code in src/laser/cholera/metapop/environmental.py
check
¶
Validate Isym / Iasym are available and shedding parameters are present.
Raises:
| Type | Description |
|---|---|
AttributeError
|
When |
ValueError
|
When |
Source code in src/laser/cholera/metapop/environmental.py
__call__
¶
Advance W one tick: carry forward, decay, then shed from infectious cohorts.
Decay is clamped not to exceed W so the reservoir never goes
negative even on extreme Poisson draws. WASH coverage
(1 - theta_j) attenuates the shed amount entering the reservoir.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Model
|
The parent |
required |
tick
|
int
|
Current simulation tick. |
required |
Source code in src/laser/cholera/metapop/environmental.py
plot
¶
Yield three Matplotlib figures: reservoir trajectory, decay heatmap, suitability map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fig
|
Figure
|
Optional existing Matplotlib |
None
|
Yields:
| Type | Description |
|---|---|
str
|
Three labels in order: |
str
|
|
Source code in src/laser/cholera/metapop/environmental.py
map_suitability_to_decay
¶
map_suitability_to_decay(
fast: float,
slow: float,
suitability: ndarray,
beta_a: float,
beta_b: float,
) -> np.ndarray
Map suitability to decay using a beta distribution.
We use a parameterized beta distribution to map suitability values
[0, 1] to [0, 1] in a, potentially, non-linear way.
The resulting suitability factor determines a decay rate that is
large when suitability is low — i.e. when suitability is 0, the
decay rate is 1 / fast and since fast is a short time or small
number of days, 1 / fast is relatively large — and small when
suitability is high — i.e. when suitability is 1, the decay rate
is 1 / slow and since slow is a long time or larger number of
days, 1 / slow is relatively small.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fast
|
float
|
Fast decay time, in days. |
required |
slow
|
float
|
Slow decay time, in days. |
required |
suitability
|
ndarray
|
Suitability values in |
required |
beta_a
|
float
|
Alpha parameter for the beta distribution. |
required |
beta_b
|
float
|
Beta parameter for the beta distribution. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Decay rates corresponding to the suitability values. |