class lumopt.optimization.SuperOptimization(optimizations)

Optimization super class to run two or more co-optimizations targeting different figures of merit that take the same parameters. The addition operator can be used to aggregate multiple optimizations. All the figures of merit are simply added to generate an overall figure of merit that is passed to the chosen optimizer.

Parameters:optimizations – list of co-optimizations (each of class Optimization).
class lumopt.optimization.Optimization(base_script, wavelengths, fom, geometry, optimizer, use_var_fdtd=False, hide_fdtd_cad=False, use_deps=True, plot_history=True, store_all_simulations=True)

Acts as orchestrator for all the optimization pieces. Calling the member function run will perform the optimization, which requires four key pieces:

  1. a script to generate the base simulation,
  2. an object that defines and collects the figure of merit,
  3. an object that generates the shape under optimization for a given set of optimization parameters and
  4. a gradient based optimizer.
  • base_script – callable, file name or plain string with script to generate the base simulation.
  • wavelengths – wavelength value (float) or range (class Wavelengths) with the spectral range for all simulations.
  • fom – figure of merit (class ModeMatch).
  • geometry – optimizable geometry (class FunctionDefinedPolygon).
  • optimizer – SciyPy minimizer wrapper (class ScipyOptimizers).
  • hide_fdtd_cad – flag run FDTD CAD in the background.
  • use_deps – flag to use the numerical derivatives calculated directly from FDTD.
  • plot_history – plot the history of all parameters (and gradients)
  • store_all_simulations – Indicates if the project file for each iteration should be stored or not