Skip to main content

A multi-scale optimization framework for diffractive optical systems.

Project description

metabox logo
https://badge.fury.io/py/metabox.svg Built Status ReadTheDocs https://coveralls.io/repos/github/Luochenghuang/metabox/badge.svg?branch=main https://img.shields.io/badge/License-MIT-green.svg

metabox: A High-Level Python API for Diffractive Optical System Design

metabox is a Python package built on TensorFlow, enabling the design, evaluation and optimization of complex diffractive optical systems with ease, flexibility, and high performance.

metabox is a high-level Python package specifically designed for the creation, evaluation, and inverse optimization of diffractive optical systems. Leaning on the robust capabilities of TensorFlow, metabox offers a comprehensive and user-friendly API for optical system design.

The package is built with flexibility at its core, making it easy to add new components, define custom merit functions, and employ various optimization algorithms. It’s designed to be highly performant and scalable, capable of managing systems with millions of degrees of freedom. With its intuitive structure, metabox facilitates the design of intricate diffractive optical systems with minimal lines of code.

Key features of metabox include:

  • A rcwa solver, derived from rcwa_tf, for direct computation of meta-atoms’ diffraction efficiency.

  • A built-in raster module for parameterizing meta-atoms’ features.

  • An easy-to-use sampling system for features, which can train a metamodel to replace the rcwa solver, thus significantly speeding up simulations and optimization processes.

  • A module for sequential optics to model light propagation through the optical system.

  • An assembly module offering a suite of tools for building the optical system from meta-atoms, apertures, and other optical components.

  • A merit module for evaluating and inverse-designing the performance of the optical system.

  • An rcwa.Material class for accessing pre-defined materials and their optical properties.

  • An export module that allows for the export of the diffractive optical design to a .gds file for fabrication.

Overall, metabox is a powerful tool for both beginners and experienced users in the field of optical system design. By simplifying and accelerating the design process, it paves the way for innovative developments in the optical industry.

Install

Install metabox via pip:

pip install metabox

Getting Started

Try out metabox for free on Google Colab. Here are some tutorials on Colab. You can find the local versions here.

Tutorial 1: Metamodeling

Tutorial 2: Lens Optimization and Exporting

Tutorial 3: Optimization Serialization

Tutorial 4: Zemax Binary2 Import

Tutorial 5: Refractive Surfaces Simulation

Tutorial 6: Refractive Surfaces Optimization

Tutorial 7: Hologram Optimization

Documentation

Module Reference

Home Page

Contributors

Citing metabox

The manuscript is in preparation.

Making Changes & Contributing

This project uses pre-commit, please make sure to install it before making any changes:

pip install pre-commit
cd metabox
pre-commit install

It is a good idea to update the hooks to the latest version:

pre-commit autoupdate

To make an editable installation, run the following commands:

git clone https://github.com/Luochenghuang/metabox.git
cd metabox
pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metabox-0.0.3.tar.gz (32.5 MB view details)

Uploaded Source

Built Distribution

metabox-0.0.3-py3-none-any.whl (113.8 kB view details)

Uploaded Python 3

File details

Details for the file metabox-0.0.3.tar.gz.

File metadata

  • Download URL: metabox-0.0.3.tar.gz
  • Upload date:
  • Size: 32.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for metabox-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4f90807071208ec2a7ef8065aefe249833c8298ff1caf2bf99ab7593e3c362e5
MD5 61984331570930a15524157a5991dc9f
BLAKE2b-256 67353f5eb587d064aa7f5e906a2d4dacc0886a3fe3f302e6b911c90c5a6977e6

See more details on using hashes here.

File details

Details for the file metabox-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: metabox-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 113.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for metabox-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3ab51460058f4f73f14f80bd9068b28a930344a32dea037c78742fc9bbd2683e
MD5 a732d6e9d8e7dd091ec0d4cb0f72d74a
BLAKE2b-256 fc13f65ca31403d74989746c171d037a9dd6e741cdd09c55bf2a2463be6e414e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page