EMOD_functions.py¶
CfgFn
¶
Obtained from IDM’s emodpy-snt framework that had been modified for bf-seasonal https://github.com/numalariamodeling/bf-seasonal/blob/main/sweeping.py
Sweeping utility: works for sweeping on config parameters. Requirements: - func is a method that takes config as first parameter - func return a dict
Returns: |
|
---|
Source code in EMOD\functions\EMOD_functions.py
ItvFn
¶
Obtained from IDM’s emodpy-snt framework that had been modified for bf-seasonal https://github.com/numalariamodeling/bf-seasonal/blob/main/sweeping.py
Sweeping utility: works for sweeping on interventions. Requirements: - func is a method that takes campaign as first parameter - func return a dict
Returns: |
|
---|
Source code in EMOD\functions\EMOD_functions.py
SwpFn
¶
Sweeping utility: works for sweeping on report, demographics, migrations and climate, etc. Requirements: - func is a method that takes task as first parameter - func return a dict Returns: dict
Source code in EMOD\functions\EMOD_functions.py
all_campaigns(camp, exp=None, row=None, intervention_list=[])
¶
Defines and adds various interventions and campaigns to be included in the campaigns.json
for EMOD.
The function serves as a wrapper that conditionally applies different campaigns based on the values in
the provided row
(e.g., from a scenario DataFrame), experiment configuration (exp
), and the
intervention_list
parameter.
Parameters: |
|
---|
Returns: |
|
---|
Source code in EMOD\functions\EMOD_functions.py
build_burnin_df(exp_id, platform, serialize_days)
¶
Builds a DataFrame containing information about serialized files and simulation configurations
for the burn-in process of the experiment.
The serialized population filenames are in the format: state-{step}-{core}.dtk
, where {step}
refers to
the serialization timestep and {core}
refers to the core number.
The Serialized_Population_Filenames
field varies based on the number of cores used. For example,
if Num_Cores = 2
, the filenames will look like this: state-00050-000.dtk
and state-00050-001.dtk
.
Parameters: |
|
---|
Returns: |
|
---|
Source code in EMOD\functions\EMOD_functions.py
climate_setup(task, seasonality=None)
¶
The function sets up the climate input filenames for EMOD.
Parameters: |
|
---|
Returns: |
|
---|
Source code in EMOD\functions\EMOD_functions.py
create_sim_directory_map(exp_id, platform)
¶
Return a dataframe which contains simulation's working_path and tags.
Args: exp_id: experiment id platform: idmtools platform Returns: dataframe
Source code in EMOD\functions\EMOD_functions.py
get_burnin_exp_name(serialized_df)
¶
Retrieve the name of the EMOD burnin experiment from the metadata.json file Args: serialized_df (DataFrame): A pandas DataFrame containing serialized data information. Returns: str: The name of the burnin experiment as defined in the serialization df from emod_serialized_id.
Source code in EMOD\functions\EMOD_functions.py
get_scendf_burnin(exp, emod_serialized_id, manifest, platform, burnin)
¶
Load the scenarios.csv file associated with the EMOD burnin experiment.
Parameters: |
|
---|
Returns: pandas.DataFrame: A DataFrame containing scenarios from the burn-in experiment.
Source code in EMOD\functions\EMOD_functions.py
get_workdir_from_simulations(platform, comps_simulations)
¶
Get COMPS filepath Args: platform: idmtools Platform comps_simulations: COMPS Simulations Returns: dictionary with simid as key and filepath as value
Source code in EMOD\functions\EMOD_functions.py
habitat_setup(config, exp, row)
¶
Sets up the habitat parameters for malaria vector species in EMOD, based on the climate seasonality and experiment configuration. The function configures different habitat types (“CONSTANT” or “TEMPORARY_RAINFALL”) and larval capacity based on the seasonality condition (‘perennial’ or ‘seasonal’) for the specified malaria species (gambiae).
Parameters: |
|
---|
Returns: |
|
---|
Source code in EMOD\functions\EMOD_functions.py
set_inputEIR_seasonality(camp, EIR_scale_factor=1, seasonality='perennial')
¶
Set input EIR (Entomological Inoculation Rate) based on seasonality.
Parameters: - camp: Campaign object from EMOD. - EIR_scale_factor: Scaling factor for EIR (default is 1). - seasonality: Type of seasonality, either ‘perennial’ or ‘seasonal’ (default is ‘perennial’).
Returns: A dictionary containing the EIR scale factor and the specified seasonality.
Source code in EMOD\functions\forcedEIR.py
set_param(simulation, param, value)
¶
Set specific parameter value Args: simulation: idmtools Simulation param: parameter value: new value Returns: dict
sweep_functions(simulation, func_list)
¶
Obtained from IDM’s emodpy-snt framework that had been modified for bf-seasonal https://github.com/numalariamodeling/bf-seasonal/blob/main/sweeping.py
Apply funcs on simulation. Args: simulation: idmtools Simulation func_list: a list of functions
Returns: |
|
---|
Source code in EMOD\functions\EMOD_functions.py
treatment_camp_simple(camp, cm_start, cm_clinical, cm_severe)
¶
This function helps us establish treatment seeking behavior in an EMOD simulation.
Parameters: - camp: Campaign object from EMOD. - cm_start: Day when the treatment campaign starts. - cm_clinical: Clinical case coverage (float). - cm_severe: Severe case coverage (float).
Returns: A dictionary containing the start day of the treatment campaign, clinical case coverage, and severe case coverage.
Source code in EMOD\functions\interventions.py
update_mab(simulation, value)
¶
Update the Maternal Antibody Protection parameter within the simulation.
Parameters: |
|
---|
Returns: |
|
---|