emodpy.analyzers.population_analyzer module#

class emodpy.analyzers.population_analyzer.PopulationAnalyzer(name='idm')[source]#

Bases: IAnalyzer


Call once after the analyzer has been added to the AnalyzeManager.

Add everything depending on the working directory or unique ID here instead of in __init__.

map(data: Any, item: IItem) Any[source]#

In parallel for each simulation/work item, consume raw data from filenames and emit selected data.

  • data – A dictionary associating filename with content for simulation data.

  • itemIItem object that the passed data is associated with.


Selected data for the given simulation/work item.

reduce(all_data: dict) Any[source]#

Combine the map() data for a set of items into an aggregate result.


all_data – A dictionary with entries for the item ID and selected data.