emod_api.demographics.DemographicsTemplates module¶
-
emod_api.demographics.DemographicsTemplates.
NoRisk
()¶ NoRisk puts everyone at 0 risk.
-
emod_api.demographics.DemographicsTemplates.
FullRisk
(demog)¶ FullRisk puts everyone at 100% risk.
-
emod_api.demographics.DemographicsTemplates.
InitRiskUniform
(demog, min_lim=0, max_lim=1)¶ InitRiskUniform puts everyone at somewhere between 0% risk and 100% risk, drawn uniformly.
-
emod_api.demographics.DemographicsTemplates.
InitRiskLogNormal
(demog, mean=0.0, sigma=1.0)¶ InitRiskLogNormal puts everyone at somewhere between 0% risk and 100% risk, drawn from LogNormal.
-
emod_api.demographics.DemographicsTemplates.
InitRiskExponential
(demog, mean=1.0)¶ InitRiskExponential puts everyone at somewhere between 0% risk and 100% risk, drawn from Exponential.
- Parameters
mean (float) – Mean of exponential distribution.
- Returns
json object aka python dict that can be directly passed to Demographics::SetDefaultFromTemplate
- Raises
None –
-
emod_api.demographics.DemographicsTemplates.
NoInitialPrevalence
(demog)¶ NoInitialPrevalence disables initial prevalence; outbreak seeding must be done from an Outbreak intervention (or serialized population).
- Parameters
demog – emod-api.demographics.Demographics instance.
- Returns
None
- Raises
None –
-
emod_api.demographics.DemographicsTemplates.
InitPrevUniform
(demog, prevalence)¶
-
emod_api.demographics.DemographicsTemplates.
InitSusceptConstant
(demog)¶
-
emod_api.demographics.DemographicsTemplates.
EveryoneInitiallySusceptible
(demog, setting=1.0)¶
-
emod_api.demographics.DemographicsTemplates.
StepFunctionSusceptibility
(demog, protected_setting=0.0, threshold_age=1825.0)¶
-
emod_api.demographics.DemographicsTemplates.
SimpleSusceptibilityDistribution
(demog, meanAgeAtInfection=2.5)¶
-
emod_api.demographics.DemographicsTemplates.
DefaultSusceptibilityDistribution
(demog)¶
-
emod_api.demographics.DemographicsTemplates.
MortalityRateByAge
(demog, age_bins, mort_rates)¶ Set (non-disease) mortality rates by age bins. No checks are done on input arrays.
- Parameters
age_bins – list of age bins, with ages in years.
mort_rates – list of mortality rates, where mortality rate is daily probability of dying..
- Returns
N/A.
-
emod_api.demographics.DemographicsTemplates.
MortalityStructureNigeriaDHS
(demog)¶
-
emod_api.demographics.DemographicsTemplates.
get_fert_dist
(path_to_csv)¶ This function takes a fertility csv file (by year and age bin) and populates a DTK demographics.json file, and the corresponding config file to do individual pregnancies by age and year from data.
- Parameters
demog – emod_api.demographics.Demographics instance.
path_to_csv – absolute path to csv input file. The file should have columns for 5-year age bins
"15-19", etc. up to "45-49", and a column named "Years" with values like "1950-1955". (labelled) –
can be extra columns and the columns can be anywhere. (There) –
- Returns
(complex) dictionary. fertility distribution, ready to be added to demographics file.
-
emod_api.demographics.DemographicsTemplates.
InitAgeUniform
(demog)¶
-
emod_api.demographics.DemographicsTemplates.
AgeStructureUNWPP
(demog)¶