Skip to content

malaria_challenge

add_challenge_trial(campaign, start_day=0, node_ids=None, demographic_coverage=1, infectious_bites=5, sporozoites=0, intervention_name='MalariaChallenge')

Add an intervention to distribute an infectious challenge mosquito bites or sporozoites to individuals
to the campaign using the **MalariaChallenge** class, a node-level intervention.

Parameters:

Name Type Description Default
campaign EMODCampaign

A campaign builder that also contains schema_path parameters

required
start_day int

The day to distribute the intervention; default = 0.

0
node_ids list

List of nodes to which to distribute the intervention. [] or None, indicates all nodes will get the intervention

None
demographic_coverage float

The fraction of individuals receiving the challenge

1
infectious_bites int

The number of infectious bites a person is challenged with, Default: 5 sprorozoites needs to be set to 0

5
sporozoites int

The number of sporozoites a person is challenged with. Default: 0. To use "sporozoites", set infectious_bites to 0.

0
intervention_name str

The optional name used to refer to this intervention as a means to differentiate it from others that use the same class.

'MalariaChallenge'
Source code in emodpy_malaria/interventions/malaria_challenge.py
def add_challenge_trial(campaign, start_day: int = 0, node_ids: list = None, demographic_coverage: float = 1,
                        infectious_bites: int = 5, sporozoites: int = 0, intervention_name: str = "MalariaChallenge"):
    """
        Add an intervention to distribute an infectious challenge mosquito bites or sporozoites to individuals
        to the campaign using the **MalariaChallenge** class, a node-level intervention.

    Args:
        campaign (emodpy.campaign.emod_campaign.EMODCampaign): A campaign builder that also contains schema_path parameters
        start_day: The day to distribute the intervention; default = 0.
        node_ids: List of nodes to which to distribute the intervention. [] or None, indicates all nodes
            will get the intervention
        demographic_coverage: The fraction of individuals receiving the challenge
        infectious_bites: The number of infectious bites a person is challenged with, Default: 5
            sprorozoites needs to be set to 0
        sporozoites: The number of sporozoites a person is challenged with. Default: 0. To use "sporozoites", set
            infectious_bites to 0.
        intervention_name: The optional name used to refer to this intervention as a means to differentiate it from
            others that use the same class.
    """
    if sporozoites and infectious_bites:
        raise ValueError("Please enter a positive value for either 'infectious_bites' or 'sporozoites', but not both.\n")

    intervention = _malaria_challenge(campaign, demographic_coverage=demographic_coverage,
                                      infectious_bites=infectious_bites, sporozoites=sporozoites,
                                      intervention_name=intervention_name)

    add_campaign_event(campaign, start_day=start_day, node_ids=node_ids, node_intervention=intervention)