Skip to main content

InkSlab

InkSlab simulates the electromagnetic properties of 3D and 2D multi-layered structures with in-plane periodicicy, such as gratings, photonic-crystal slabs, metasurfaces, vertical-cavity or photonic-crystal surface emitting lasers (VCSEL, PCSEL), (patterned) solar cells, nano-antennas, and more.

Internally, InkSlab implements rigurous couled-wave analysis (RCWA), a. k. a. Fourier Modal Method (FMM).

InkSlab can calculate:

  • the reflection, transmission, and the absorption of the structure
  • the total and by-order power fluxes of the propagating and the evanescent waves in each layer
  • electric and magnetic field amplitudes at any locations in the structure,
  • band-structures based on the determinant of the scattering matrix of the structure.

Features of InkSlab:

  • It supports efficient and flexible parameter-scanning. You can change part of your sturcture such as the shapes and sizes of some patterns, or some material parameters. InkSlab only recalculates the modified parts and produces the final results efficiently.
  • It allows both tensorial permittivities and tensorial permeabilities, such as in anisotropic, magneto-optical, or gyromagnetic materials.
  • It can calculate the determinant of the scattering matrix on the complex frequency plane.
  • Pre-defined shapes of patterns can be used, including rectangular, parallelogram, disk, ellipse, 1D, and polygons. Closed-form Fourier transforms and corrections for Gibbs phenomena are implemented.
  • It is fully 3D.
  • It is written in pure python, with heavy-lifting done in numpy and scipy.

Quick Start

Installation:

$ pip install InkSlab

Or,

$ git clone git://github.com/alexsong/InkSlab
$ pip install .

Usage

The examples folder contains various self-explaining examples to get you started.

Dependencies

  • python 3.6+
  • numpy
  • scipy

Units, conventions, and definitions

Unit system

We adopt a natural unit system, where vacuum permittivity, permeability, and light speed are $\varepsilon_0=\mu_0=c_0=1$.

Sign convention

Sign conventions in electromagnetic waves: $$e^{i(kx-\omega t)}$$ where $k$ is the wavevector, $x$ is spatial location, $\omega$ is frequency, $t$ is time.

By this convention, a permittivity of $\varepsilon_r + i\varepsilon_i$ with $\varepsilon_i>0$ means material loss, and $\varepsilon_i<0$ means material gain.

Coordinates and incident angles

drawing

(InkSlab, Incident $\bm{k}$ on slabs.)

Citing

If you find InkSlab useful for your research, we would apprecite you citing our paper. For your convenience, you can use the following BibTex entry:

@article{song2018broadband,
  title={Broadband Control of Topological Nodes in Electromagnetic Fields},
  author={Song, Alex Y and Catrysse, Peter B and Fan, Shanhui},
  journal={Physical review letters},
  volume={120},
  number={19},
  pages={193903},
  year={2018},
  publisher={American Physical Society}
}

Metadata

Release files for inkslab 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inkslab 0.1.0
File Size Uploaded Provenance Actions
inkslab-0.1.0.tar.gz 37.7 kB Without provenance Details for inkslab-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inkslab 0.1.0
File Interpreter ABI Platform Actions
inkslab-0.1.0-py3-none-any.whl Python 3 none any Details for inkslab-0.1.0-py3-none-any.whl

Total release size: 97.3 kB

Release files / inkslab-0.1.0.tar.gz

Download URL inkslab-0.1.0.tar.gz
Size 37.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3338d99a3ef6b56baf849d05c270e09b21db791bed8fa42d2b7ea386b085e7ef
BLAKE2b-256 checksum
How to use checksums
8e3dbd7bf0b1c33f8b7291d39c8ae534dc5aeeb87131dedfb50a8e33384c9370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8

Release files / inkslab-0.1.0-py3-none-any.whl

Download URL inkslab-0.1.0-py3-none-any.whl
Size 59.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
031a88c1df491a94ca02e2fd3e94ae5801c0f460432232d4131992b38db03d02
BLAKE2b-256 checksum
How to use checksums
38b6b615bdd3049845f67a40dde0797c91436933fbe57f81b7678d830c26425e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8

Security for inkslab 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page