DemographicsTemplates
DemographicsTemplatesConstants
Mortality_Rates_Mod30_5yrs_Xval: Mod 30 values closest to the 5 yr age boundaries based on when EMOD actually updates individual mortality rates. The distribution is constant for about 5 years (e.g. values at 0.6 days and 1829.5 days) and linearly interpolated between the 5 yr boundaries.
Source code in emod_api/demographics/DemographicsTemplates.py
16 17 18 19 20 21 22 23 24 25 |
|
FullRisk(demog, description='')
FullRisk puts everyone at 100% risk.
Source code in emod_api/demographics/DemographicsTemplates.py
201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
InitRiskExponential(demog, mean=1.0)
InitRiskExponential puts everyone at somewhere between 0% risk and 100% risk, drawn from Exponential.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mean
|
float
|
Mean of exponential distribution. |
1.0
|
Returns:
Raises:
Source code in emod_api/demographics/DemographicsTemplates.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|
InitRiskLogNormal(demog, mean=0.0, sigma=1.0)
InitRiskLogNormal puts everyone at somewhere between 0% risk and 100% risk, drawn from LogNormal.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mean
|
float
|
Mean of lognormal distribution. |
0.0
|
sigma
|
float
|
Sigma of lognormal distribution. |
1.0
|
Returns:
Raises:
Source code in emod_api/demographics/DemographicsTemplates.py
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
|
InitRiskUniform(demog, min_lim=0, max_lim=1, description='')
InitRiskUniform puts everyone at somewhere between 0% risk and 100% risk, drawn uniformly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_lim
|
float
|
Low end of uniform distribution. Must be >=0, <1. |
0
|
max_lim
|
float
|
High end of uniform distribution. Must be >=min, <=1. |
1
|
description
|
str
|
Why were these values chosen? |
''
|
Returns:
Raises:
Source code in emod_api/demographics/DemographicsTemplates.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
|
MortalityRateByAge(demog, age_bins, mort_rates)
Set (non-disease) mortality rates by age bins. No checks are done on input arrays.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
age_bins
|
list[float]
|
list of age bins, with ages in years. |
required |
mort_rates
|
list[float]
|
list of mortality rates, where mortality rate is daily probability of dying.. |
required |
Returns:
Source code in emod_api/demographics/DemographicsTemplates.py
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
NoInitialPrevalence(demog)
NoInitialPrevalence disables initial prevalence; outbreak seeding must be done from an Outbreak intervention (or serialized population).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
demog
|
Demographics
|
Demographics object |
required |
Returns:
Raises:
Source code in emod_api/demographics/DemographicsTemplates.py
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
|
NoRisk()
NoRisk puts everyone at 0 risk.
Source code in emod_api/demographics/DemographicsTemplates.py
191 192 193 194 195 196 197 198 |
|
SimpleSusceptibilityDistribution(demog, meanAgeAtInfection=2.5)
Rough initialization to reduce burn-in and prevent huge outbreaks at sim start For ages 0 through 99 the susceptibility distribution is set to an exponential distribution with an average age at infection. The minimum susceptibility is 2.5% at old ages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
demog
|
Demographics
|
Demographics object |
required |
meanAgeAtInfection
|
float
|
Rough average age at infection in years. |
2.5
|
Note:
Requires that config.parameters.Susceptibility_Initialization_Distribution_Type=DISTRIBUTION_COMPLEX
Source code in emod_api/demographics/DemographicsTemplates.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
|
get_fert_dist_from_rates(rates)
Create dictionary with DTK-compatible distributions from input vectors of fertility (crude) rates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rates
|
list[float]
|
Array/vector of crude rates for whole population, for a range of years. |
required |
Source code in emod_api/demographics/DemographicsTemplates.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
|