POPPY (Physical Optics Propagation in Python) is a Python package that simulates physical optical propagation including diffraction

Overview

POPPY: Physical Optics Propagation in Python

docs/figures/readme_fig.png

Badge showing current released PyPI version Github Actions CI Status https://img.shields.io/badge/ascl-1602.018-blue.svg?colorB=262255

POPPY (Physical Optics Propagation in Python) is a Python package that simulates physical optical propagation including diffraction. It implements a flexible framework for modeling Fraunhofer and Fresnel diffraction and point spread function formation, particularly in the context of astronomical telescopes.

POPPY was developed as part of a simulation package for the James Webb Space Telescope, but is more broadly applicable to many kinds of imaging simulations. It is not, however, a substitute for high fidelity optical design software such as Zemax or Code V, but rather is intended as a lightweight alternative for cases for which diffractive rather than geometric optics is the topic of interest, and which require portability between platforms or ease of scripting.

For documentation, see http://poppy-optics.readthedocs.io/

Code by Marshall Perrin, Joseph Long, Ewan Douglas, Neil Zimmerman, Anand Sivaramakrishnan, Shannon Osborne, Kyle Douglass, Maciek Grochowicz, Phillip Springer, & Ted Corcovilos, with additional contributions from Remi Soummer, Kyle Van Gorkom, Jonathan Fraine, Christine Slocum, Roman Yurchak, and others on the Astropy team.

Projects using POPPY

POPPY provides the optical modeling framework used in:

Comments
  • Unexpected result for short-distance Fresnel propagation

    Unexpected result for short-distance Fresnel propagation

    Issue by josePhoenix Tuesday Oct 04, 2016 at 20:55 GMT Originally opened as https://github.com/mperrin/poppy/issues/194


    User @maciekgroch reports unusual behavior when propagating a 10nm wave a short distance past a circular aperture using the following code:

    import poppy
    import astropy.units as u
    
    npix = 1024
    wf = poppy.FresnelWavefront(
        5 * u.um,
        wavelength=10 * u.nm,
        npix=npix,
        oversample=4
    )
    wf *= poppy.CircularAperture(radius=800 * u.nm)
    plt.figure()
    wf.display()
    
    z = 12. * u.um
    plt.figure()
    wf.propagate_fresnel(z, display_intermed=True)
    

    POPPY produces this intensity pattern after propagating 12 um:

    after_poppy

    The user's other propagation software produces this pattern:

    maciekgroch_pattern

    @douglase, any ideas?

    opened by mperrin 30
  • making pixelscale of direct have length/pix units

    making pixelscale of direct have length/pix units

    Issue by douglase Wednesday Oct 05, 2016 at 19:45 GMT Originally opened as https://github.com/mperrin/poppy/pull/196



    douglase included the following code: https://github.com/mperrin/poppy/pull/196/commits

    opened by mperrin 18
  • Implement Fresnel Propagation

    Implement Fresnel Propagation

    Issue by douglase Tuesday May 19, 2015 at 23:30 GMT Originally opened as https://github.com/mperrin/poppy/issues/95


    I've made a first attempt at extending POPPY to support Fresnel propagation in a branch in my fork:

    https://github.com/douglase/poppy/tree/fresnel

    The new module inherits the Wavefront class and added the necessary functions, methods and properties for Fresnel diffraction calculations. I chose a separate submodule because don't want to break any existing POPPY routines.

    This new class has passed my initial tests. Demos of a telescope, diffraction from a circular aperture and the necessary Gaussian waist calculations are in this notebook: http://nbviewer.ipython.org/gist/douglase/600d6e4d88336f4ed0c4 (I left debug enabled, so there's lots of details in the notebook).

    Some future work:

    • Formal testing
    • Make docstrings Astropy Guideline complaint
    • Streamlined logging

    Is this a feature others would find useful?

    I'm going to keep working and testing this, but I wanted to open it up for outside input while things are still fresh.

    opened by mperrin 18
  • Added FITSFPMElement class and apply_fits_fpm_fftmft

    Added FITSFPMElement class and apply_fits_fpm_fftmft

    This PR adds the FITSFPMElement class to poppy_core.py along with the method of applying the FPM called apply_fits_fpm_fftmft to fresnel.py. The method is in the FresnelWavefront class such that the wavefront has the FPM applied to it. There is an additional if statement in the propagate() method of FresnelOpticalSystem to check if the optic type is a FITSFPMElement and if it should be applied using standard multiplication or via the new method.

    While working on the SPC modes of the Roman CGI models for POPPY, I still noticed some inconsistencies in the PSFs generated when compared to the results from the PROPER models. The PROPER models would use an FFT/MFT sequence to apply the focal plane masks for the SPC modes, so that sequence is what I have implemented here using POPPY's built in FFT and MFT functionality.

    The sequence does a forward FFT to a virtual pupil plane, it the does an inverse MFT back to the focal plane but with the correct sampling required to apply the FPM, so the FPM amplitude transmission is then applied to the wavefront. A forward MFT is the done to go back to the virtual pupil and an inverse FFT is done to be back at the focal plane with the original wavefront sampling.

    Results from the SPC modes show more accuracy than with my previous models I had implemented via the inwave parameter which I had a made a PR for before. These new results are shown below along with the total flux values in the array extents from both POPPY and PROPER.

    SPC730 mode at 730nm (central wavelength): image image

    SPC730 mode at 700nm: image image

    SPC825 mode at 825nm (central wavelength):
    image image

    SPC825 mode at 800nm:
    image image

    I have also verified the display functionality for this type of optic: image

    By making the planetype for the FITSFPMElement be an intermediate planetype, the wavefront at the FPM can also be displayed with extents, meaning the display_intermediates functionality also works: image image

    Others involved in this process are @Jashcraf and @douglase .

    Let us know what changes should be made or what should be added for this to become a feature in POPPY.

    opened by kian1377 17
  • Issues with astropy-helpers

    Issues with astropy-helpers

    Issue by mperrin Friday Jun 10, 2016 at 16:45 GMT Originally opened as https://github.com/mperrin/poppy/issues/170


    splitting off this topic from https://github.com/mperrin/poppy/issues/160#issuecomment-225229716

    Hi @eteq, @josePhoenix can give more of the details, but I think it's a bit of both.

    For literally years, every so often I've encountered some random and hard-to-debug failures which eventually traced back to "the astropy helpers are doing something unexpected behind the scenes":

    • https://github.com/astropy/package-template/issues/106
    • https://github.com/astropy/astropy/issues/2502
    • https://github.com/astropy/astropy/pull/3713
    • and now here this new "the astropy helpers are using version 2.7 of py.test even though I've installed 2.8"
    • which is possibly related to why we're getting consistent failures on Travis on python 3.5, even though all tests pass on 3.5 locally. https://github.com/mperrin/poppy/issues/159

    Each of the above has led to time-consuming debugging to track down what's going on, which has been a time sink and distraction from the main tasks we're actually trying to get done. I readily admit that software is hard, and we can't expect a bug-free existence or anything close to it. But overall given the limited functionality we're actually gaining from the astropy helpers (mostly some setup.py tweaks and the sphinx extensions), it seems like the overall return on time invested is negative.

    opened by mperrin 17
  • Updates to fresnel.py allowing users to create their own inwave object.

    Updates to fresnel.py allowing users to create their own inwave object.

    The changes made are such that a user can input their own custom wavefront data into a FresnelOpticalSystem() when using calc_psf().

    The methods calc_psf() and propagate_mono() have been added directly into the FresnelOpticalSystem() class, so they are not just inherited and they contain an additional kwarg that is inwave. This kwarg is initialized to be None, but the user can define their own FrenselWavefront() and input it into calc_psf() using the inwave kwarg. This inwave object is then passed to propagate_mono(), which subsequently passes inwave to the input_wavefront() method in FresnelOpticalSystem(), which has also been edited to initialize a wavefront if the value of inwave is None, or to raise a value error if something other than a FresnelWavefront() object was supplied.

    The changes made have been in an effort to create the Roman CGI modes with POPPY, however, the SPC modes and their data files required a unique sequence of MFTs and FFTs to apply the Focal Plane Masks (FPMs). So two separate optical systems were created, the first going up to the FPM and the second going through the rest of the optics of the CGI. This way, the FPM could be applied to the final wavefront of the first optical system, and then input into the second system to continue propagation. The results of this system have been tested and show agreement with the results of the PROPER model.

    results

    Future efforts will include implementing the technique used to apply the FPMs directly into POPPY such that two separate optical systems do not need to be created, but having the flexibility for a user to input their own wavefront data still seemed useful.

    Please let me know if there issues with the PR or anything else I should change. Others who have contributed are @douglase and @Jashcraf.

    opened by kian1377 14
  • Add enhancement #226

    Add enhancement #226

    Issue by corcoted Saturday Jul 01, 2017 at 18:22 GMT Originally opened as https://github.com/mperrin/poppy/pull/227


    Patch for enhancement request #226 Added an optional parameter "mergemode" to CompoundAnalyticOptic which provides two ways to combine AnalyticOptics:

    • mergemode="and" is the previous behavior (and new default)
    • mergemode="or" adds the transmissions of the optics, correcting for any overlap

    corcoted included the following code: https://github.com/mperrin/poppy/pull/227/commits

    opened by mperrin 14
  • poppy fails to install using pip3 in Python3 virtualenv

    poppy fails to install using pip3 in Python3 virtualenv

    Issue by kmdouglass Tuesday Mar 10, 2015 at 16:18 GMT Originally opened as https://github.com/mperrin/poppy/issues/80


    Hi all, I've just setup a clean virtualenv named myEnv in which I attempted to install poppy from pip3. Here are the current versions of packages I setup in the virtualenv using the Python 3.4.1 interpreter. I'm using Debian Wheezy.

    (myEnv)douglass:~$ pip freeze
    astropy==1.0.1
    certifi==14.5.14
    d2to1==0.2.11
    docutils==0.12
    ipython==3.0.0
    Jinja2==2.7.3
    jsonschema==2.4.0
    MarkupSafe==0.23
    matplotlib==1.4.3
    mistune==0.5.1
    nose==1.3.4
    numpy==1.9.2
    numpydoc==0.5
    psutil==2.2.1
    ptyprocess==0.4
    pyfits==3.3
    Pygments==2.0.2
    pyparsing==2.0.3
    pysynphot==0.9.6
    python-dateutil==2.4.1
    pytz==2014.10
    pyzmq==14.5.0
    requests==2.5.3
    scipy==0.15.1
    six==1.9.0
    Sphinx==1.2.3
    stsci.distutils==0.3.7
    terminado==0.5
    tornado==4.1
    

    And the output from the install attempt:

    (myEnv)douglass:~$ pip3 install poppy
    Collecting poppy
      Using cached poppy-0.3.4.tar.gz
        /home/douglass/.virtualenvs/myEnv/lib/python3.4/site-packages/pkg_resources/__init__.py:190: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behav
    ior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you h
    ave another use case requiring the tuple, please file a bug with the setuptools project describing that need.                                                                                                   
          stacklevel=1,
        Traceback (most recent call last):
          File "<string>", line 20, in <module>
          File "/tmp/pip-build-8io8bu2m/poppy/setup.py", line 71, in <module>
            cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE)
          File "/tmp/pip-build-8io8bu2m/poppy/.eggs/astropy_helpers-0.4.8-py3.4.egg/astropy_helpers/setup_helpers.py", line 409, in register_commands
            'build_ext': generate_build_ext_command(package, release),
          File "/tmp/pip-build-8io8bu2m/poppy/.eggs/astropy_helpers-0.4.8-py3.4.egg/astropy_helpers/setup_helpers.py", line 470, in generate_build_ext_command
            uses_cython = should_build_with_cython(packagename, release)
          File "/tmp/pip-build-8io8bu2m/poppy/.eggs/astropy_helpers-0.4.8-py3.4.egg/astropy_helpers/setup_helpers.py", line 1205, in should_build_with_cython
            fromlist=['release', 'cython_version'])
          File "/tmp/pip-build-8io8bu2m/poppy/poppy/__init__.py", line 78, in <module>
            from . import poppy_core
        Complete output from command python setup.py egg_info:
        /home/douglass/.virtualenvs/myEnv/lib/python3.4/site-packages/pkg_resources/__init__.py:190: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behav
    ior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you h
    ave another use case requiring the tuple, please file a bug with the setuptools project describing that need.                                                                                                   
    
          stacklevel=1,
    
        Traceback (most recent call last):
    
          File "<string>", line 20, in <module>
    
          File "/tmp/pip-build-8io8bu2m/poppy/setup.py", line 71, in <module>
    
            cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE)
    
          File "/tmp/pip-build-8io8bu2m/poppy/.eggs/astropy_helpers-0.4.8-py3.4.egg/astropy_helpers/setup_helpers.py", line 409, in register_commands
    
            'build_ext': generate_build_ext_command(package, release),
    
          File "/tmp/pip-build-8io8bu2m/poppy/.eggs/astropy_helpers-0.4.8-py3.4.egg/astropy_helpers/setup_helpers.py", line 470, in generate_build_ext_command
    
            uses_cython = should_build_with_cython(packagename, release)
    
          File "/tmp/pip-build-8io8bu2m/poppy/.eggs/astropy_helpers-0.4.8-py3.4.egg/astropy_helpers/setup_helpers.py", line 1205, in should_build_with_cython
    
            fromlist=['release', 'cython_version'])
    
          File "/tmp/pip-build-8io8bu2m/poppy/poppy/__init__.py", line 78, in <module>
    
            from . import poppy_core
    
        ----------------------------------------
        Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8io8bu2m/poppy
    

    Any idea how I can install poppy using Python3, or am I stuck with Python2? I also ran into a similar error when trying to install PyFFTW, but this is probably a secondary issue.

    Thanks!

    opened by mperrin 14
  • Under certain (unclear) conditions, use_multiprocessing causes calculation to hang

    Under certain (unclear) conditions, use_multiprocessing causes calculation to hang

    Issue by josePhoenix Friday Dec 12, 2014 at 16:17 GMT Originally opened as https://github.com/mperrin/poppy/issues/23


    For some reason, this sample code (using WebbPSF) causes a hang on my Mac Pro but not the science5 server or my personal machine (MacBook Air). Needs a better test case that uses only POPPY.

    (To avoid the sometimes unusual behavior of multiprocessing + the interactive interpreter, I saved this as a separate script and ran it from the command line.)

    import webbpsf
    import poppy
    nc = webbpsf.NIRCam()
    nc.filter = 'F150W2'
    poppy.conf.use_fftw = False
    poppy.conf.use_multiprocessing = True
    poppy.conf.n_processes = 8
    nc.calcPSF()
    

    Running this prints out logging output through "Propagating wavelength..." lines for the first 20 of 40 wavelengths, and then nothing happens.

    If I interrupt the script with Ctrl-C, I get tracebacks from all the running workers interleaved (to be expected, but hard to interpret) and it looks like they're all waiting on "task = get()" which in turn is waiting on "racquire()" which seems to acquire a lock on a pipe.

    bug 
    opened by mperrin 14
  • Improve ContinuousDeformableMirror: subpixel position actuator model, improved coordinate transforms including inclined DMs

    Improve ContinuousDeformableMirror: subpixel position actuator model, improved coordinate transforms including inclined DMs

    This PR improves the ContinuousDeformableMirror class (for e.g. Boston MEMS DMs) by modeling the actuator positions at sub pixel resolution in the "get DM surface via convolution" implementation.

    • The prior code in master rounds each actuator to the nearest integer pixel, pokes those pixels, then convolves by the DM actuator influence function. This results in uneven spacing of the modeled DM actuators unless the pupil pixel scale is an exact divisor of the DM actuator spacing (which we can't rely on).
    • The new code distributes the pokes for each DM across a 2x2 square of pixels, linearly weighting between them according to the sub pixel position of the actuator. Then it convolves that by the DM actuator influence function. This results in much more uniform spacing of the modeled actuators, independent of pixel scales in the DM array.

    Example image before:

    Unknown

    With this PR:

    Unknown-1

    This PR also slightly refactors the handling of DM flips, to reduce duplicated code between the convolution and Gaussian pathways, and to include the DM actuator mask (if provided) in the flipping. This is independent from the main improvements discussed above; a separate small improvement to the DM class.

    opened by mperrin 13
  • Remove use of astropy-helpers submodule

    Remove use of astropy-helpers submodule

    See astropy/astropy-APEs#52 ("A roadmap for package infrastructure without astropy-helpers") which describes how the functionality in astropy-helpers can be achieved via more standardized tools in the Python ecosystem.

    This is clearly good and we should do it.

    See for instance https://github.com/spacetelescope/mosviz/pull/179 and https://github.com/spacetelescope/cubeviz/pull/492 for examples of PRs that remove astropy-helpers. We should do similarly here.

    opened by mperrin 13
  • build(deps): bump astropy from 5.1 to 5.2

    build(deps): bump astropy from 5.1 to 5.2

    Bumps astropy from 5.1 to 5.2.

    Release notes

    Sourced from astropy's releases.

    v5.2

    See CHANGES.rst for the full changelog

    v5.1.1

    See CHANGES.rst for the full changelog

    Commits
    • cd4c7a0 Merge pull request #14169 from astrofrog/v5.2-changelog
    • 34dcd89 Finalizing changelog for v5.2
    • 3ca7bc8 Merge pull request #14157 from meeseeksmachine/auto-backport-of-pr-14154-on-v...
    • 779d4ab Backport PR #14154: DOC: Remove CASA, fix VO ref links
    • a58cf4b Merge pull request #14148 from meeseeksmachine/auto-backport-of-pr-14146-on-v...
    • 349499e Merge pull request #14094 from maxnoe/coord_perf_whatsnew
    • 9ca1c97 Backport PR #14146: DOC: statsmodels is https now
    • 6614de8 Merge pull request #14145 from pllim/backport-of-pr14142-to-v5.2.x
    • aff776f Manual backport of #14142 to v5.2.x
    • 45fb953 Add speed-up values to whats new
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • build(deps): bump numpy from 1.23.3 to 1.24.1

    build(deps): bump numpy from 1.23.3 to 1.24.1

    Bumps numpy from 1.23.3 to 1.24.1.

    Release notes

    Sourced from numpy's releases.

    v1.24.1

    NumPy 1.24.1 Release Notes

    NumPy 1.24.1 is a maintenance release that fixes bugs and regressions discovered after the 1.24.0 release. The Python versions supported by this release are 3.8-3.11.

    Contributors

    A total of 12 people contributed to this release. People with a "+" by their names contributed a patch for the first time.

    • Andrew Nelson
    • Ben Greiner +
    • Charles Harris
    • Clément Robert
    • Matteo Raso
    • Matti Picus
    • Melissa Weber Mendonça
    • Miles Cranmer
    • Ralf Gommers
    • Rohit Goswami
    • Sayed Adel
    • Sebastian Berg

    Pull requests merged

    A total of 18 pull requests were merged for this release.

    • #22820: BLD: add workaround in setup.py for newer setuptools
    • #22830: BLD: CIRRUS_TAG redux
    • #22831: DOC: fix a couple typos in 1.23 notes
    • #22832: BUG: Fix refcounting errors found using pytest-leaks
    • #22834: BUG, SIMD: Fix invalid value encountered in several ufuncs
    • #22837: TST: ignore more np.distutils.log imports
    • #22839: BUG: Do not use getdata() in np.ma.masked_invalid
    • #22847: BUG: Ensure correct behavior for rows ending in delimiter in...
    • #22848: BUG, SIMD: Fix the bitmask of the boolean comparison
    • #22857: BLD: Help raspian arm + clang 13 about __builtin_mul_overflow
    • #22858: API: Ensure a full mask is returned for masked_invalid
    • #22866: BUG: Polynomials now copy properly (#22669)
    • #22867: BUG, SIMD: Fix memory overlap in ufunc comparison loops
    • #22868: BUG: Fortify string casts against floating point warnings
    • #22875: TST: Ignore nan-warnings in randomized out tests
    • #22883: MAINT: restore npymath implementations needed for freebsd
    • #22884: BUG: Fix integer overflow in in1d for mixed integer dtypes #22877
    • #22887: BUG: Use whole file for encoding checks with charset_normalizer.

    Checksums

    ... (truncated)

    Commits
    • a28f4f2 Merge pull request #22888 from charris/prepare-1.24.1-release
    • f8fea39 REL: Prepare for the NumPY 1.24.1 release.
    • 6f491e0 Merge pull request #22887 from charris/backport-22872
    • 48f5fe4 BUG: Use whole file for encoding checks with charset_normalizer [f2py] (#22...
    • 0f3484a Merge pull request #22883 from charris/backport-22882
    • 002c60d Merge pull request #22884 from charris/backport-22878
    • 38ef9ce BUG: Fix integer overflow in in1d for mixed integer dtypes #22877 (#22878)
    • bb00c68 MAINT: restore npymath implementations needed for freebsd
    • 64e09c3 Merge pull request #22875 from charris/backport-22869
    • dc7bac6 TST: Ignore nan-warnings in randomized out tests
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • build(deps): bump matplotlib from 3.5.3 to 3.6.2

    build(deps): bump matplotlib from 3.5.3 to 3.6.2

    Bumps matplotlib from 3.5.3 to 3.6.2.

    Release notes

    Sourced from matplotlib's releases.

    REL: v3.6.2

    This is the second bugfix release of the 3.6.x series.

    This release contains several bug-fixes and adjustments:

    • Avoid mutating dictionaries passed to subplots
    • Fix bbox_inches='tight' on a figure with constrained layout enabled
    • Fix auto-scaling of ax.hist density with histtype='step'
    • Fix compatibility with PySide6 6.4
    • Fix evaluating colormaps on non-NumPy arrays
    • Fix key reporting in pick events
    • Fix thread check on PyPy 3.8
    • Handle input to ax.bar that is all NaN
    • Make rubber band more visible on Tk and Wx backends
    • Restore (and warn on) seaborn styles in style.library
    • Restore get_renderer function in deprecated tight_layout
    • nb/webagg: Fix resize handle on WebKit browsers (e.g., Safari)

    REL: v3.6.1

    This is the first bugfix release of the 3.6.x series.

    This release contains several bug-fixes and adjustments:

    • A warning is no longer raised when constrained layout explicitly disabled and tight layout is applied
    • Add missing get_cmap method to ColormapRegistry
    • Adding a colorbar on a ScalarMappable that is not attached to an Axes is now deprecated instead of raising a hard error
    • Fix barplot being empty when first element is NaN
    • Fix FigureManager.resize on GTK4
    • Fix fill_between compatibility with NumPy 1.24 development version
    • Fix hexbin with empty arrays and log scaling
    • Fix resize_event deprecation warnings when creating figure on macOS
    • Fix build in mingw
    • Fix compatibility with PyCharm's interagg backend
    • Fix crash on empty Text in PostScript backend
    • Fix generic font families in SVG exports
    • Fix horizontal colorbars with hatches
    • Fix misplaced mathtext using eqnarray
    • stackplot no longer changes the Axes cycler

    REL: v3.6.0

    Highlights of this release include:

    • Figure and Axes creation / management
      • subplots, subplot_mosaic accept height_ratios and width_ratios arguments
      • Constrained layout is no longer considered experimental
      • New layout_engine module

    ... (truncated)

    Commits
    • dc0328f REL: v3.6.2
    • d05801e Merge branch 'v3.6.1-doc' into v3.6.x
    • 7a9b9b6 DOC: Update GitHub stats for 3.6.2
    • 4334ef8 Merge pull request #24341 from meeseeksmachine/auto-backport-of-pr-24301-on-v...
    • 8334597 Backport PR #24301: Restore get_renderer function in deprecated tight_layout
    • 8e3f120 Merge pull request #24337 from meeseeksmachine/auto-backport-of-pr-24238-on-v...
    • a55a2d6 Merge pull request #24336 from meeseeksmachine/auto-backport-of-pr-24335-on-v...
    • 290eec7 Backport PR #24238: Update example and docstring to encourage the use of func...
    • f408034 Backport PR #24335: Fix missing word in ImageMagickWriter docstring.
    • 831f145 Merge pull request #24330 from meeseeksmachine/auto-backport-of-pr-24282-on-v...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update Python versions supported

    Update Python versions supported

    Astropy will drop python 3.8 support in March 2023; we should follow along then, and drop that from the supported version and the CI.

    Conversely we should add python 3.11 to the CI now that it's out.

    opened by mperrin 0
  • Can poppy set the max and min value when using the wave.display?

    Can poppy set the max and min value when using the wave.display?

    I would like to know if there is any source code for this wave [1].display. Or is there any way I can change the colorbar value scale, like changing the left colorbar the same as the right? waves[1].display(what='phase', colorbar=True,title = "Wavefront center") Screen Shot 2022-11-09 at 11 38 44 AM

    opened by qlmlp 1
Releases(v1.0.3)
  • v1.0.3(Jun 30, 2022)

    Another incremental release that introduces support and makes internal adjustments for Python 3.10.

    For full release notes, see https://poppy-optics.readthedocs.io/en/latest/relnotes.html Full changelog: https://github.com/spacetelescope/poppy/compare/v1.0.2...v1.0.3

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Jan 28, 2022)

  • v1.0.1(Dec 8, 2021)

    Minor re-release to fix some documentation formatting issues in 1.0.0

    What's Changed

    • Fix documentation formatting issues, Release 1.0.1... by @mperrin in https://github.com/spacetelescope/poppy/pull/476

    Full Changelog: https://github.com/spacetelescope/poppy/compare/v1.0.0...v1.0.1

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Dec 7, 2021)

    This is a major release, including significant changes in calculation internals related to optical sign conventions (not backwards compatible), some API changes, several additional updated optical element classes, bug fixes, and several algorithm improvements and performance enhancements.

    For full release notes, see https://poppy-optics.readthedocs.io/en/latest/relnotes.html

    Source code(tar.gz)
    Source code(zip)
  • v0.9.2(Feb 11, 2021)

    This minor release includes several updated optical element classes, bug fixes, and improved documentation. This is intended as a maintenance release shortly before v 1.0 which will introduce some backwards-incompatible changes.

    For full release notes see https://poppy-optics.readthedocs.io/en/latest/relnotes.html

    Source code(tar.gz)
    Source code(zip)
  • v0.9.1(Jun 22, 2020)

    This is a minor release primarily for updates in packaging infrastructure, plus a handful of small enhancements related to datacubes, segmented apertures, and new functionality for subsampled optics.

    For full release notes see https://poppy-optics.readthedocs.io/en/latest/relnotes.html

    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Nov 25, 2019)

    0.9.0

    2019 Nov 22

    New Functionality:

    • Chaining together multiple propagations calculations: Multiple OpticalSystem instances can now be chained together into a CompoundOpticalSystem. This includes mixed propagations that are partially Fresnel and partially Fraunhofer; Wavefront objects will be cast between types as needed. (:pr:290 by :user:mperrin)

    • Gray pixel subsampling of apertures: Implemented "gray pixel" sampling for circular apertures and stops, providing more precise models of aperture edges. For circular apertures this is done using a fast analytic geometry implementation adapted from open-source IDL code originally by Marc Buie. (:pr:325 by :user:mperrin, using Python code contributed by :user:astrofitz). For subpixel / gray pixel sampling of other optics in general, a new function fixed_sampling_optic takes any AnalyticOpticalElement and returns an equivalent ArrayOpticalElement with fixed sampling. This is useful for instance for taking a computationally-slow optic such as MultiHexagonAperture and saving a discretized version for future faster use. (:pr:307 by :user:mperrin)

    • Modeling tilted optics: New feature to model geometric projection (cosine scaling) of inclined optics, by setting an inclination_x or inclination_y attribute to the tilt angle in degrees. For instance inclination_x=30 will tilt an optic by 30 degrees around the X axis, and thus compress its apparent size in the Y axis by cosine(30 deg). Note, this transformation only applies the cosine scaling to the optic's appearance, and does not introduce wavefront for tilt. (:pr:329 by :user:mperrin)

    • Many improvements to the Continuous Deformable Mirror class:

      • Enhance model of DM actuator influence functions for more precise subpixel spacing of DM actuators, rather than pokes separated by integer pixel spacing. This applies to the 'convolution by influence function' method for modeling DMs (:pr:329 by :user:mperrin)
      • Support distinct radii for the active controllable mirror size and the reflective mirror size (:pr:293 by :user:mperrin)
      • ContinuousDeformableMirror now supports shift_x and shift_y to translate / decenter the DM, consistent with other optical element classes. (:pr:307 by :user:mperrin)
      • ContinuousDeformableMirror now also supports flip_x and flip_y attributes to flip its orientation along one or both axes, as well as the new inclination_x and inclination_y attributes for geometric projection.
    • Improved models of certain kinds of wavefront error:

      • New class StatisticalPSDWFE that models random wavefront errors described by a power spectral density, as is commonly used to specify and measure typical polishing residuals in optics. (:pr:315 by :user:ivalaginja; :pr:317 by :user:mperrin)
      • FITSOpticalElement can now support wavelength-independent phase maps defined in radians, for instance for modeling Pancharatnam-Berry phase as used in certain vector coronagraph masks. (:pr:306 by :user:joseph-long)
    • add_optic in Fresnel systems can now insert optics at any index into an optical system, rather than just appending at the end (:pr:298 by :user:sdwill)

    Software Infrastructure Updates and Internals:

    • PR :pr:290 for CompoundOpticalSystem involved refactoring the Wavefront and FresnelWavefront classes to both be child classes of a new abstract base class BaseWavefront. This change should be transparent for most/all users and requires no changes in calling code.
    • PR :pr:306 for wavelength-independent phase subsequently required refactoring of the optical element display code to correctly handle all cases. As a result the display code internals were clarified and made more consistent. (:pr:314 and :pr:321 by :user:mperrin with contributions from :user:ivalaginja and :user:shanosborne). Again this change should be transparent for users.
    • Removed deprecated / unused decorator function in WFE classes, making their get_opd function API consistent with the rest of poppy. (:pr:322 by :user:mperrin)
    • Accomodate some upstream changes in astropy (:pr:294 by :user:shanosborne, :pr:330 by :user:mperrin)
    • The poppy.Instrument._get_optical_system function, which has heretofore been an internal method (private, starting with underscore) of the Instrument class, has been promoted to a public part of the API as Instrument.get_optical_system().
    • Note, minimum supported versions of some upstream packages such as numpy and matplotlib have been updated.

    Bug Fixes and Misc Improvements:

    • Correctly assign BUNIT keyword after rescaling OPDs (:issue:285, :pr:286 by :user:laurenmarietta).
    • New header keywords in output PSF files for OPD_FILE and OPDSLICE to more cleanly record the information previously stored together in the PUPILOPD keyword (:pr:316 by :user:mperrin)
    • Update docs and example notebooks to replace deprecated function names with the current ones (:pr:288 by :user:corcoted).
    • Improvements in resampling wavefronts onto Detector instances, particularly in cases where the wavefront is already at the right plane so no propagation is needed. (Part of :pr:290 by :user:mperrin, then further improved in :pr:304 by :user:sdwill)
    • Allow passthrough of "normalize" keyword to measure_ee and measure_radius_at_ee functions (:pr:333 by :user:mperrin; :issue:332 by :user:ariedel)
    • Fix wavefront.as_fits complex wavefront output option (:pr:293 by :user:mperrin)
    • Stricter checking for consistent wavefront type and size parameters when summing wavefronts (:pr:313 and :pr:326 by :user:mperrin)
    • Fix an issue with MultiHexagonAperture in the specific case of 3 rings of hexes (:issue:303 by :user:LucasMarquis and :user:FredericCassaing; :pr:307 by :user:mperrin)
    • Fix an issue with BaseWavefront class refactor (:pr:311 by :user:douglase and :user:jlumbres)
    • Fix an issue with indexing in HexSegmentedDeformableMirror when missing the center segment (:issue:318 by :user:ivalaginja; :pr:320 by :user:mperrin)
    • Fix title display by OpticalElement.display function (:pr:299 by :user:shanosborne)
    • Fix display issue in SemiAnalyticCoronagraph class (:pr:324 by :user:mperrin).
    • Small improvements in some display labels (:pr:307 by :user:mperrin)

    Note, the new functionality for gray pixel representation of circular apertures does not work precisely for elliptical apertures such as from inclined optics. You may see warnings about this in cases when you use inclination_y or inclination_x attributes on a circular aperture. This warning is generally benign; the calculation is still more accurate than it would be without the subpixel sampling, though not perfectly precise. This known issue will likely be improved upon in a future release.

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Dec 13, 2018)

Owner
Space Telescope Science Institute
STScI is operated by AURA for NASA
Space Telescope Science Institute
The repository offers the official implementation of our BMVC 2021 paper in PyTorch.

CrossMLP Cascaded Cross MLP-Mixer GANs for Cross-View Image Translation Bin Ren1, Hao Tang2, Nicu Sebe1. 1University of Trento, Italy, 2ETH, Switzerla

Bingoren 16 Jul 27, 2022
Half Instance Normalization Network for Image Restoration

HINet Half Instance Normalization Network for Image Restoration, based on https://github.com/megvii-model/HINet. Dependencies NumPy PyTorch, preferabl

Holy Wu 4 Jun 06, 2022
Catalyst.Detection

Accelerated DL R&D PyTorch framework for Deep Learning research and development. It was developed with a focus on reproducibility, fast experimentatio

Catalyst-Team 12 Oct 25, 2021
PaddleRobotics is an open-source algorithm library for robots based on Paddle, including open-source parts such as human-robot interaction, complex motion control, environment perception, SLAM positioning, and navigation.

简体中文 | English PaddleRobotics paddleRobotics是基于paddle的机器人开源算法库集,包括人机交互、复杂运动控制、环境感知、slam定位导航等开源算法部分。 人机交互 主动多模交互技术TFVT-HRI 主动多模交互技术是通过视觉、语音、触摸传感器等输入机器人

185 Dec 26, 2022
The implementation code for "DAGAN: Deep De-Aliasing Generative Adversarial Networks for Fast Compressed Sensing MRI Reconstruction"

DAGAN This is the official implementation code for DAGAN: Deep De-Aliasing Generative Adversarial Networks for Fast Compressed Sensing MRI Reconstruct

TensorLayer Community 159 Nov 22, 2022
Rule Based Classification Project For Python

Rule-Based-Classification-Project (ENG) Business Problem: A game company wants to create new level-based customer definitions (personas) by using some

Deniz Can OĞUZ 4 Oct 29, 2022
A community run, 5-day PyTorch Deep Learning Bootcamp

Deep Learning Winter School, November 2107. Tel Aviv Deep Learning Bootcamp : http://deep-ml.com. About Tel-Aviv Deep Learning Bootcamp is an intensiv

Shlomo Kashani. 1.3k Sep 04, 2021
Scenarios, tutorials and demos for Autonomous Driving

The Autonomous Driving Cookbook (Preview) NOTE: This project is developed and being maintained by Project Road Runner at Microsoft Garage. This is cur

Microsoft 2.1k Jan 02, 2023
Compare neural networks by their feature similarity

PyTorch Model Compare A tiny package to compare two neural networks in PyTorch. There are many ways to compare two neural networks, but one robust and

Anand Krishnamoorthy 181 Jan 04, 2023
A library for differentiable nonlinear optimization.

Theseus A library for differentiable nonlinear optimization built on PyTorch to support constructing various problems in robotics and vision as end-to

Meta Research 1.1k Dec 30, 2022
Compressed Video Action Recognition

Compressed Video Action Recognition Chao-Yuan Wu, Manzil Zaheer, Hexiang Hu, R. Manmatha, Alexander J. Smola, Philipp Krähenbühl. In CVPR, 2018. [Proj

Chao-Yuan Wu 479 Dec 26, 2022
[CVPR'22] Official PyTorch Implementation of Collaborative Transformers for Grounded Situation Recognition

[CVPR'22] Collaborative Transformers for Grounded Situation Recognition Paper | Model Checkpoint This is the official PyTorch implementation of Collab

Junhyeong Cho 29 Dec 10, 2022
This code is part of the reproducibility package for the SANER 2022 paper "Generating Clarifying Questions for Query Refinement in Source Code Search".

Clarifying Questions for Query Refinement in Source Code Search This code is part of the reproducibility package for the SANER 2022 paper "Generating

Zachary Eberhart 0 Dec 04, 2021
Node Dependent Local Smoothing for Scalable Graph Learning

Node Dependent Local Smoothing for Scalable Graph Learning Requirements Environments: Xeon Gold 5120 (CPU), 384GB(RAM), TITAN RTX (GPU), Ubuntu 16.04

Wentao Zhang 15 Nov 28, 2022
PFENet: Prior Guided Feature Enrichment Network for Few-shot Segmentation (TPAMI).

PFENet This is the implementation of our paper PFENet: Prior Guided Feature Enrichment Network for Few-shot Segmentation that has been accepted to IEE

DV Lab 230 Dec 31, 2022
EFENet: Reference-based Video Super-Resolution with Enhanced Flow Estimation

EFENet EFENet: Reference-based Video Super-Resolution with Enhanced Flow Estimation Code is a bit messy now. I woud clean up soon. For training the EF

Yaping Zhao 19 Nov 05, 2022
GND-Nets (Graph Neural Diffusion Networks) in TensorFlow.

GNDC For submission to IEEE TKDE. Overview Here we provide the implementation of GND-Nets (Graph Neural Diffusion Networks) in TensorFlow. The reposit

Wei Ye 3 Aug 08, 2022
Keras documentation, hosted live at keras.io

Keras.io documentation generator This repository hosts the code used to generate the keras.io website. Generating a local copy of the website pip inst

Keras 2k Jan 08, 2023
Use unsupervised and supervised learning to predict stocks

AIAlpha: Multilayer neural network architecture for stock return prediction This project is meant to be an advanced implementation of stacked neural n

Vivek Palaniappan 1.5k Jan 06, 2023