tlo package
Subpackages
- tlo.analysis package
- Submodules
- tlo.analysis.hsi_events module
is_valid_hsi_event_subclass()get_hsi_event_classes_per_module()get_details_of_defined_hsi_events()sort_hsi_event_details()format_hsi_event_details_as_csv()format_hsi_event_details_as_table()format_hsi_event_details_as_list()merge_hsi_event_details()get_all_defined_hsi_events_as_dataframe()main()
- tlo.analysis.life_expectancy module
- tlo.analysis.utils module
parse_log_file()merge_log_files()write_log_to_excel()make_calendar_period_lookup()make_calendar_period_type()make_age_grp_lookup()make_age_grp_types()to_age_group()get_scenario_outputs()get_scenario_info()load_pickled_dataframes()extract_draw_names()extract_params()extract_results()compute_summary_statistics()summarize()get_grid()format_gbd()create_pickles_locally()compare_number_of_deaths()flatten_multi_index_series_into_dict_for_logging()unflatten_flattened_multi_index_in_logging()LogsDictget_filtered_treatment_ids()colors_in_matplotlib()get_coarse_appt_type()order_of_coarse_appt()get_color_coarse_appt()order_of_short_treatment_ids()get_color_short_treatment_id()order_of_cause_of_death_or_daly_label()get_color_cause_of_death_or_daly_label()squarify_neat()get_root_path()bin_hsi_event_details()compute_mean_across_runs()plot_stacked_bar_chart()plot_clustered_stacked()get_mappers_in_fullmodel()get_parameters_for_status_quo()get_parameters_for_standard_mode2_runs()get_parameters_for_hrh_historical_scaling_and_rescaling_for_mode2()get_parameters_for_improved_healthsystem_and_healthcare_seeking()mix_scenarios()
- tlo.analysis.hsi_events module
- Module contents
- Submodules
- tlo.logging package
- tlo.methods package
- Submodules
- tlo.methods.alri module
- Overview
AlriAlriPollingEventAlriIncidentCaseAlriNaturalRecoveryEventAlriCureEventAlriDeathEventHSI_Alri_TreatmentAlriLoggingEventAlriCheckPropertiesEventAlriIndividualLoggingEventAlriPropertiesOfOtherModulesAlriIncidentCase_Lethal_DangerSigns_PneumoniaAlriIncidentCase_NonLethal_Fast_Breathing_Pneumonia
- tlo.methods.bed_days module
- tlo.methods.bladder_cancer module
- tlo.methods.breast_cancer module
- tlo.methods.cancer_consumables module
- tlo.methods.cardio_metabolic_disorders module
CardioMetabolicDisordersCardioMetabolicDisorders_MainPollingEventCardioMetabolicDisordersEventCardioMetabolicDisordersDeathEventCardioMetabolicDisordersWeightLossEventCardioMetabolicDisorders_LoggingEventHSI_CardioMetabolicDisorders_CommunityTestingForHypertensionHSI_CardioMetabolicDisorders_InvestigationsHSI_CardioMetabolicDisorders_StartWeightLossAndMedicationHSI_CardioMetabolicDisorders_Refill_MedicationHSI_CardioMetabolicDisorders_SeeksEmergencyCareAndGetsTreatment
- tlo.methods.care_of_women_during_pregnancy module
CareOfWomenDuringPregnancyHSI_CareOfWomenDuringPregnancy_FirstAntenatalCareContactHSI_CareOfWomenDuringPregnancy_SecondAntenatalCareContactHSI_CareOfWomenDuringPregnancy_ThirdAntenatalCareContactHSI_CareOfWomenDuringPregnancy_FourthAntenatalCareContactHSI_CareOfWomenDuringPregnancy_FifthAntenatalCareContactHSI_CareOfWomenDuringPregnancy_SixthAntenatalCareContactHSI_CareOfWomenDuringPregnancy_SeventhAntenatalCareContactHSI_CareOfWomenDuringPregnancy_EighthAntenatalCareContactHSI_CareOfWomenDuringPregnancy_FocusedANCVisitHSI_CareOfWomenDuringPregnancy_PresentsForInductionOfLabourHSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCareHSI_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfAnaemiaHSI_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfGestationalDiabetesHSI_CareOfWomenDuringPregnancy_PostAbortionCaseManagementHSI_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancyCareOfWomenDuringPregnancyLoggingEvent
- tlo.methods.causes module
- tlo.methods.cervical_cancer module
CervicalCancerCervicalCancerMainPollingEventCervicalCancer_DeathInStage4HSI_CervicalCancer_Screening_VIAHSI_CervicalCancer_Screening_XpertHSI_CervicalCancer_Presentation_WithVaginalBleedingHSI_CervicalCancer_CINRemoval_CryotherapyHSI_CervicalCancer_CINRemoval_ThermoablationHSI_CervicalCancer_BiopsyHSI_CervicalCancer_Treatment_StartHSI_CervicalCancer_Treatment_PostTreatmentCheckHSI_CervicalCancer_PalliativeCareCervicalCancerLoggingEvent
- tlo.methods.chronicsyndrome module
- tlo.methods.consumables module
- tlo.methods.contraception module
- tlo.methods.copd module
- tlo.methods.demography module
- tlo.methods.depression module
- tlo.methods.diarrhoea module
- tlo.methods.dxmanager module
- tlo.methods.enhanced_lifestyle module
- tlo.methods.epi module
- tlo.methods.epilepsy module
- tlo.methods.equipment module
- tlo.methods.fullmodel module
- tlo.methods.healthburden module
- tlo.methods.healthseekingbehaviour module
- tlo.methods.healthsystem module
- tlo.methods.hiv module
HivHivRegularPollingEventHivInfectionEventHivInfectionDuringBreastFeedingEventHivAidsOnsetEventHivAidsDeathEventHivAidsTbDeathEventHiv_DecisionToContinueOnPrEPHiv_DecisionToContinueTreatmentHivScaleUpEventHSI_Hiv_TestAndReferHSI_Hiv_CircHSI_Hiv_StartInfantProphylaxisHSI_Hiv_StartOrContinueOnPrepHSI_Hiv_StartOrContinueTreatmentHSI_Hiv_EndOfLifeCareHivLoggingEventHivCheckPropertiesEventDummyHivModule
- tlo.methods.hiv_tb_calibration module
- tlo.methods.hsi_event module
- tlo.methods.hsi_generic_first_appts module
- tlo.methods.labour module
LabourLabourOnsetEventLabourAtHomeEventLabourDeathAndStillBirthEventBirthAndPostnatalOutcomesEventHSI_Labour_ReceivesSkilledBirthAttendanceDuringLabourHSI_Labour_ReceivesPostnatalCheckHSI_Labour_ReceivesComprehensiveEmergencyObstetricCareHSI_Labour_PostnatalWardInpatientCareLabourAndPostnatalCareAnalysisEventLabourLoggingEvent
- tlo.methods.labour_lm module
- tlo.methods.malaria module
MalariaMalariaPollingEventDistrictMalariaScaleUpEventMalariaIPTpMalariaEndIPTpProtectionMalariaDeathEventHSI_Malaria_rdtHSI_Malaria_rdt_communityHSI_Malaria_TreatmentHSI_Malaria_Treatment_ComplicatedHSI_MalariaIPTpMalariaUpdateEventMalariaParasiteClearanceEventMalariaLoggingEventMalariaTxLoggingEventMalariaPrevDistrictLoggingEvent
- tlo.methods.measles module
- tlo.methods.mockitis module
- tlo.methods.newborn_outcomes module
- tlo.methods.newborn_outcomes_lm module
- tlo.methods.oesophagealcancer module
- tlo.methods.other_adult_cancers module
- tlo.methods.postnatal_supervisor module
- tlo.methods.postnatal_supervisor_lm module
- tlo.methods.pregnancy_helper_functions module
- tlo.methods.pregnancy_supervisor module
- tlo.methods.pregnancy_supervisor_lm module
- tlo.methods.prostate_cancer module
ProstateCancerProstateCancerMainPollingEventHSI_ProstateCancer_Investigation_Following_Urinary_SymptomsHSI_ProstateCancer_Investigation_Following_Pelvic_PainHSI_ProstateCancer_Investigation_Following_psa_positiveHSI_ProstateCancer_StartTreatmentHSI_ProstateCancer_PostTreatmentCheckHSI_ProstateCancer_PalliativeCareProstateCancerLoggingEvent
- tlo.methods.rti module
RTIRTIPollingEventRTI_Check_Death_No_MedRTI_Recovery_EventHSI_RTI_Imaging_EventHSI_RTI_Medical_InterventionHSI_RTI_Shock_TreatmentHSI_RTI_Fracture_CastHSI_RTI_Open_Fracture_TreatmentHSI_RTI_SutureHSI_RTI_Burn_ManagementHSI_RTI_Tetanus_VaccineHSI_RTI_Acute_Pain_ManagementHSI_RTI_Major_SurgeriesHSI_RTI_Minor_SurgeriesRTI_Medical_Intervention_Death_EventRTI_No_Lifesaving_Medical_Intervention_Death_EventRTI_Logging_Event
- tlo.methods.scenario_switcher module
- tlo.methods.schisto module
- tlo.methods.simplified_births module
- tlo.methods.skeleton module
- tlo.methods.stunting module
- tlo.methods.symptommanager module
- tlo.methods.tb module
TbTbActiveCasePollTbRegularEventsTbScaleUpEventTbActiveEventTbSelfCureEventHSI_Tb_ScreeningAndReferHSI_Tb_ClinicalDiagnosisHSI_Tb_CultureHSI_Tb_Xray_level1bHSI_Tb_Xray_level2HSI_Tb_StartTreatmentHSI_Tb_FollowUpHSI_Tb_Start_or_Continue_IptHSI_Tb_EndOfLifeCareTb_DecisionToContinueIPTTbDecideDeathEventTbDeathEventTbLoggingEventTbCheckPropertiesEventDummyTbModule
- tlo.methods.wasting module
- tlo.methods.alri module
- Module contents
- Submodules
- tlo.test package
Submodules
- tlo.cli module
- tlo.core module
TypesSpecifiableParameterPropertyModuleModule.INIT_DEPENDENCIESModule.OPTIONAL_INIT_DEPENDENCIESModule.ADDITIONAL_DEPENDENCIESModule.ALTERNATIVE_TOModule.METADATAModule.CAUSES_OF_DEATHModule.CAUSES_OF_DISABILITYModule.PARAMETERSModule.PROPERTIESModule.parametersModule.load_parameters_from_dataframe()Module.read_parameters()Module.initialise_population()Module.initialise_simulation()Module.pre_initialise_population()Module.on_birth()Module.on_simulation_end()
- tlo.dependencies module
ModuleDependencyErrorMultipleModuleInstanceErrorget_init_dependencies()get_all_dependencies()get_missing_dependencies()initialise_missing_dependencies()get_all_required_dependencies()topologically_sort_modules()is_valid_tlo_module_subclass()get_module_class_map()get_dependencies_and_initialise()check_dependencies_present()
- tlo.docs module
- tlo.events module
- tlo.lm module
- tlo.population module
- tlo.progressbar module
ProgressBarProgressBar.GLYPHSProgressBar.n_stepProgressBar.descriptionProgressBar.stepProgressBar.prop_completeProgressBar.perc_completeProgressBar.elapsed_timeProgressBar.iter_rateProgressBar.est_remaining_timeProgressBar.n_block_filledProgressBar.n_block_emptyProgressBar.prop_partial_blockProgressBar.filled_blocksProgressBar.empty_blocksProgressBar.partial_blockProgressBar.progress_barProgressBar.bar_colorProgressBar.statsProgressBar.prefixProgressBar.postfixProgressBar.reset()ProgressBar.update()ProgressBar.refresh()ProgressBar.start()ProgressBar.stop()
StreamDisplayAnsiStreamDisplayBasicStreamDisplay
- tlo.scenario module
- tlo.simulation module
SimulationPreviouslyInitialisedErrorSimulationNotInitialisedErrorSimulationSimulation.log_filepathSimulation.register()Simulation.make_initial_population()Simulation.initialise()Simulation.finalise()Simulation.close_output_file()Simulation.run_simulation_to()Simulation.simulate()Simulation.schedule_event()Simulation.fire_single_event()Simulation.do_birth()Simulation.find_events_for_person()Simulation.save_to_pickle()Simulation.load_from_pickle()
EventQueue
- tlo.util module
create_age_range_lookup()transition_states()sample_outcome()BitsetHandlerBitsetHandler.dfBitsetHandler.element_repr()BitsetHandler.to_strings()BitsetHandler.set()BitsetHandler.unset()BitsetHandler.clear()BitsetHandler.has()BitsetHandler.has_all()BitsetHandler.has_any()BitsetHandler.get()BitsetHandler.uncompress()BitsetHandler.not_empty()BitsetHandler.is_empty()
random_date()str_to_pandas_date()hash_dataframe()get_person_id_to_inherit_from()convert_excel_files_to_csv()read_csv_files()parse_csv_values_for_columns_with_mixed_datatypes()
Module contents
The top-level TLO framework module.
We import our key classes so they’re available in the main namespace.
Pandas’ Timestamp is used as our main date type (even though it has nanosecond resolution…)