tidy3d.plugins.invdes.InverseDesignResult#

class InverseDesignResult[source]#

Bases: InvdesBaseModel

Container for the result of an InverseDesign.run() call.

Parameters:
  • design (Union[InverseDesign, InverseDesignMulti]) – Specification describing the inverse design problem we wish to optimize.

  • params (tuple[ArrayLike, ...] = ()) – History of parameter arrays throughout the optimization.

  • objective_fn_val (tuple[float, ...] = ()) – History of objective function values throughout the optimization.

  • grad (tuple[ArrayLike, ...] = ()) – History of objective function gradient arrays throughout the optimization.

  • penalty (tuple[float, ...] = ()) – History of weighted sum of penalties throughout the optimization.

  • post_process_val (tuple[float, ...] = ()) – History of return values from post_process_fn throughout the optimization.

  • simulation (tuple[Simulation, …] = ()) – History of td.Simulation instances throughout the optimization.

  • opt_state (tuple[dict[str, Union[int, ArrayLike]], ...] = ()) – History of optimizer states throughout the optimization.

Attributes

history

The history-containing fields as a dictionary of lists.

keys

Keys stored in the history.

last

Dictionary of last values in self.history.

sim_last

The last simulation.

design

params

objective_fn_val

grad

penalty

post_process_val

simulation

opt_state

Methods

get(key[, index])

Get the value from the history at a certain index (-1 means last).

get_last(key)

Get the last value from the history.

get_sim([index])

Get the simulation at a specific index in the history (list of sims if multi).

get_sim_data([index])

Get the simulation data at a specific index in the history (list of simdata if multi).

plot_optimization()

Plot the optimization progress from the history.

sim_data_last(**kwargs)

Run the last simulation and return its data.

design#
params#
objective_fn_val#
grad#
penalty#
post_process_val#
simulation#
opt_state#
property history#

The history-containing fields as a dictionary of lists.

property keys#

Keys stored in the history.

property last#

Dictionary of last values in self.history.

get(key, index=-1)[source]#

Get the value from the history at a certain index (-1 means last).

get_last(key)[source]#

Get the last value from the history.

get_sim(index=-1)[source]#

Get the simulation at a specific index in the history (list of sims if multi).

get_sim_data(index=-1, **kwargs)[source]#

Get the simulation data at a specific index in the history (list of simdata if multi).

property sim_last#

The last simulation.

sim_data_last(**kwargs)[source]#

Run the last simulation and return its data.

plot_optimization()[source]#

Plot the optimization progress from the history.