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.
Methods
Section titled “Methods”| Method | Description |
|---|---|
copy | Create a copy of this time-domain model. |
reset | Reset the internal model state. |
step | Compute the outputs for multiple time steps. |
step_single | Compute 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 forstepstime steps. - steps (int): The number of time steps to execute. Only used if
inputsisNone. - time_step (float): The interval between time steps (in seconds). Only used if
inputsisNone. Must match the model’stime_stepattribute. - show_progress (bool): If
True, show computation progress.
Returns
TimeSeries: Computed outputs.
step_single
Section titled “step_single”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.
Attributes
Section titled “Attributes”| Attribute | Description |
|---|---|
keys | tuple[str]: input/output array keys (read only). |
path_delays | dict[tuple[str, str], int]: Minimum delay in time steps of each fitted (input key, output key) path (read only). |
pole_residue_matrix | PoleResidueMatrix: Underlying pole-residue matrix (read only). |
properties | Properties: Object properties. |
time_step | float: Time step. |
tuple[str]: input/output array keys (read only).
path_delays
Section titled “path_delays”dict[tuple[str, str], int]: Minimum delay in time steps of each fitted (input key, output key) path (read only).
pole_residue_matrix
Section titled “pole_residue_matrix”PoleResidueMatrix: Underlying pole-residue matrix (read only).
properties
Section titled “properties”Properties: Object properties.
time_step
Section titled “time_step”float: Time step.