MuxDemuxModel¶
- class photonforge.MuxDemuxModel(*, frequencies=(), wavelengths=(), bandwidth=(), order=4, insertion_loss=0, group_delay=0, reflection=0, temperature_sensitivity=0.0, temperature=293.0, reference_temperature=293.0, ports=None)[source]¶
Single-mode, wavelength multiplexer demultiplexer (WDM).
- Parameters:
frequencies (Sequence[Annotated[float, minimum=0, units='Hz']]) – Central frequency for each channel. Use only one of
frequenciesorwavelengths.wavelengths (Sequence[Annotated[float, exclusiveMinimum=0, units='μm']]) – Central wavelength for each channel. Use only one of
frequenciesorwavelengths.bandwidth (Annotated[float, exclusiveMinimum=0] | Sequence[Annotated[float, exclusiveMinimum=0]]) – 3dB frequency bandwidth for each channel when used with
frequencies(in Hz). Whenwavelengthsis used, this is the 3dB wavelength bandwidth for each channel in (μm).order (Annotated[float, minimum=1] | Sequence[Annotated[float, minimum=1]]) – Order of the super-Gaussian pulse.
insertion_loss (Annotated[float, minimum=0, units='dB'] | Sequence[Annotated[float, minimum=0, units='dB']]) – Insertion loss per channel.
group_delay (Annotated[float, minimum=0, units='s'] | Sequence[Annotated[float, minimum=0, units='s']]) – Constant group delay per channel.
reflection (complex | Interpolator | Sequence[complex | Interpolator]) – Reflection coefficient for incident fields. If a sequence of values is used, the first one is for the common port and the remaining are for the frequency-filtered ports.
temperature_sensitivity (Annotated[float | Sequence[float], units='*/K']) – Temperature sensitivity for central frequencies (in Hz/K) or wavelengths (in μm/K).
temperature (Annotated[float, minimum=0, units='K']) – Operating temperature.
reference_temperature (Annotated[float, minimum=0, units='K']) – Reference temperature.
ports (Sequence[str] | None) – List of port names. If not set, the sorted list of port names from the component is used.
Note
Sequences of values can be used to set different parameters per channel. All lenghts must match the number of channels (defined by
frequenciesorwavelengths), except forreflectionandports, which must include 1 additional entry for the common port (first item in each sequence).Methods
autograd_smatrix(*, component, ...[, ...])Compute an autograd-compatible S matrix for traced parameters.
black_box_component([port_spec, technology, ...])Create a black-box component using this model for testing.
estimate_cost(*args, **kwargs)Estimate the cost for S matrix computation.
s_matrix(component, frequencies[, ...])Compute the S matrix for a component using this model.
setup_time_stepper(component, time_step[, ...])Obtain a time stepper for a component using this model.
start(component, frequencies[, temperature])Start computing the S matrix response from a component.
transform([translation, rotation, scaling, ...])Apply a transformation to this model.
update(*args, **kwargs)Update this model.
Attributes
parametric_functionFunction used to update the model.
parametric_kwargsKeyword arguments used to update the model.
propertiesObject properties.
random_variablesRandom variables associated to the model's parameters.
time_stepperTime stepper associated with this model.
- black_box_component(port_spec=None, technology=None, name=None)[source]¶
Create a black-box component using this model for testing.
- Parameters:
port_spec (str | PortSpec | None) – Port specification used in the component. If
None, look for"port_spec"inconfig.default_kwargs.technology (Technology | None) – Component technology. If
None, the default technology is used.name (str | None) – Component name. If
Nonea default is used.
- Returns:
Component with ports and model.
- Return type:
- start(component, frequencies, temperature=None, **kwargs)[source]¶
Start computing the S matrix response from a component.
- Parameters:
component (Component) – Component from which to compute the S matrix.
frequencies (Sequence[float]) – Sequence of frequencies at which to perform the computation.
temperature (Annotated[float, minimum=0, units='K'] | None) – Operating temperature override.
**kwargs (object) – Unused.
- Returns:
Model result with attributes
statusands_matrix.- Return type: