MuxDemuxModel

class photonforge.MuxDemuxModel(*, frequencies=(), wavelengths=(), bandwidth=(), order=3, insertion_loss=0, group_delay=0, reflection=0, temperature_sensitivity=0.0, temperature=293.0, reference_temperature=293.0, ports=None)[source]

Wavelength multiplexer/demultiplexer (WDM).

Each channel is represented by a causal Butterworth band-pass with analytically known poles and residues.

Parameters:
  • frequencies (Sequence[Annotated[float, minimum=0, units='Hz']]) – Central frequency for each channel. Use only one of frequencies or wavelengths.

  • wavelengths (Sequence[Annotated[float, exclusiveMinimum=0, units='μm']]) – Central wavelength for each channel. Use only one of frequencies or wavelengths.

  • bandwidth (Annotated[float, exclusiveMinimum=0] | Sequence[Annotated[float, exclusiveMinimum=0]]) – 3 dB frequency bandwidth for each channel when used with frequencies (in Hz). When wavelengths is used, this is the 3 dB wavelength bandwidth for each channel (in μm), converted locally to frequency at the channel center.

  • order (Annotated[int, exclusiveMinimum=0] | Sequence[Annotated[int, exclusiveMinimum=0]]) – Butterworth filter order.

  • 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']]) – Additional constant group delay per channel.

  • reflection (complex | Sequence[complex]) – Constant reflection coefficient for incident fields. If a sequence is used, the first value is for the common port and the remaining values 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) – Port names, with the common port first. If not set, the naturally sorted component port names are used.

Note

Sequences can set different values per channel. Their lengths must match the number of channels, except for reflection and ports, which include one additional entry for the common port.

Configurations that are not passive emit a warning and are evaluated without modification.

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.

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])

Compute the analytic S matrix response.

transform([translation, rotation, scaling, ...])

Apply a transformation to this model.

update(*args, **kwargs)

Update this model.

Attributes

parametric_function

Function used to update the model.

parametric_kwargs

Keyword arguments used to update the model.

properties

Object properties.

random_variables

Random variables associated to the model's parameters.

time_stepper

Time stepper associated with this model.

black_box_component(port_spec=None, technology=None, name=None)[source]

Create a black-box component using this model.

Parameters:
  • port_spec (str | PortSpec | None) – Port specification used in the component. If None, look for "port_spec" in config.default_kwargs.

  • technology (Technology | None) – Component technology. If None, the default technology is used.

  • name (str | None) – Component name. If None, a default is used.

Returns:

Component with ports and model.

Return type:

Component

start(component, frequencies, temperature=None, **kwargs)[source]

Compute the analytic S matrix response.

Parameters:
  • component (Component) – Component from which to compute the S matrix.

  • frequencies (Sequence[float]) – Frequencies at which to evaluate the response.

  • temperature (Annotated[float, minimum=0, units='K'] | None) – Operating temperature override.

  • **kwargs (object) – Unused.

Returns:

Causal mux/demux S matrix.

Return type:

SMatrix