helper_simulation.py¶
check_exp_input_parameters(exp)
¶
Validates the input parameters and experiment configuration.
This function performs the following checks: 1. Verifies that the ‘agebins’ parameter contains all age groups referenced in ‘age_groups_aggregates’. 2. Ensures that ‘agebins’ includes both the values 2 and 10. 3. Confirms that the ‘seasonality’ parameter contains no more than two seasonality patterns.
Parameters: |
|
---|
Raises: |
|
---|
Source code in utility\helper_simulation.py
check_exp_inputs_emod(exp)
¶
Checks input parameter compatibility with the framework configurations for EMOD.
This function performs the following checks: 1. Ensures that only a single seed is specified for EMOD burn-in simulations. 2. Issues a warning if the burn-in period is less than 100 years, which may lead to inaccurate results. 3. Issues a warning if the population size is below 1000, which may lead to inaccurate results. 4. Issues a warning if the population size exceeds 10000, which may cause computational or memory issues.
Parameters: |
|
---|
Raises: |
|
---|
Source code in utility\helper_simulation.py
check_exp_inputs_malariasimulation(exp)
¶
Checks input parameter compatibility with the framework configurations for malariasimulation
This function performs the following checks: 1. Raises a ValueError if the ‘forced EIR’ option is selected for entomology mode, as it is not supported. 2. Issues a warning if the burn-in period is less than 80 years, which may lead to inaccurate results. 3. Issues a warning if the population size is below 1000, which may lead to inaccurate results.
Parameters: |
|
---|
Raises: |
|
---|
Source code in utility\helper_simulation.py
check_exp_inputs_openmalaria(exp)
¶
Checks input parameter compatibility with the framework configurations for OpenMalaria.
This function performs the following checks: 1. Issues a warning if OpenMalaria is configured with 30-day survey steps and a 5-day analyzer, as this configuration will cause errors during post-processing. 2. Raises a ValueError if the ‘ccstep’ intervention is specified with 30-day survey steps, which is incompatible. 3. Issues a warning if the burn-in period is less than 80 years, which may lead to inaccurate results. 4. Issues a warning if the population size is below 10000, which may lead to inaccurate results.
Parameters: |
|
---|
Raises: |
|
---|
Source code in utility\helper_simulation.py
get_intervention_params(exp)
¶
Retrieve intervention parameters for a specific experiment.
Parameters: - exp: Experiment object.
Returns: Intervention parameters based on the specified experiment.
Source code in utility\helper_simulation.py
get_seasonal_eir(exp=None)
¶
Generates seasonal EIR (Entomological Inoculation Rate) values.
Examples:
season_daily, season_month, seasonal, perennial = get_seasonal_eir() exp = get_seasonal_eir(exp)
Parameters: |
|
---|
Returns: |
|
---|
Source code in utility\helper_simulation.py
get_simulation_time_params(exp)
¶
Calculates simulation time parameters for EMOD, malariasimulation and OpenMalaria based on the provided arguments.
Parameters: |
|
---|
Returns: |
|
---|
Source code in utility\helper_simulation.py
monthly_to_daily_EIR(monthly_EIR)
¶
Convert monthly EIR values to daily using cubic spline interpolation.
Parameters: |
|
---|
Returns: |
|
---|
Source code in utility\helper_simulation.py
param_variation(df, exp)
¶
Perform parameter variation for malariasimulation simulations.
Parameters: - df: DataFrame containing data from scenarios.csv. - exp: Experiment object.
Returns: DataFrame with added column ‘malariasimulation_pv’ representing malariasimulation parameter variation values.
Source code in utility\helper_simulation.py
submit_run_plotters(exp)
¶
Submits a plotter job for execution, either locally or via SLURM based on the HPC configuration: - If running locally, it generates and submits the plotter job using a local submission script. - If using SLURM, it delegates the submission to the SLURM-specific plotter submission function.
Parameters: |
|
---|