Coder Social home page Coder Social logo

opticspy's Introduction

This fork can by used with python 3.6

To test

  • mkdir /tmp/github/
  • cd /tmp/github/
  • git clone https://github.com/Diti24/opticspy.git
  • Add codebase to python path: pip install -e opticspy
  • from opticspy.ray_tracing import * The basics is working... New_Lens.add_surface(number=11,radius=177.41176,thickness=7,glass='N-SK16_schott') gives an error to be investigated...

Opticspy is a python module for optics application. I want this for a long time. One reason is I know both optics and python, so why no develop some optics tools? The second reason is that there is not much opensource, easy-to-use optics program module(matlab has great fuctions but do not specify to optics application). I want this could be developed in to a core for a future web application for optics.

Followings are primary opticspy modules:

1. Real ray tracing and Lens Design:

2. Zernike Polynomial Methods

3. Interferometer and Testing Methods

There are some interesting derivative from opticspy:

It is very easy to reuse or "wrap" opticspy module with a GUI(e.g. PyQt)

This project is hosted on github in https://github.com/Sterncat/opticspy

Installing

Use pip install (recommend)

$ pip install opticspy
$ python2.7 setup.py install

Some trouble shooting please read troubleshooting.md

How to use

>>> import opticspy

And just have fun with it!

What I want

  • 1. After import the module and you will get some functions that can do some calculation and education in optics
  • 2. Parameters should be very flexible, and the results should be shown in visualized, intuitionistic figures.
  • 3. After development of core, I want it be dynamic web application(with Javascript)
  • 4. I even hope one day it will become a part of online optics design application, who knows?

TODO:

  • ✓ Real Ray tracing and basic lens design
  • ✓ Zernike Coefficient calculation
  • ✓ Zernike Polynomials surface(3D), map(2D), cutoff of 3D(1D), PSF
  • ✓ Zernike Polynomials Fitting Method
  • ✓ Rectangular, circle, double circle, frame, etc aperture
  • ✓ Third order ray aberration plot
  • ✓ Twyman_Green interferogram with aberration
  • ✓ Lateral Shear interferogram with aberration
  • ✓ Diffraction: generate diffraction pattern
  • ✓ Convert Zernike to Seidel coefficient
  • ✓ Seidel aberrations surface and interferogram
  • ✓ Fresnel and Fraunhofer diffraction
  • ✓ Hartmann Pattern Simulation
  • ✓ Geometric matrix calculation
  • ✓ PSF, OTF and MTF calculation
  • Rochi Test
  • Asphere fitting
  • Some freeform theory
  • More testing technology
  • Third and high order aberration calculation
  • Make it rock!

Authors and Contributors

I am Xing Fan. An optics master student now studying in the Institute of Optics, University of Rochester.

And this is my personal blog Marvin's Neverland!

Support or Contact

If you have questions and advice, or want to participate in this project, contact me at [email protected]. I would be very happy to find some one have the same interest!

MIT License


Copyright (c) 2014-2016 Xing Fan (https://github.com/Sterncat/opticspy) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

opticspy's People

Contributors

sterncat avatar hijiriishi avatar fhachenberg avatar htuennermann avatar alexhagen avatar otruffer avatar vascotenner avatar diti24 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.