Skip to main content

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.

Metadata

Release files for gradoptics 0.0.4

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

Source distribution (sdist)

Source distribution for gradoptics 0.0.4
File Size Uploaded Provenance Actions
gradoptics-0.0.4.tar.gz 37.5 kB Without provenance Details for gradoptics-0.0.4.tar.gz

Release files / gradoptics-0.0.4.tar.gz

Download URL gradoptics-0.0.4.tar.gz
Size 37.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bc2dfcb67fbac73ceaf21b080c7eceaec52d3ecaad7ef1b6df0dcbe5a21dfac5
BLAKE2b-256 checksum
How to use checksums
e716837918ac8fa2262384dfeb44f6232db17790bb9f2aa2eae7cdb2d2188e58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

Security for gradoptics 0.0.4

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.

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