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
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
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: |
|
---|