dLux


NamedLux JSON
Version 0.14.0 PyPI version JSON
download
home_page
SummaryDifferentiable Optical Models as Parameterised Neural Networks in Jax using Zodiax.
upload_time2023-10-04 04:01:31
maintainer
docs_urlNone
author
requires_python>=3.8
licenseBSD 3-Clause License Copyright (c) 2010-2018, Space Telescope Science Institute, AURA All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords python optics machine-learning jax autodiff differentiable diffraction simulation telescope dlux
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![alt text](assets/logo.jpg?raw=true)

# ∂Lux

[![PyPI version](https://badge.fury.io/py/dLux.svg)](https://badge.fury.io/py/dLux)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![integration](https://github.com/LouisDesdoigts/dLux/actions/workflows/tests.yml/badge.svg)](https://github.com/LouisDesdoigts/dLux/actions/workflows/tests.yml)
[![Documentation](https://github.com/LouisDesdoigts/dLux/actions/workflows/documentation.yml/badge.svg)](https://louisdesdoigts.github.io/dLux/)

Differentiable Optical Models as _Parameterised Neural Networks_ in Jax using Zodiax

Contributors: [Louis Desdoigts](https://github.com/LouisDesdoigts), [Jordan Dennis](https://github.com/Jordan-Dennis), [Adam Taras](https://github.com/ataras2), [Max Charles](https://github.com/maxecharles), [Benjamin Pope](https://github.com/benjaminpope), [Peter Tuthill](https://github.com/ptuthill)

∂Lux is an open-source differentiable optical modelling framework harnessing the structural isomorphism between optical systems and neural networks, giving forwards models of optical systems as _parametric neural networks_.

∂Lux is built in [Zodiax](https://github.com/LouisDesdoigts/zodiax), which is an open-source object-oriented [Jax](https://github.com/google/jax) framework built as an extension of [Equinox](https://github.com/patrick-kidger/equinox) for scientific programming. This framework allows for the creation of complex optical systems involving many planes, phase and amplitude screens in each, and propagates between them in the Fraunhofer or Fresnel regimes. This enables [fast phase retrieval](https://louisdesdoigts.github.io/dLux/notebooks/phase_retrieval_demo/), image deconvolution, and [hardware design in high dimensions](https://louisdesdoigts.github.io/dLux/notebooks/designing_a_mask/). Because ∂Lux models are fully differentiable, you can [optimize them by gradient descent over millions of parameters](https://louisdesdoigts.github.io/dLux/notebooks/flatfield_calibration/); or use [Hamiltonian Monte Carlo to accelerate MCMC sampling](https://louisdesdoigts.github.io/dLux/notebooks/HMC/). Our code is fully open-source under a 3-clause BSD license, and we encourage you to use it and build on it to solve problems in astronomy and beyond.

The ∂Lux framework is built in [Zodiax](https://github.com/LouisDesdoigts/zodiax), which gives it a deep range of capabilities from both [Jax](https://github.com/google/jax) and [Equinox](https://github.com/patrick-kidger/equinox):

> - [Accelerated Numpy](https://jax.readthedocs.io/en/latest/jax-101/01-jax-basics.html): a Numpy-like API that can run on GPU and TPU
>
> - [Automatic Differentiation](https://jax.readthedocs.io/en/latest/jax-101/04-advanced-autodiff.html): Allows for optimisation and inference in extremely high-dimensional spaces
>
> - [Just-In-Time Compilation](https://jax.readthedocs.io/en/latest/jax-101/02-jitting.html): Compiles code into XLA at runtime and optimising execution across hardware
>
> - [Automatic Vectorisation](https://jax.readthedocs.io/en/latest/jax-101/03-vectorization.html): Allows for simple parallelism across hardware and asynchronous execution
>
<!-- > - [Path-Based Pytree Interface](usage.md): Path based indexing allows for easy interfacing with large and highly nested physical models -->

For an overview of these capabilities and different optimisation methods in [Zodiax](https://github.com/LouisDesdoigts/zodiax), please go through this [Zodiax Tutorial](https://louisdesdoigts.github.io/zodiax/docs/usage/).

Documentation: [https://louisdesdoigts.github.io/dLux/](https://louisdesdoigts.github.io/dLux/)

Requires: Python 3.10+, Jax 0.4.13+, Zodiax 0.4+

Installation: ```pip install dLux```

If you want to run the tutorials locally, you can install the 'extra' dependencies like so: ```pip install 'dLux[extras]'```

## Collaboration & Development

We are always looking to collaborate and further develop this software! We have focused on flexibility and ease of development, so if you have a project you want to use ∂Lux for, but it currently does not have the required capabilities, have general questions, thoughts or ideas, don't hesitate to [email me](mailto:louis.desdoigts@sydney.edu.au) or contact me on [twitter](https://twitter.com/gradientrider)! More details about contributing can be found in our [contributing guide](CONTRIBUTING.md).

## Publications

We have a multitude of publications in the pipeline using dLux, some built from our tutorials. To start we would recommend looking at [this invited talk](https://louisdesdoigts.github.io/diff_optics/#/0/3) on ∂Lux which gives a good overview and has an attached recording of it being presented! We also have [this poster](https://spie.org/astronomical-telescopes-instrumentation/presentation/Optical-design-analysis-and-calibration-using-Lux/12180-160)!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dLux",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "python,optics,machine-learning,jax,autodiff,differentiable,diffraction,simulation,telescope,dLux",
    "author": "",
    "author_email": "Louis Desdoigts <louis.desdoigts@sydney.edu.au>",
    "download_url": "https://files.pythonhosted.org/packages/25/fe/7a1398e1b49869aa738f2b2d8403d3677506683781a268586135a98e52fa/dLux-0.14.0.tar.gz",
    "platform": null,
    "description": "![alt text](assets/logo.jpg?raw=true)\n\n# \u2202Lux\n\n[![PyPI version](https://badge.fury.io/py/dLux.svg)](https://badge.fury.io/py/dLux)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![integration](https://github.com/LouisDesdoigts/dLux/actions/workflows/tests.yml/badge.svg)](https://github.com/LouisDesdoigts/dLux/actions/workflows/tests.yml)\n[![Documentation](https://github.com/LouisDesdoigts/dLux/actions/workflows/documentation.yml/badge.svg)](https://louisdesdoigts.github.io/dLux/)\n\nDifferentiable Optical Models as _Parameterised Neural Networks_ in Jax using Zodiax\n\nContributors: [Louis Desdoigts](https://github.com/LouisDesdoigts), [Jordan Dennis](https://github.com/Jordan-Dennis), [Adam Taras](https://github.com/ataras2), [Max Charles](https://github.com/maxecharles), [Benjamin Pope](https://github.com/benjaminpope), [Peter Tuthill](https://github.com/ptuthill)\n\n\u2202Lux is an open-source differentiable optical modelling framework harnessing the structural isomorphism between optical systems and neural networks, giving forwards models of optical systems as _parametric neural networks_.\n\n\u2202Lux is built in [Zodiax](https://github.com/LouisDesdoigts/zodiax), which is an open-source object-oriented [Jax](https://github.com/google/jax) framework built as an extension of [Equinox](https://github.com/patrick-kidger/equinox) for scientific programming. This framework allows for the creation of complex optical systems involving many planes, phase and amplitude screens in each, and propagates between them in the Fraunhofer or Fresnel regimes. This enables [fast phase retrieval](https://louisdesdoigts.github.io/dLux/notebooks/phase_retrieval_demo/), image deconvolution, and [hardware design in high dimensions](https://louisdesdoigts.github.io/dLux/notebooks/designing_a_mask/). Because \u2202Lux models are fully differentiable, you can [optimize them by gradient descent over millions of parameters](https://louisdesdoigts.github.io/dLux/notebooks/flatfield_calibration/); or use [Hamiltonian Monte Carlo to accelerate MCMC sampling](https://louisdesdoigts.github.io/dLux/notebooks/HMC/). Our code is fully open-source under a 3-clause BSD license, and we encourage you to use it and build on it to solve problems in astronomy and beyond.\n\nThe \u2202Lux framework is built in [Zodiax](https://github.com/LouisDesdoigts/zodiax), which gives it a deep range of capabilities from both [Jax](https://github.com/google/jax) and [Equinox](https://github.com/patrick-kidger/equinox):\n\n> - [Accelerated Numpy](https://jax.readthedocs.io/en/latest/jax-101/01-jax-basics.html): a Numpy-like API that can run on GPU and TPU\n>\n> - [Automatic Differentiation](https://jax.readthedocs.io/en/latest/jax-101/04-advanced-autodiff.html): Allows for optimisation and inference in extremely high-dimensional spaces\n>\n> - [Just-In-Time Compilation](https://jax.readthedocs.io/en/latest/jax-101/02-jitting.html): Compiles code into XLA at runtime and optimising execution across hardware\n>\n> - [Automatic Vectorisation](https://jax.readthedocs.io/en/latest/jax-101/03-vectorization.html): Allows for simple parallelism across hardware and asynchronous execution\n>\n<!-- > - [Path-Based Pytree Interface](usage.md): Path based indexing allows for easy interfacing with large and highly nested physical models -->\n\nFor an overview of these capabilities and different optimisation methods in [Zodiax](https://github.com/LouisDesdoigts/zodiax), please go through this [Zodiax Tutorial](https://louisdesdoigts.github.io/zodiax/docs/usage/).\n\nDocumentation: [https://louisdesdoigts.github.io/dLux/](https://louisdesdoigts.github.io/dLux/)\n\nRequires: Python 3.10+, Jax 0.4.13+, Zodiax 0.4+\n\nInstallation: ```pip install dLux```\n\nIf you want to run the tutorials locally, you can install the 'extra' dependencies like so: ```pip install 'dLux[extras]'```\n\n## Collaboration & Development\n\nWe are always looking to collaborate and further develop this software! We have focused on flexibility and ease of development, so if you have a project you want to use \u2202Lux for, but it currently does not have the required capabilities, have general questions, thoughts or ideas, don't hesitate to [email me](mailto:louis.desdoigts@sydney.edu.au) or contact me on [twitter](https://twitter.com/gradientrider)! More details about contributing can be found in our [contributing guide](CONTRIBUTING.md).\n\n## Publications\n\nWe have a multitude of publications in the pipeline using dLux, some built from our tutorials. To start we would recommend looking at [this invited talk](https://louisdesdoigts.github.io/diff_optics/#/0/3) on \u2202Lux which gives a good overview and has an attached recording of it being presented! We also have [this poster](https://spie.org/astronomical-telescopes-instrumentation/presentation/Optical-design-analysis-and-calibration-using-Lux/12180-160)!\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2010-2018, Space Telescope Science Institute, AURA All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Differentiable Optical Models as Parameterised Neural Networks in Jax using Zodiax.",
    "version": "0.14.0",
    "project_urls": {
        "repository": "https://github.com/LouisDesdoigts/dLux"
    },
    "split_keywords": [
        "python",
        "optics",
        "machine-learning",
        "jax",
        "autodiff",
        "differentiable",
        "diffraction",
        "simulation",
        "telescope",
        "dlux"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b0d08d2b6b005588bcb796932a4522c2244eeb3331653cab2d1f92b931daf85",
                "md5": "5bf40e16e980d0fa3e2a419f8ad9c821",
                "sha256": "47513f68b0a2b50d4cc2d21d20f9311027691302f7ddd2aa81bae0757faed61c"
            },
            "downloads": -1,
            "filename": "dLux-0.14.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5bf40e16e980d0fa3e2a419f8ad9c821",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 68774,
            "upload_time": "2023-10-04T04:01:28",
            "upload_time_iso_8601": "2023-10-04T04:01:28.451126Z",
            "url": "https://files.pythonhosted.org/packages/4b/0d/08d2b6b005588bcb796932a4522c2244eeb3331653cab2d1f92b931daf85/dLux-0.14.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25fe7a1398e1b49869aa738f2b2d8403d3677506683781a268586135a98e52fa",
                "md5": "5698757cdfbe5892fcfc20e81770c21b",
                "sha256": "6ec47ff19d5b3cbc9d9d592ae2627f8a446f08ce5c58c1de28ae45fe628748ee"
            },
            "downloads": -1,
            "filename": "dLux-0.14.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5698757cdfbe5892fcfc20e81770c21b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 62540,
            "upload_time": "2023-10-04T04:01:31",
            "upload_time_iso_8601": "2023-10-04T04:01:31.023682Z",
            "url": "https://files.pythonhosted.org/packages/25/fe/7a1398e1b49869aa738f2b2d8403d3677506683781a268586135a98e52fa/dLux-0.14.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-04 04:01:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LouisDesdoigts",
    "github_project": "dLux",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dlux"
}
        
Elapsed time: 0.11881s