Skip to main content

A small example package

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

git clone https://github.com/magis-slac/gradoptics.git
cd gradoptics
pip install -r requirements.txt
pip install -e .

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.1.tar.gz (17.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gradoptics-0.0.1-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gradoptics-0.0.1.tar.gz
  • Upload date:
  • Size: 17.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.2

File hashes

Hashes for gradoptics-0.0.1.tar.gz
Algorithm Hash digest
SHA256 79f8f63192fc2f194d22dd9061e8dc0b6e10fdee097d047008d9b8c310f0700b
MD5 cefbdb365faea403670a5243610914d1
BLAKE2b-256 7cf8b51820f4d9bedcfbcc4f15f01794a8f4525b10bf05ec97d87168d6ffd786

See more details on using hashes here.

File details

Details for the file gradoptics-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gradoptics-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.2

File hashes

Hashes for gradoptics-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2af0b2ea7ee8365b8d7e770a34a972532cee22c4ae3a1dd097c99a95efdf349
MD5 2acc138fe4d319801cacbdf80aa85ee4
BLAKE2b-256 d1ac30406d39b0a98498f04dfe09a98968f78ba526b7755fadc1d0025201bc4e

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