tracts.demography.parametrized_demography.PulseEvent#
- class PulseEvent(rate_parameter, time_parameter, source_population)#
Bases:
BaseMigrationEventA class representing a pulse migration event, parametrized by time and rate.
- time_parameter#
The name of the parameter defining the time of the pulse migration.
- Type:
str
- rate_parameter#
The name of the parameter defining the rate of the pulse migration.
- Type:
str
- source_population#
The name of the source population for the pulse migration.
- Type:
str
- __init__(rate_parameter, time_parameter, source_population)#
Initializes a PulseEvent object.
- Parameters:
rate_parameter (
str) – The name of the parameter defining the rate of the pulse migration.time_parameter (
str) – The name of the parameter defining the time of the pulse migration.source_population (
str) – The name of the source population for the pulse migration.
- execute(parametrized_demography, migration_matrix, params)#
Adds the pulse migration event to the migration matrix.
- Parameters:
parametrized_demography (
BaseParametrizedDemography) – The parametrized demographic model.migration_matrix (
ndarray) – The migration matrix to update.params (
list[float]) – The list of parameter values.