TimeDomainModel

class photonforge.TimeDomainModel(pole_residue_matrix, time_step)

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

Parameters:
  • pole_residue_matrix – Underlying pole-residue matrix.

  • time_step – Time step to be used for this model.

Example

>>> pole_res = PoleResidueMatrix(
...     poles=[-C_0 / 1.0],
...     residues={("P0", "P0"): [2.0 * C_0, 0.0]},
... )
>>> time_domain = 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

copy()

Create a copy of this time_domain_model.

reset()

Reset the internal model state.

step(inputs)

Compute the output for a single time step, updating the internal state.

Attributes

pole_residue_matrix

Underlying pole-residue matrix (read only).

time_step

Time step.

copy()

Create a copy of this time_domain_model.

Returns:

New copy.

pole_residue_matrix

Underlying pole-residue matrix (read only).

reset()

Reset the internal model state.

Returns:

This object.

step(inputs)

Compute the output for a single time step, updating the internal state.

Parameters:

inputs – Dictionary of input values at the current time step, with port names as keys.

Returns:

Dictionary of output values for all ports at the current time step.

time_step

Time step.