emodpy_malaria.serialization.zero_infections module#
- emodpy_malaria.serialization.zero_infections.zero_vector_infections(vector_pop_list: list, remove=False)[source]#
Resets infections in vectors or removes infections from vectors.
- Parameters:
vector_pop_list – list of vector population in a node.
remove – If True all infected vectors are removed from serialized population. If set to False (default) all vectors in the simulation are reset to state STATE_ADULT.
- Returns:
None
- emodpy_malaria.serialization.zero_infections.zero_human_infections(humans: List[dict], keep_ids: list | None = None)[source]#
Sets the infection state of individuals to uninfected.
- Parameters:
humans – All humans in a node
keep_ids – ids of individuals that will be skipped, i.e. infection state is not changed
- Returns:
None
- emodpy_malaria.serialization.zero_infections.zero_infections(source_filename: str, dest_filename: str, ignore_nodes: List[int], keep_individuals: List[int], remove=False) None [source]#
Removes/resets infections from humans and vectors.
- Parameters:
source_filename – input file
dest_filename – output file
ignore_nodes – list of node ids. These nodes are skipped.
keep_individuals – Ids of individuals. These individuals are skipped.
remove – If true infections are removed from vectors, if false infections are reset.
- Returns:
None
- emodpy_malaria.serialization.zero_infections.zero_infection_path(in_out_paths: list, ser_date: list, ignore_nodeids: list | None = None, keep_humanids: list | None = None)[source]#
- Loop over all .dtk files in ser_paths that have ser_date in the file name but not ‘zero’ and remove human and
vector infections. ‘_zero’ is appended to the output files.
- Parameters:
in_out_paths – a list of lists of paths for directories to look into for .dtk files
ser_date – List of timestamps
ignore_nodeids – list of nodes that are ignored
keep_humanids – infections are not removed from these humans