Skip to main content

Differentiable Optics via Ray Tracing

Project description

Tests Build Status Documentation Status Contributions welcome version License: MIT

Differentiable Optics via Ray Tracing

gradoptics is a ray tracing based optical simulator built using PyTorch [1] to enable automatic differentiation.

The API is designed similar to rendering softwares, and has been heavily inspired by Physically Based Rendering (Pharr, Jakob, Humphreys) [2].

Getting Started

Getting Started

Installation

pip install gradoptics

Then, you should be ready to go!

import gradoptics as optics

Work in progress

  • Currently, some optical element normals are aligned with the optical axis -> more general orientations in progress
  • Currently, monochromatic -> no chromatic aberrations

Project History

This project was started in 2020 by Michael Kagan and Maxime Vandegar at SLAC National Accelerator Laboratory.

Feedback and Contributions

Please use issues on GitHub for reporting bugs and suggesting features (including better documentation).

We appreciate all contributions. In general, we recommend using pull requests to make changes to gradoptics.

Testing

If you modify gradoptics, please use pytest for checking your code.

pytest tests/tests.py 

Support

gradoptics was developed in the context of the MAGIS-100 experiment

References

[1] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, et al. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.

[2] Matt Pharr, Wenzel Jakob, and Greg Humphreys. 2016. Physically Based Rendering: From Theory to Implementation (3rd ed.). Morgan Kaufmann Publishers Inc.

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

gradoptics-0.0.3.tar.gz (33.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: gradoptics-0.0.3.tar.gz
  • Upload date:
  • Size: 33.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.12

File hashes

Hashes for gradoptics-0.0.3.tar.gz
Algorithm Hash digest
SHA256 22c8668eba8a1cd036472c94f76f772cec5c86f217d4cab3adca3f7a749be1e0
MD5 f27bc29ee0a01a4463657406f330abe5
BLAKE2b-256 5b8af089e4ee94746021dd1162203e91405b15fe4505cbca3406b1816947f676

See more details on using hashes here.

Supported by

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