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
FullRisk(demog, description='')
FullRisk puts everyone at 100% risk.
Source code in emod_api/demographics/DemographicsTemplates.py
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
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
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
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
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
NoRisk()
NoRisk puts everyone at 0 risk.
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
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 |