Skip to content

TimeDomainModel

TimeDomainModel(pole_residue_matrix, time_step)

Time-domain model based on a pole-residue representation of an S matrix.

Args

  • pole_residue_matrix (PoleResidueMatrix): Underlying pole-residue matrix.
  • time_step (float): Time step to be used for this model.

Example

>>> pole_res = pf.PoleResidueMatrix(
... poles=[-pf.C_0 / 1.0],
... residues={("P0", "P0"): [2.0 * pf.C_0, 0.0]},
... )
>>> time_domain = pf.TimeDomainModel(pole_res, time_step=0.001)

Note

Time-domain models cannot be added to components at the moment. Component models are only those used to compute frequency-domain S parameters.

MethodDescription
copyCreate a copy of this time-domain model.
resetReset the internal model state.
stepCompute the outputs for multiple time steps.
step_singleCompute the output for a single time step using array-based API.

copy(self)

Create a copy of this time-domain model.

Returns

TimeDomainModel: New copy.

reset(self)

Reset the internal model state.

Returns

TimeDomainModel: This object.

step(self, inputs=None, steps=0, time_step=0, show_progress=True)

Compute the outputs for multiple time steps.

Note

This method is not thread-safe. Do not call step concurrently from multiple threads on the same TimeDomainModel instance. For parallel simulations, create separate model instances (e.g., via copy()) for each thread.

Args

  • inputs (TimeSeries | None): Inputs to the time domain model. If None, uses zero inputs for steps time steps.
  • steps (int): The number of time steps to execute. Only used if inputs is None.
  • time_step (float): The interval between time steps (in seconds). Only used if inputs is None. Must match the model’s time_step attribute.
  • show_progress (bool): If True, show computation progress.

Returns

TimeSeries: Computed outputs.

step_single(
self, inputs, outputs, time_index=0, update_state=True, shutdown=False
)

Compute the output for a single time step using array-based API.

Note

This method is not thread-safe. Do not call it concurrently from multiple threads on the same TimeDomainModel instance, even with update_state=False. For parallel simulations, create a separate model instance (e.g., via copy()) for each thread.

Args

  • inputs (ndarray): Input values at the current time step. Must be a contiguous 1D array of complex values ordered according to keys.
  • outputs (ndarray): Pre-allocated output array where results will be stored. Same size and type as inputs.
  • time_index (int): Time series index for the current input. Not used.
  • update_state (bool): Whether to update the internal model state.
  • shutdown (bool): Whether this is the last call. Not used.

Returns

None. Results are written in-place to the outputs array.

AttributeDescription
keystuple[str]: input/output array keys (read only).
path_delaysdict[tuple[str, str], int]: Minimum delay in time steps of each fitted (input key, output key) path (read only).
pole_residue_matrixPoleResidueMatrix: Underlying pole-residue matrix (read only).
propertiesProperties: Object properties.
time_stepfloat: Time step.

tuple[str]: input/output array keys (read only).

dict[tuple[str, str], int]: Minimum delay in time steps of each fitted (input key, output key) path (read only).

PoleResidueMatrix: Underlying pole-residue matrix (read only).

Properties: Object properties.

float: Time step.