lumicks / py-optics

Python code to aid with calculations for nanophotonics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License Build Status

py-optics

Python code to aid with calculations for nanophotonics. Currently it contains:

  • lumicks.pyoptics.psf: code that calculates the point spread function (electromagnetic field distribution) of a focused laser beam with arbitrary wavefront. The code takes polarization into account
  • lumicks.pyoptics.trapping: code that calculates the electromagnetic field distribution of a spherical particle at an arbitrary distance relative to a focused laser

All code is developed in-house at LUMICKS.

Py-optics is free to use under the conditions of the Apache-2.0 open source license.

How to get started

  1. Create and activate a virtual environment. With conda:

    $ conda create -n py-optics python=3.11
    $ conda activate py-optics
    

    Py-optics is tested on Python version 3.9 to 3.11. On Windows, there is a potential performance improvement if numpy and scipy are installed with conda, as they are optimized to use the Intel MKL libraries.

  2. Clone the repository:

    $ git clone https://github.com/lumicks/py-optics
    $ cd py-optics
    
  3. Install the pyoptics package:

    $ pip install -e .
    

    Or, if you want to install the additional dependencies for the example Notebooks:

    $ pip install -e .[examples]
    

    To run the benchmarks, you'll need to install extra packages for testing:

    $ pip install -e .[testing]
    

Example Jupyter Notebooks are available in the examples directory:

  1. Run the Notebook:

    $ cd examples
    $ jupyter notebook
    

About

Python code to aid with calculations for nanophotonics

License:Apache License 2.0


Languages

Language:Python 100.0%