prysm
physical optics: integrated modeling, phase retrieval, segmented systems, polynomials and fitting, sequential raytracing... (by brandondube)
raypier_optics
A raytracing toolkit for optical design (by bryancole)
Our great sponsors
prysm | raypier_optics | |
---|---|---|
28 | 3 | |
234 | 43 | |
- | - | |
8.3 | 0.0 | |
15 days ago | over 1 year ago | |
Python | Jupyter Notebook | |
MIT License | GNU General Public License v3.0 or later |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
prysm
Posts with mentions or reviews of prysm.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-09-07.
-
How to generate realistic PSFs for camera lenses?
My current concept is to just combine zernike polynomials with a random factor and calculate the PSF from that, which can be somewhat easily be done with the prysm library. These PSFs can then be convolved with circular and gaussian kernels for modelling additional defocus and accounting for other stuff like the AA filter. Then I'd add chromatic aberration by offseting/scaling the PSFs for each channel. Some generated kernels already look pretty good when comparing them to stars in astrophotography images, but others not so much.
- Prysm is a Python 3.6 library for numerical optics
-
Books/ other resources to learn about Fraunhofer diffraction farfield model using MATLAB/python?
https://github.com/brandondube/prysm (caveat emptor: mine)
- Demonstrations of laser optics/Fourier optics and diffraction simulations
-
Python raytracer optimizations and improvements
You can trace about 1 billion raysurfaces per second in pure python with CuPy, or a few million raysurfaces per second on CPU.
-
Exascale integrated modeling of low-order wavefront sensing and control for the Roman Coronagraph instrument
New paper from /u/BDube_Lensman using prysm to model NASA's Roman Coronagraph
-
Reccomended textbooks/reading for learning Thin Films
This free book is what this free code is based on
-
Options for free optical simulation?
Prysm Originally for diffraction type optics but seems to able to handle...everything? Performance as a priamary concern, GPU acceleration, proven JPL heritage :) Raytracing is however still experimental and without docs, generally whilst the library looks excellent if you're an optics person already I think I lack a bit of the base fundamental knowledge to really use it powerfully from just the API reference. I can see BDube has some raytracing example code in some of the issues I could probably adapt and muddle my way through at least. No guis is mildly annoying for a noob like myself, but I can work my way around matplotlib-ing just fine instead i'm sure.
-
Options for GPU accelerated python experiments?
You may want to steal my shim set since it lets you hot swap Numpy<-->cupy at runtime
-
Anaconda is so fucking broken!
I do computational diffraction with large manycore servers and GPUs at a FFRDC. The difference between MKL and not MKL is the difference between hitting enter and getting a result in an hour or two vs tomorrow.
raypier_optics
Posts with mentions or reviews of raypier_optics.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-09-12.
-
Options for free optical simulation?
Raypier - current front runner, I've managed to model both an RC telescope and a thorlabs microlens array here with results that seem quite reasonable. Also has a gui for sanity checking/interactivity. Unfortunately the performance really starts to tank as you increase the resolutions of the plane where the E-field is evaluated, increase number of rays or increase number of surfaces. (Something I would like to do to be able to model atmospheric disturbance + mirror misalignments +
-
So, You Want To Write a Raytracer?
Tracing meshes is something I've just started tackling in raypier (https://github.com/bryancole/raypier_optics). This is a spatial-search problem and a Oriented Bounding Box tree structure (OBB-tree) is a decent approach. Once you can trace a mesh, this provides the starting points for tracing freeform surfaces like NURBS. The approach is to split a NURBS surface into a set of B-spline patches. Each patch is defines by a coarse mesh of control points and discretised into a finer mesh which we trace with a OBB-tree to get close to the correct intersection. Then employ Newton-Raphson to get the final intersection. Once we can trace NURBS / Spline surfaces, we can then generalize the code to handle anything a CAD model can contain: the ultimate prize!
-
ANN: Raypier - A raytracing and physical optics modelling toolkit for python (preview)
I'm developing a physical optics modelling package for python, based on the Gaussian Beam Decomposition method (a.k.a. method of Gausslets). It also does conventional geometric ray-tracing. It handles polarisation, dispersion and diffraction. Raypier provides nice model visualisations via VTK and a live GUI where you can "twiddle" with your model parameters. Performance is pretty good, I think, although I've got no points of comparison. Check out the docs at https://raypier-optics.readthedocs.io/en/latest/introduction.html and/or get the code at https://github.com/bryancole/raypier_optics
What are some alternatives?
When comparing prysm and raypier_optics you can also consider the following projects:
OpticSim.jl - Optical Simulation software
pyoptica
nogil - Multithreaded Python without the GIL
SympleyWavey - A collection of code and design related to a DIY shack-hartmann wavefront sensor. Very much WIP :)
poppy - Physical Optics Propagation in Python
goray
mypyc - Compile type annotated Python to fast C extensions
go-tfhe - 🐿️ Pure go implementation of TFHE Fully Homomorphic Encryption Scheme
pymae - Materials for the book "Python for Mechanical and Aerospace Engineering"
warp - A Python framework for high performance GPU simulation and graphics
raytracing-in-python - Simple raytacer written in Python.
degradr - Python library for realistically degrading images.