OpticalPulseTimeStepper¶
- class photonforge.OpticalPulseTimeStepper(*, energy, width, offset=None, repetition_rate=0, phase=0, chirp=0, order=1, frequency=None, rel_intensity_noise=0, linewidth=0, jitter=0, prbs=0, reflection=0, seed=None)[source]¶
Time-stepper for a Gaussian optical pulse source.
- Parameters:
energy (Annotated[float, minimum=0, units='J']) – Total pulse energy.
width (Annotated[float, minimum=0, units='s']) – Full-width at half-maximum (FWHM) of the pulse amplitude.
offset (Annotated[float, minimum=0, units='s'] | None) – Time shift for the center of the first pulse. If
None, a value is chosen automatically.repetition_rate (Annotated[float, minimum=0, units='Hz']) – If positive, generates a periodic train of pulses at this rate.
phase (Annotated[float, units='°'] | Sequence[Annotated[float, units='°']]) – Phase shift applied to the pulse. A sequence of values can be used to define the phase of each pulse in a periodic train. The sequence is wrapped around if necessary.
chirp (Annotated[float, units='°']) – Chirp parameter \(C\) of the pulse, in degrees (180 for \(C = \pi\)). Positive values give an up-chirp, in which the instantaneous frequency rises from the leading to the trailing edge.
order (Annotated[float, minimum=1]) – Order of the super-Gaussian pulse.
frequency (Annotated[float, minimum=0, units='Hz'] | None) – Absolute laser frequency. If
None, equals the carrier frequency. If detuned from the carrier by Δf, the output envelope is \(e^{-j2\pi\Delta f\,t}\).rel_intensity_noise (Annotated[float, minimum=0, units='1/Hz']) – One-sided relative intensity noise (RIN) power spectral density.
linewidth (Annotated[float, minimum=0, units='Hz']) – Full-width at half-maximum (FWHM) of the laser’s Lorentzian shape.
jitter (Annotated[float, minimum=0, units='s']) – RMS clock jitter for pulse trains.
prbs (Literal[0, 7, 15, 31]) – PRBS polinomial degree. Value 0 disables PRBS.
reflection (complex) – Reflection coefficient for incident fields.
seed (Annotated[int, minimum=0] | None) – Random number generator seed to ensure reproducibility.
Note
Each Gaussian pulse (
order1) centered at \(t_0\) has the envelope\[A(t) \propto \exp\left[-(1 + jC) \frac{(t - t_0)^2}{2 T_0^2}\right]\]in which \(T_0\) is the half-width at \(e^{-1}\) of the power. This is the chirped Gaussian of Agrawal’s Nonlinear Fiber Optics, which uses the same time convention, so its results apply directly: the instantaneous frequency deviation is \(\delta\nu = C (t - t_0) / (2\pi T_0^2)\), and in a fiber with anomalous dispersion (\(\beta_2 < 0\)) a pulse with \(C > 0\) first compresses. For higher orders the chirp phase stays quadratic in time.
Note
PhotonForge uses the \(e^{-j\omega t}\) time convention, so an envelope \(e^{-j2\pi\Delta f\,t}\) is light at \(f_c + \Delta f\), with \(f_c\) the carrier frequency. The instantaneous frequency deviation of an output envelope
ais therefore \(-(1/2\pi)\,{\rm d}\arg a/{\rm d}t\), for example-numpy.gradient(numpy.unwrap(numpy.angle(a)), time_step) / (2 * numpy.pi), and the frequency axis of anumpy.fftspectrum must be reversed.Important
The effective clock jitter can be larger than specified due to the size of the time step. The larger the
jittervalue w.r.t thetime_step, the better it can be simulated.Methods
bind_native(step, keys[, state, cstate, context])Bind a compiled step function.
reset()Reset any internal state of the time stepper.
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.
write_verilog_a(path, *[, backend, ...])Write this configured time stepper as one Verilog-A module.
Attributes
parametric_functionFunction used to update the time stepper.
parametric_kwargsKeyword arguments used to update the time stepper.
path_delaysMinimum delay in time steps of each (input key, output key) signal path; missing pairs have no path and None means every input reaches every output within the time step.
propertiesObject properties.
random_variablesRandom variables associated to the time stepper's parameters.
- 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 (object) – Unused.
- Return type:
None