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 (PoleResidueMatrix) – Underlying pole-residue matrix.
time_step (float) – 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
Underlying pole-residue matrix (read only).
Object properties.
Time step.
- copy()¶
Create a copy of this time-domain model.
- Returns:
New copy.
- Return type:
- pole_residue_matrix¶
Underlying pole-residue matrix (read only).
- Type:
- properties¶
Object properties.
- Type:
- reset()¶
Reset the internal model state.
- Returns:
This object.
- Return type:
- step(inputs)¶
Compute the output for a single time step, updating the internal state.
- Parameters:
inputs (dict[str, complex]) – Dictionary of input values at the current time step, with port names as keys.
- Returns:
dict[str, comlex] Output values for all ports at the current time step.
- time_step¶
Time step.
- Type:
float