PhotodiodeTimeStepper

class photonforge.PhotodiodeTimeStepper(*, responsivity, gain, saturation_voltage=0, saturation_current=0, roll_off=2, dark_current=0, thermal_noise=, pink_noise_frequency=0, current_time_constant=0, filter_frequency=0, filter_quality=0, filter_gain=1, reflection=0, seed=None)[source]

Time-stepper for a photodiode and a transimpedance amplifier (TIA).

This model simulates a photodetector front-end, converting an incident optical field into an electrical output. The model accounts for space-charge saturation in the photodiode, output saturation in the TIA, and response bandwidth limit via a low-pass filter. It also includes shot, thermal, and pink noise simulation.

Parameters:
  • responsivity (Annotated[float, minimum=0, units='A/W']) – Optical power to current conversion factor.

  • gain (Annotated[float, units='V/A']) – TIA gain.

  • saturation_voltage (Annotated[float, minimum=0, units='V']) – If non-zero, output saturation voltage of the TIA.

  • saturation_current (Annotated[float, minimum=0]) – If non-zero, photocurrent of the space-charge saturation model.

  • roll_off (Annotated[float, minimum=0]) – Roll-off factor for the space-charge saturation model.

  • dark_current (Annotated[float, units='A']) – Photodiode’s dark current.

  • thermal_noise (Annotated[float, minimum=0, units='A²/Hz']) – One-sided power spectral density (PSD) of the TIA’s input-referred thermal noise current.

  • pink_noise_frequency (Annotated[float, minimum=0, units='Hz']) – Pink (1/f) noise corner frequency. If set to 0, pink noise is disabled.

  • current_time_constant (Annotated[float, minimum=0, units='s']) – Time constant for the running photocurrent average. A value of zero sets a default of 100 time steps.

  • filter_frequency (Annotated[float, minimum=0, units='Hz']) – If positive, sets the -3 dB frequency bandwidth for the first-order low-pass TIA filter. If a second-order filter is used (filter_quality > 0), this is its natural frequency.

  • filter_quality (Annotated[float, minimum=0]) – If positive, enables a second-order filter for the TIA with this quality factor. Only when filter_frequency > 0.

  • filter_gain (Annotated[float, exclusiveMinimum=0]) – Gain of the second-order TIA filter. Only used when filter_frequency > 0 and filter_quality > 0.

  • reflection (complex) – Reflection coefficient for incident fields.

  • seed (Annotated[int, minimum=0] | None) – Random number generator seed to ensure reproducibility.

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, time_index, ...)

Take a single time step on the given inputs.

update(*args, **kwargs)

Update this time stepper.

Attributes

parametric_function

Function used to update a parametric component.

parametric_kwargs

Keyword arguments used to update a parametric component.

properties

Object properties.

random_variables

Random variables associated to this modles's parameters.

reset()[source]

Reset internal state.

setup_state(*, component, time_step, carrier_frequency, **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.

  • kwargs – Unused.

step_single(inputs, time_index, update_state, shutdown)[source]

Take a single time step on the given inputs.

Parameters:
  • inputs (dict[str, complex]) – Dictionary containing inputs at the current time step, mapping port names to complex values.

  • 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.

Returns:

Outputs at the current time step.

Return type:

dict[str, complex]