Please enable JavaScript to view this site.

Knowledge Base

Navigation: FDTD Solutions > Data Transfer and Interoperability > Interoperability and Automation API

Python API

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

This example demonstrates the feasibility of integrating Lumerical tools with Python. This interoperability is made possible using Application Programming Interface (API). Users will learn how to write a simple Python script and use some automation API functions to drive Lumerical simulations and data processing. There are two parts in this example:

1. driving Lumerical simulations wihtin Python,

2. producing figures in Python, e.g., PNG format.




(It also supports other solvers in MODE Solutions, DEVICE and INTERCONNECT)

Associated files

See also

Setting up Python API

Python API functions

Interoperability between Lumerical Products

Matlab API

Parameter Sweep


Lumerical products R2019a or newer





The example files were created using Lumerical 2019a, Python 3.7 (and numpy), matplotlib, scipy 1.1.0 (interpolate), collections 1.0.1 (OrderedDict) and CentOS 6.8 (Final)


Note: working directory

It should be possible to store the files in any locations as desired. However, it is recommended to put the Lumerical and Python files in the same folder in order for the above script files to work properly. It is also important to check the Lumerical working directory has the correct path to run the .lsf script file, see here for instructions to change the Lumerical working directory.


A file  is the key to enable Lumerical-Python API connection. Once the lumapi module is imported to Python, the integration should be ready.  See this page for instructions for setting up Python API.

Session management

Advanced session management

Lumerical Script Commands as Python Session Methods

Driving Lumerical Tools within Python

Copyright Lumerical Inc. | Privacy | Site Map