AmplitudeModTimeStepper¶
- class photonforge.AmplitudeModTimeStepper(*, a0=0, a1, a2, a3, z0=None, insertion_loss=0, extinction_ratio=None, chirp=0, dloss_dv=, dloss_dv2=, f_3dB=0, mesh_refinement=None, verbose=True)[source]¶
Time-stepper for a uniform electro-optic amplitude modulator.
This model implements a two-port optical amplitude modulator with a single electrical drive. It maps an electrical input voltage to an optical amplitude scaling factor through a static polynomial transfer function. The model also includes voltage-dependent loss, chirp, and an optional first-order low-pass filter to simulate a finite electro-optic bandwidth. The final amplitude is clipped by an envelope defined by the insertion loss and extinction ratio.
The scaling factor applied to the optical signal before losses and clamping is:
\[s_0 = a_0 + a_1 V + a_2 V^2 + a_3 V^3\]The chirp-induced phase shift is proportional to the logarithm of the final amplitude scaling relative to the maximum amplitude (derived from the insertion loss):
\[\Delta\phi = C \ln \frac{s_\text{total}}{s_\text{max}}\]- Parameters:
a0 (Annotated[float, _]) – Constant gain coefficient.
a1 (Annotated[float, units='1/V']) – Linear electro-optic gain coefficient.
a2 (Annotated[float, units='1/V²']) – Quadratic electro-optic gain coefficient.
a3 (Annotated[float, units='1/V³']) – Cubic electro-optic gain coefficient.
z0 (Annotated[complex, units='Ω'] | Interpolator | None) – Characteristic impedance of the electrical port used to convert the input field amplitude to voltage. If
None, derived from port impedance, calculated by mode-solving, or set to 50 Ω.insertion_loss (Annotated[float, minimum=0, units='dB']) – Optical propagation loss.
extinction_ratio (Annotated[float, minimum=0, units='dB'] | None) – Optical extinction ratio.
chirp (float) – Amplitude-phase coupling coefficient \(C\).
dloss_dv (Annotated[float, units='dB/μm/V']) – Linear voltage-dependent optical loss coefficient.
dloss_dv2 (Annotated[float, units='dB/μm/V²']) – Quadratic voltage-dependent optical loss coefficient.
f_3dB (Annotated[float, minimum=0, units='Hz']) – -3 dB frequency cutoff for bandwidth limiting. Only active for positive values.
mesh_refinement (Annotated[float, exclusiveMinimum=0] | None) – Minimal number of mesh elements per wavelength used for mode solving.
verbose (bool) – Flag setting the verbosity of mode solver runs.
Important
The electrical input \(A\) is converted to a voltage signal through the port impedance:
\[V = \Re\{A\} \sqrt{\Re\{Z_0\}}\]Notes
The total loss is clamped at 0 dB to avoid gain.
Methods
reset()Reset internal state.
setup(component, time_step, *[, ...])Initialize the time stepper.
setup_state(*, component, time_step, ...[, ...])Initialize internal state.
step([inputs, steps, time_step, show_progress])Compute the outputs of this time stepper, given inputs.
step_single(inputs, outputs, time_index, ...)Take a single time step on the given inputs.
update(*args, **kwargs)Update this time stepper.
Attributes
parametric_functionFunction used to update the time stepper.
parametric_kwargsKeyword arguments used to update the time stepper.
propertiesObject properties.
random_variablesRandom variables associated to the time stepper's parameters.
status- setup_state(*, component, time_step, carrier_frequency, verbose=None, **kwargs)[source]¶
Initialize internal state.
- Parameters:
component (Component) – Component representing the laser source.
time_step (Annotated[float, minimum=0, units='s']) – The interval between time steps (in seconds).
carrier_frequency (Annotated[float, minimum=0, units='Hz']) – The carrier frequency used to construct the time stepper. The carrier should be omitted from the input signals, as it is handled automatically by the time stepper.
verbose (bool | None) – If set, overrides the time stepper’s verbose attribute.
kwargs (object) – Unused.
- Return type:
object
- step_single(inputs, outputs, time_index, update_state, shutdown)[source]¶
Take a single time step on the given inputs.
- Parameters:
inputs (ndarray) – Input values at the current time step. Must be a 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.
update_state (bool) – Whether to update the internal stepper state.
shutdown (bool) – Whether this is the last call to the single stepping function for the provided
TimeSeries.
- Return type:
None