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 = 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
copy()Create a copy of this time-domain model.
reset()Reset the internal model state.
step(inputs[, update_state])Compute the output for a single time step.
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, update_state=True)¶
Compute the output for a single time step.
- Parameters:
inputs (dict[str, complex]) – Dictionary of input values at the current time step, with port names as keys.
update_state (bool) – Whether to update the state or just compute the outputs.
- Returns:
Output values for all ports at the current time step.
- Return type:
dict[str, complex]
- time_step¶
Time step.
- Type:
float