Skip to content

API Reference

The cockpit manual. Reference pages are organized by responsibility — fun is rationed here in favor of precision, because this is where you come mid-flight with a question.

  • RCWA & Results


    The RCWA façade and the SimulationResult it returns — the two objects you'll touch every day.

  • Source


    Plane-wave illumination: wavelength, angles, polarization.

  • Layers & Materials


    Layer, Material, MaterialLibrary and the shipped database.

  • Shapes


    Topology primitives: circle, ellipse, rectangle, ring, cross, polygon.

  • Inverse Design


    MetaAtom, free, pixels, Target, optimize — declare, then evolve.

  • Fields & Visualization


    FieldMap, reconstruct, and the matplotlib plotting helpers.

  • Tools


    Convergence automation, HDF5 I/O, the material-import CLI.

  • Low-level


    HarmonicGrid, convolution_matrix, solve_stack — the engine room.

Top-level exports

from ikarus import (
    RCWA,             # the main façade
    SimulationResult, # rich result object
    Source,           # plane-wave illumination
    Layer,            # a single stack layer
    Material,         # one optical material
    MaterialLibrary,  # registry of materials
    default_library,  # the shared built-in library (a MaterialLibrary instance)
    HarmonicGrid,     # Fourier-order bookkeeping
    shapes,           # topology primitives subpackage
)

Optional subpackages are imported explicitly:

from ikarus.inverse import MetaAtom, free, pixels, Target, optimize  # needs pymoo
from ikarus.visualization import plot_field, plot_stack, plot_topology  # needs matplotlib
from ikarus.tools import convergence, io

House conventions (memorize once)

  • Units: SI — meters for lengths, degrees for angles.
  • Time convention: \(\exp(-i\omega t)\); absorbers have \(k>0\).
  • n_orders = M keeps harmonics \(-M..+M\) per axis (count \(2M+1\), total \(P=(2M_x+1)(2M_y+1)\)).
  • A material specifier is a database name, a number (constant index), a JSON path, or a Material.