Release Notes
For a list of contributors, see About POPPY.
1.1.2
2025 Jan 13
- Software Infrastructure Updates and Internals:
Test readthedocs by @BradleySappington in https://github.com/spacetelescope/poppy/pull/567
Update zernike.py by @mfeldt in https://github.com/spacetelescope/poppy/pull/569
Avoid un-padding Fresnel wavefronts when rotating (fixes #572) by @mperrin in https://github.com/spacetelescope/poppy/pull/573
trivial: remove comment text that mentions a deprecated astropy feature by @mperrin in https://github.com/spacetelescope/poppy/pull/574
Fix CI and ReadtheDocs Build Failures by @BradleySappington in https://github.com/spacetelescope/poppy/pull/581
build(deps): bump astropy from 5.2.2 to 5.3.2 by @dependabot in https://github.com/spacetelescope/poppy/pull/582
build(deps): bump matplotlib from 3.7.1 to 3.7.2 by @dependabot in https://github.com/spacetelescope/poppy/pull/579
build(deps): bump numpy from 1.24.3 to 1.25.2 by @dependabot in https://github.com/spacetelescope/poppy/pull/578
build(deps): bump scipy from 1.10.1 to 1.11.1 by @dependabot in https://github.com/spacetelescope/poppy/pull/576
build(deps): bump scipy from 1.11.1 to 1.11.2 by @dependabot in https://github.com/spacetelescope/poppy/pull/583
Fix Various issues with CI actions by @BradleySappington in https://github.com/spacetelescope/poppy/pull/592
Numpy 2.0 fixes:poly1d and NaN by @braingram in https://github.com/spacetelescope/poppy/pull/585
build(deps): bump matplotlib from 3.7.2 to 3.8.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/586
build(deps): bump numpy from 1.25.2 to 1.26.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/587
build(deps): bump scipy from 1.11.2 to 1.11.3 by @dependabot in https://github.com/spacetelescope/poppy/pull/588
build(deps): bump astropy from 5.3.2 to 5.3.4 by @dependabot in https://github.com/spacetelescope/poppy/pull/593
update actions/checkout to v4 by @BradleySappington in https://github.com/spacetelescope/poppy/pull/597
build(deps): bump matplotlib from 3.8.0 to 3.8.1 by @dependabot in https://github.com/spacetelescope/poppy/pull/598
TST: Use astropy dev from nightly wheel by @pllim in https://github.com/spacetelescope/poppy/pull/596
build(deps): bump numpy from 1.26.0 to 1.26.1 by @dependabot in https://github.com/spacetelescope/poppy/pull/599
unpin sphinx version by @BradleySappington in https://github.com/spacetelescope/poppy/pull/594
build(deps): bump astropy from 5.3.4 to 6.0.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/600
remove use of deprecated _get_optical_system by @braingram in https://github.com/spacetelescope/poppy/pull/595
Update utils.py - add Median Absolute Deviation option to radial_profile by @saikrishanthpm in https://github.com/spacetelescope/poppy/pull/591
use PyPI upload workflow from OpenAstronomy by @zacharyburnett in https://github.com/spacetelescope/poppy/pull/590
add pie wedge segmented aperture by @mperrin in https://github.com/spacetelescope/poppy/pull/604
build(deps): bump numpy from 1.26.2 to 1.26.3 by @dependabot in https://github.com/spacetelescope/poppy/pull/606
update actions version by @zacharyburnett in https://github.com/spacetelescope/poppy/pull/608
build(deps): bump numpy from 1.26.3 to 1.26.4 by @dependabot in https://github.com/spacetelescope/poppy/pull/609
build(deps): bump matplotlib from 3.8.2 to 3.8.3 by @dependabot in https://github.com/spacetelescope/poppy/pull/610
Implement WedgeSegmentedDeformableMirror by @mperrin in https://github.com/spacetelescope/poppy/pull/611
[SCSB-145] require Python 3.10 by @zacharyburnett in https://github.com/spacetelescope/poppy/pull/612
use canonical filename for RTD config by @zacharyburnett in https://github.com/spacetelescope/poppy/pull/613
build(deps): bump astropy from 6.0.0 to 6.0.1 by @dependabot in https://github.com/spacetelescope/poppy/pull/615
Minor: quiet two syntax warnings about string escape sequences by @mperrin in https://github.com/spacetelescope/poppy/pull/616
Add optional progress bar display during PSF and datacube calculations by @mperrin in https://github.com/spacetelescope/poppy/pull/605
build(deps): bump scipy from 1.12.0 to 1.13.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/619
build(deps): bump matplotlib from 3.8.3 to 3.8.4 by @dependabot in https://github.com/spacetelescope/poppy/pull/618
build(deps): bump matplotlib from 3.8.4 to 3.9.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/622
Update intel channel location by @BradleySappington in https://github.com/spacetelescope/poppy/pull/627
Merge Develop to branch by @BradleySappington in https://github.com/spacetelescope/poppy/pull/628
Dependabot merged by @BradleySappington in https://github.com/spacetelescope/poppy/pull/626
build(deps): bump numpy from 1.26.4 to 2.0.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/623
build(deps): bump matplotlib from 3.9.0 to 3.9.1 by @dependabot in https://github.com/spacetelescope/poppy/pull/629
min pin numexpr by @BradleySappington in https://github.com/spacetelescope/poppy/pull/632
use z-range for dependencies in requirements.txt by @BradleySappington in https://github.com/spacetelescope/poppy/pull/637
build(deps): bump scipy from 1.14.0 to 1.14.1 by @dependabot in https://github.com/spacetelescope/poppy/pull/633
fix float comparison bug for non-square subarrays by @mperrin in https://github.com/spacetelescope/poppy/pull/640
Fix an issue with providing astropy Units to calc_datacube by @mperrin in https://github.com/spacetelescope/poppy/pull/639
build(deps): update numexpr requirement from <2.10.0,>=2.9.0 to >=2.9.0,<2.11.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/641
build(deps): update astropy requirement from <6.2.0,>=6.1.2 to >=6.1.2,<7.1.0 by @dependabot in https://github.com/spacetelescope/poppy/pull/644
misc minor fixes by @mperrin in https://github.com/spacetelescope/poppy/pull/617
Allow shifting a detector, in alternative to shifting a source by @mperrin in https://github.com/spacetelescope/poppy/pull/643
Combined Dependabot Updates by @york-stsci in https://github.com/spacetelescope/poppy/pull/650
rename ‘wedge’ segment shame to ‘keystone’ by @mperrin in https://github.com/spacetelescope/poppy/pull/647
add outfile option to calc_datacube by @mperrin in https://github.com/spacetelescope/poppy/pull/646
[DRAFT] Documentation Fixes for release by @york-stsci in https://github.com/spacetelescope/poppy/pull/651
Sphinx fixes by @york-stsci in https://github.com/spacetelescope/poppy/pull/652
- New Contributors
@mfeldt made their first contribution in https://github.com/spacetelescope/poppy/pull/569
@braingram made their first contribution in https://github.com/spacetelescope/poppy/pull/585
@saikrishanthpm made their first contribution in https://github.com/spacetelescope/poppy/pull/591
@york-stsci made their first contribution in https://github.com/spacetelescope/poppy/pull/650
Full Changelog: https://github.com/spacetelescope/poppy/compare/v1.1.1…v1.1.2 1.1.1 —–
2023 May 16
This is a very minor re-release, to fix some documentation formatting and release packaging issues with the 1.1.0 release. No changes in functionality.
1.1.0
2023 May 12
- Software Infrastructure Updates and Internals:
Increase all CI test versions by 1, removing Python 3.8 and adding Python 3.11. Update minimum supported versions of astropy and numpy as well.
Updated ReadTheDocs build’s Python version by @ojustino in #512
Tried Python 3.8 with ReadTheDocs instead by @ojustino in #514
Fix position angle rotation passthrough for TiltOpticalPathDifference by @evanmayer in #524
Fix units error in MultiHexagonAperture, see #485 by @mperrin in #527
replacing
np.float
withnp.float_
per Issue 544 by @adambolton in #545Update minimum versions across the board including remove python 3.8 and adding pythong 3.11 by @BradleySappington in #551
add option to mark levels in display_ee by @douglase in #540
minor: misc PEP8 code style consistency reformatting by @mperrin in #554
Addition of CuPy as an Accelerated Computing Option by @kian1377 in #499
remove usages of deprecated
codecov
package by @zacharyburnett in #559Move metadata from non-standard setup.cfg into PEP 621-compliant pyproject.toml. (546 takeover) by @BradleySappington in #561
for now, skip a failing Fresnel test for the most recent scikit-image versions by @mperrin in #555
Remove older CUDA GPU code, now that it’s replaced by CuPY GPU code by @mperrin in #556
- New Contributors:
@evanmayer made their first contribution in :pr:524
@adambolton made their first contribution in :pr:545
@BradleySappington made their first contribution in :pr:551
@zacharyburnett made their first contribution in :pr:559
Full Changelog: https://github.com/spacetelescope/poppy/compare/v1.0.3…v1.1.0
1.0.3
2022 June 30
This is another incremental release that introduces support and makes internal adjustments for Python 3.10.
- Other enhancements and fixes:
zernike.py factorial() calls were corrected to ensure internal values are integers in Python 3.10 (#493 by @AarynnCarter)
- Software Infrastructure Updates and Internals:
Fix for Astropy Development CI test (#498 by @shanosborne)
Increase all CI test versions by 1, removing Python 3.7 and adding Python 3.10 (#503 by @shanosborne)
Accept various dependabot updates to recommended (not minimum) dependency versions (various PRs by @shanosborne and @mperrin)
Updated installation and release instructions to move away from AstroConda (#509 by @ojustino)
1.0.2
2022 January 28
This is a minor release, mostly to accomodate upstream changes in recent numpy and astropy versions.
- Software Infrastructure Updates and Internals:
Update code due to changes in Astropy API (#482 by @WilliamJamieson)
Update one test for numerical robustness with numpy’s use of Intel avx512 instructions on some platforms (#487 by @shanosborne)
Updates to recommended (not minimum) dependency versions to track latest numpy, matplotlib, etc (various PRs by @shanosborne)
1.0.1
2021 December 9
This is a very minor re-release, to fix some documentation formatting and release packaging issues with the 1.0.0 release. No changes in functionality.
1.0.0
2021 December 7
This is a major release with significant enhancements and changes, in particular with regards to changes in wavefront sign convention representations.
Changes and Clarifications in Signs for Wavefront Error and Phase
Some sign conventions for wavefront error and optical phase have changed in this version of poppy
This release includes optical algorithm updates after a thorough audit and cross-check of sign conventions for phase and wavefront error, disambiguating portions of the sign conventions and code to ensure consistency with several other relevant optical modeling packages. Poppy now strictly follows the sign conventions as advocated in e.g. Wyant and Creath’s Basic Wavefront Aberration Theory for Optical Metrology (or see the paper here). This makes poppy consistent with the convention more widely used in optical metrology and other optical software such as Code V; however this is not consistent with some other reference such as Goodman’s classic text Fourier Optics.
To achieve that consistency, this is a partially back-incompatible release, with changes in the signs of complex exponentials in some Fourier propagation calculations. Depending on your use case this may result in some changes in output PSFs or different signs or orientations from prior results.
See Sign Conventions for Coordinates, Phase, and Wavefront Error for details, discussion, and demonstration.
Many thanks to Derek Sabatke (Ball Aerospace); Matthew Bergkoetter, Alden Jurling, and Tom Zielinski (NASA GSFC); and Randal Telfer (STScI) for invaluable discussions and aid in getting these details onto a more rigorous footing.
- API Changes:
Several functions in the Zernike module were renamed for clarity, in particular the prior
opd_expand
is nowdecompose_opd()
, andopd_from_zernikes
is nowcompose_opd_from_basis()
. The prior function names also continue to work as aliases for backwards compatibility. (#471 by @mperrin)
- New Functionality:
New class
TipTiltStage
, which allows putting additional tip-tilt on any arbitrary optic, and adjusting/controlling the tip and tilt. See the tip-tilt documentation for example. (#414 by @mperrin)New class
CircularSegmentedDeformableMirror
, which models an aperture comprising several individually-controllable circular mirrors. See the circularly segmented deformable mirrors documentation for example. (#407 and #424 by @Teusia)New class
KolmogorovWFE
, which models the phase distortions in a turbulent atmosphere. See the propagation through atmosphere notebook for details. (#437 by @DaPhil)New class
ThermalBloomingWFE
, which models the change in WFE from heating of air (or other transmission medium) due to high powered laser beams. See the thermal blooming notebook for details. (#438 by @DaPhil)
- Other enhancements and fixes:
Wavefront instances gain a
wfe
attribute for the wavefront error in meters (computed from phase, so it will wrap if wavefront error exceeds +- 0.5 waves), and the wavefront display method can display wfe as well as intensity and phase.Faster algorithm for calculations in the
opd_from_zernikes()
function (#400 by @grbrady). Run time of this function was reduced roughly in half.Various performance enhancements in FFTs, array rotations, zero padding, and array indexing in certain cases (#394, #398, #411, #413 by @mperrin)
Bug fix to a sign inconsistency in wavefront rotation: While the documentation states that positive rotations are counterclockwise, the code had the other sign. Updated code to match the documented behavior, which also matches the rotation convention for optical elements. (#411 by @mperrin)
More robust algorithm for offset sources in optical systems with coordinate rotations and inversions (#420 by @mperrin). This ensures the correct sign of tilt is applied in the entrance pupil plane to achieve the requested source position in the output image plane.
Added
inwave=
parameter tocalc_psf
and related functions, for both Fresnel and Fraunhofer propagation types, to allow providing a custom input wavefront, for instance the output of some prior upstream calculation. If provided, this is used instead of the default input wavefront (a plane wave of uniform intensity). (#402 by @kian1377)Improved support for astropy Quantities, including being able to specify monochromatic wavelengths using Quantities of wavelength, and to specify optic shifts using Quantities in length or angular units as appropriate (#445, #447 by @mperrin).
- Software Infrastructure Updates and Internals:
Continuous integration system migrated to Github Actions, replacing previous use of Travis CI. (#434 by @shanosborne)
Updates to recommended (not minimum) dependency versions to track latest numpy, scipy, etc (various PRs by @shanosborne)
Updates to minimum dependency versions, generally to upstream releases as of mid-2020. (#415, #472 by @mperrin)
Swap to use of base
synphot
rather thanstsynphot
package, to avoid dependency on many GBs of reference data. (#421 by @mperrin)
0.9.2
2021 Feb 11
This 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.
- New Functionality:
New OpticalElement classes for ScalarOpticalPathDifference, LetterFAperture, and LetterFOpticalPathDifference. (#386 by @mperrin)
Improved
radial_profile
function to allow measurement of partial profiles for sources offset outside the FOV (#380 by @mperrin)Improved the CompoundAnalyticOptic class to correctly handle OPDS for compound optics with multiple non-overlapping apertures. (#386 by @mperrin)
- Other enhancements and fixes:
The ShackHartmannWavefrontSensor class was refactored and improved . (#369 by @fanpeng-kong). And a unit test case for this class was added (#376 by @remorgan123 in collaboration with @douglase)
Expanded documentation and example code for usage of astropy Units. (#374, #378 by @mperrin; with thanks to @keflavich’ and :user:`mcbeth)
Made the HexagonalSegmentedDeformableMirror class consistent with ContinuousDeformableMirror in having an ‘include_factor_of_two’ parameter, for control in physical surface versus wavefront error units
Bug fix for influence functions of rotated hexagonally segmented deformable mirrors. (#371 by @mperrin)
Bug fix for FWHM measurement on integer data type images. (#368 by @kjbrooks)
Bug fix for StatisticalPSDWFE to avoid side effects from changing global numpy random generator state. (#377 by @ivalaginja)
Bug fix for image display in cases using angular coordinates in units other than arc seconds. (#378 by @mperrin; with thanks to @mcbeth)
- Software Infrastructure Updates and Internals:
The main branches were renamed/relabeled to ’stable’ (rather than ‘master’) and ‘develop’. (#361, #370 by @mperrin)
Updates to Travis CI settings. (#367, #395 by @shanosborne)
Avoid deprecated modification of matplotlib colormaps (#379 by @spacegal-spiff)
Minor doc string clarification for get_opd (#381 by @douglase)
Remove unused parameter to Detector class (#385 by @mperrin)
Updates to meet STScI INS’s JWST Software Standards (#390 by @shanosborne)
Use Github’s Dependabot to test and update dependencies (#391: by :user:`shanosborne)
0.9.1
2020 June 22
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.
- New Functionality:
Adds new
Subapertures
class for modeling subsampled optics (i.e. optics that have multiple spatially disjoint output beams). AddsShackHartmannWavefrontSensor
class to model that type of sensor. See the Shack Hartmann Wavefront Sensor notebook for details and example codes. (#346 thanks to @remorgan01 and @douglase)
- Other enhancements and fixes:
calc_datacube
function now allowsnwavelengths>100
, removing a prior limitation of this function. (#351 by @ojustino)radial_profile
function can now be applied to datacubes, with aslice
keyword to specify which slice of the cube should be examined. (#352 by @mperrin)Improved the Zernike basis expansion function for segmented apertures,
opd_expand_segments
, to allow optional masking out of pixels at the segment borders. This can be useful in some circumstances for avoiding edge effects from partially illuminated pixels or interpolation artifacts when evaluating Zernike or hexike coefficients per segment. (#353 by @mperrin)Allows
Segmented_PTT_Basis
to pass through keyword arguments to parent classMultiHexagonAperture
, in particular for selecting/excluding particular segments from the aperture geometry. (#357 by @kjbrooks)Fix a log string formatting bug encountered in MFT propagation under certain conditions (#360 by @mperrin)
- Software Infrastructure Updates and Internals:
Removed dependency on the deprecated astropy-helpers package framework. (#349 by @shanosborne). Fixes #355.
Switched code coverage CI service to codecov.io. (#349 by @shanosborne)
0.9.0
2019 Nov 25
- New Functionality:
Chaining together multiple propagations calculations: Multiple
OpticalSystem
instances can now be chained together into aCompoundOpticalSystem
. This includes mixed propagations that are partially Fresnel and partially Fraunhofer; Wavefront objects will be cast between types as needed. (#290 by @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. (#325 by @mperrin, using Python code contributed by @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. (#307 by @mperrin)Modeling tilted optics: New feature to model geometric projection (cosine scaling) of inclined optics, by setting an
inclination_x
orinclination_y
attribute to the tilt angle in degrees. For instanceinclination_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. (#329 by @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 (#329 by @mperrin)
Support distinct radii for the active controllable mirror size and the reflective mirror size (#293 by @mperrin)
ContinuousDeformableMirror now supports
shift_x
andshift_y
to translate / decenter the DM, consistent with other optical element classes. (#307 by @mperrin)ContinuousDeformableMirror now also supports
flip_x
andflip_y
attributes to flip its orientation along one or both axes, as well as the newinclination_x
andinclination_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. (#315 by @ivalaginja; #317 by @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. (#306 by @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 (#298 by @sdwill)
- Software Infrastructure Updates and Internals:
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 #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. (#314 and #321 by @mperrin with contributions from @ivalaginja and @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. (#322 by @mperrin)Accomodate some upstream changes in astropy (#294 by @shanosborne, #330 by @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 asInstrument.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 (#285, #286 by @laurenmarietta).
New header keywords in output PSF files for
OPD_FILE
andOPDSLICE
to more cleanly record the information previously stored together in thePUPILOPD
keyword (#316 by @mperrin)Update docs and example notebooks to replace deprecated function names with the current ones (#288 by @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 #290 by @mperrin, then further improved in #304 by @sdwill)
Allow passthrough of “normalize” keyword to measure_ee and measure_radius_at_ee functions (#333 by @mperrin; #332 by @ariedel)
Fix
wavefront.as_fits
complex wavefront output option (#293 by @mperrin)Stricter checking for consistent wavefront type and size parameters when summing wavefronts (#313 and #326 by @mperrin)
Fix an issue with MultiHexagonAperture in the specific case of 3 rings of hexes (#303 by @LucasMarquis and @FredericCassaing; #307 by @mperrin)
Fix an issue with BaseWavefront class refactor (#311 by @douglase and @jlumbres)
Fix an issue with indexing in HexSegmentedDeformableMirror when missing the center segment (#318 by @ivalaginja; #320 by @mperrin)
Fix title display by OpticalElement.display function (#299 by @shanosborne)
Fix display issue in SemiAnalyticCoronagraph class (#324 by @mperrin).
Small improvements in some display labels (#307 by @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.
0.8.0
2018 December 15
Py2.7 support and deprecated function names removed
As previously announced, support for Python 2 has been removed in this release, as have the deprecated non-PEP8-compliant function names.
New Functionality:
The
zernike
submodule has gained better support for dealing with wavefront error defined over segmented apertures. TheSegment_Piston_Basis
andSegment_PTT_Basis
classes implement basis functions for piston-only or piston/tip/tilt motions of arbitrary numbers of hexagonal segments. Theopd_expand_segments
function implements a version of theopd_expand_orthonormal
algorithm that has been updated to correctly handle disjoint (non-overlapping support) basis functions defined on individual segments. (mperrin)Add new
KnifeEdge
optic class representing a sharp opaque half-plane, and aCircularPhaseMask
representing a circular region with constant optical path difference. (#273, @mperrin)Fresnel propagation can now automatically resample wavefronts onto the right pixel scales at Detector objects, same as Fraunhofer propagation. (#242, #264, @mperrin)
The
display_psf
function now can also handle datacubes produced bycalc_datacube
(#265, @mperrin)
Documentation:
Various documentation improvements and additions, in particular including a new “Available Optics” page showing visual examples of all the available optical element classes.
Bug Fixes and Software Infrastructure Updates:
Removal of Python 2 compatibility code, Python 2 test cases on Travis, and similar (#239, @mperrin)
Removal of deprecated non-PEP8 function names (@mperrin)
Fix for output PSF formatting to better handle variable numbers of extensions (#219, @shanosborne)
Fix for FITSOpticalElement opd_index parameter for selecting slices in datacubes (@mperrin)
Fix inconsistent sign of rotations for FITSOpticalElements vs. other optics (#275, @mperrin)
Cleaned up the logic for auto-choosing input wavefront array sizes (#274, @mperrin)
Updates to Travis doc build setup (#270, @mperrin, robelgeda)
Update package organization and documentation theme for consistency with current STScI package template (#267, #268, #278, @robelgeda)
More comprehensive unit tests for Fresnel propagation. (#191, #251, #264, @mperrin)
Update astropy-helpers to current version, and install bootstrap script too (@mperrin, @jhunkeler)
Minor: doc string correction in FresnelWavefront (@sdwill), fix typo in some error messages (#255, @douglase), update some deprecated logging function calls (@mperrin).
0.7.0
2018 May 30
Python version support: Future releases will require Python 3.
Please note, this is the final release to support Python 2.7. All future releases will require Python 3.5+. See Python 3 statement for more information on migrating to Python 3.
Performance Improvements:
Major addition of GPU-accelerated calculations for FFTs and related operations in many propagation calculations. GPU support is provided for both CUDA (NVidia GPUs) and OpenCL (AMD GPUs); the CUDA implementation currently accelerates a slightly wider range of operations. Obtaining optimal performance, and understanding tradeoffs between numpy, FFTW, and CUDA/OpenCL, will in general require tests on your particular hardware. As part of this, much of the FFT infrastructure has been refactored out of the Wavefront classes and into utility functions in
accel_math.py
. This functionality and the resulting gains in performance are described more in Douglas & Perrin, Proc. SPIE 2018. (#239, @douglase), (#250, @mperrin and @douglase).Additional performance improvements to other aspects of calculations using the
numexpr
package. Numexpr is now a highly recommended optional installation. It may well become a requirement in a future release. (#239, #245, @douglase)More efficient display of AnalyticOptics, avoiding unnecessary repetition of optics sampling. (@mperrin)
Single-precision floating point mode added, for cases that do not require the default double precision floating point and can benefit from the increased speed. (Experimental / beta; some intermediate calculations may still be done in double precision, thus reducing speed gains).
New Functionality:
New
PhysicalFresnelWavefront
class that uses physical units for the wavefront (e.g. volts/meter) and intensity (watts). See the physical units demo notebook for examples and further discussion. (#248
, @daphil).
calc_psf
gains a new parameter to request returning the complex wavefront (#234,@douglase).Improved handling of irregular apertures in WFE basis functions (
zernike_basis
,hexike_basis
, etc.) and theopd_expand
/opd_expand_nonorthonormal
fitting functions (@mperrin).Added new function
measure_radius_at_ee
which finds the radius at which a PSF achieves some given amount of encircled energy; in some sense an inverse tomeasure_ee
. (#244, @shanosborne)Much improved algorithm for
measure_fwhm
: the function now works by fitting a Gaussian rather than interpolating between a radial profile on fixed sampling. This yields much better results on low-sampled or under-sampled PSFs. (@mperrin)Add
ArrayOpticalElement
class, providing a cleaner interface for creating arbitrary optics at runtime by generating numpy ndarrays on the fly and packing them into an ArrayOpticalElement. (@mperrin)Added new classes for deformable mirrors, including both
ContinuousDeformableMirror
andHexSegmentedDeformableMirror
(@mperrin).
Bug Fixes and Software Infrastructure Updates:
The Instrument class methods and related API were updated to PEP8-compliant names. Old names remain for back compatibility, but are deprecated and will be removed in the next release. Related code cleanup for better PEP8 compliance. (@mperrin)
Substantial update to semi-analytic fast coronagraph propagation to make it more flexible about optical plane setup. Fixes #169 (#169, @mperrin)
Fix for integer vs floating point division when padding array sizes in some circumstances (#235, @exowanderer, @mperrin)
Fix for aperture clipping in
zernike.arbitrary_basis
(#241, @kvangorkom)Fix / documentation fix for divergence angle in the Fresnel code (#237, @douglase). Note, the
divergence
function now returns the half angle rather than the full angle.Fix for
markcentroid
andimagecrop
parameters conflicting in some cases indisplay_psf
(#231, @mperrin)For FITSOpticalElements with both shift and rotation set, apply the rotation first and then the shift for more intuitive UI (@mperrin)
Misc minor doc and logging fixes (@mperrin)
Increment minimal required astropy version to 1.3, and minimal required numpy version to 1.10; and various related Travis CI setup updates. Also added numexpr test case to Travis. (@mperrin)
Improved unit test for Fresnel model of Hubble Space Telescope, to reduce memory usage and avoid CI hangs on Travis.
Update
astropy-helpers
submodule to current version; necessary for compatibility with recent Sphinx releases. (@mperrin)
0.6.1
2017 August 11
Update
ah_bootstrap.py
to avoid an issue where POPPY would not successfully install when pulled in as a dependency by another package (@josephoenix)
0.6.0
2017 August 10
WavefrontError and subclasses now handle tilts and shifts correctly (#229, @mperrin) Thanks @corcoted for reporting!
Fix the
test_zernikes_rms
test case to correctly take the absolute value of the RMS error, supportoutside=
forhexike_basis
, enforce which arguments are required forzernike()
. (#223, @mperrin) Thanks to @kvangorkom for reporting!Bug fix for stricter Quantity behavior (
UnitTypeError
) in Astropy 2.0 (@mperrin)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. (#227, @corcoted)Add HexagonFieldStop optic (useful for making hexagon image masks for JWST WFSC, among other misc tasks.) (@mperrin)
Fix behavior where
zernike.arbitrary_basis
would sometimes clip apertures (#222, @kvangorkom)Fix
propagate_direct
in fresnel wavefront as described in issue#216 <https://github.com/spacetelescope/poppy/issues/216>_
(#218, @maciekgroch)
display_ee()
was not passing theext=
argument through toradial_profile()
, but now it does. (#220, @josephoenix)Fix displaying planes where
what='amplitude'
(#217, @maciekgroch)Fix handling of FITSOpticalElement big-endian arrays to match recent changes in SciPy (@mperrin) Thanks to @douglase for reporting!
radial_profile
now handlesnan
values in radial standard deviations (#214, @douglase)The FITS header keywords that are meaningful to POPPY are now documented in POPPY FITS Header Keywords Definitions and a new
PIXUNIT
keyword encodes “units of the pixels in the header, typically either arcsecond or meter” (#205, @douglase)A typo in the handling of the
markcentroid
argument todisplay_psf
is now fixed (so the argument can be setTrue
) (#211, @josephoenix)
radial_profile
now accepts an optionalpa_range=
argument to specify the [min, max] position angles to be included in the radial profile. (@mperrin)Fixes in POPPY to account for the fact that NumPy 1.12+ raises an
IndexError
when non-integers are used to index an array (#203, @kmdouglass)POPPY demonstration notebooks have been refreshed by @douglase to match output of the current code
0.5.1
2016 October 28
Fix ConfigParser import (see astropy/package-template#172)
Fixes to formatting of
astropy.units.Quantity
values (#171, #174, #179; @josephoenix, @neilzim)Fixes to
fftw_save_wisdom
andfftw_load_wisdom
(#177, #178; @mmechtley)Add
calc_datacube
method topoppy.Instrument
(#182; @mperrin)Test for Apple Accelerate more narrowly (#176; @mperrin)
Wavefront.display()
correctly handlesvmin
andvmax
args (#183; @neilzim)Changes to Travis-CI configuration (#197; @etollerud)
Warn on requested field-of-view too large for pupil sampling (#180; reported by @mmechtley, addressed by @mperrin)
Bugfix for
add_detector
inFresnelOpticalSystem
(#193; @maciekgroch)Fixes to unit handling and short-distance propagation in
FresnelOpticalSystem
(#194; @maciekgroch, @douglase, @mperrin)PEP8 renaming for
poppy.fresnel
for consistency with the rest of POPPY:propagateTo
becomespropagate_to
,addPupil
andaddImage
becomeadd_pupil
andadd_image
,inputWavefront
becomesinput_wavefront
,calcPSF
becomescalc_psf
(@mperrin)Fix
display_psf(..., markcentroid=True)
(#175, @josephoenix)
0.5.0
2016 June 10
Several moderately large enhancements, involving lots of under-the-hood updates to the code. (While we have tested this code extensively, it is possible that there may be some lingering bugs. As always, please let us know of any issues encountered via `the github issues page <https://github.com/spacetelescope/poppy/issues/>`_.)
Increased use of
astropy.units
to put physical units on quantities, in particular wavelengths, pixel scales, etc. Instead of wavelengths always being implicitly in meters, you can now explicitly say e.g.wavelength=1*u.micron
,wavelength=500*u.nm
, etc. You can also generally use Quantities for arguments to OpticalElement classes, e.g.radius=2*u.cm
. This is optional; the API still accepts bare floating-point numbers which are treated as implicitly in meters. (#145, #165; @mperrin, douglase)The
getPhasor
function for all OpticalElements has been refactored to split it into 3 functions:get_transmission
(for electric field amplitude transmission),get_opd
(for the optical path difference affecting the phase), andget_phasor
(which combines transmission and OPD into the complex phasor). This division simplifies and makes more flexible the subclassing of optics, since in many cases (such as aperture stops) one only cares about setting either the transmission or the OPD. Again, there are back compatibility hooks to allow existing code calling the deprecatedgetPhasor
function to continue working. (#162; @mperrin, josephoenix)Improved capabilities for handling complex coordinate systems:
Added new
CoordinateInversion
class to represent a change in orientation of axes, for instance the flipping “upside down” of a pupil image after passage through an intermediate image plane.
OpticalSystem.input_wavefront()
became smart enough to check forCoordinateInversion
andRotation
planes, and, if the user has requested a source offset, adjust the input tilts such that the source will move as requested in the final focal plane regardless of intervening coordinate transformations.
FITSOpticalElement
gets new optionsflip_x
andflip_y
to flip orientations of the file data.Update many function names for PEP8 style guide compliance. For instance
calc_psf
replacescalcPSF
. This was done with back compatible aliases to ensure that existing code continues to run with no changes required at this time, but at some future point (but not soon!) the older names will go away, so users are encouraged to migrate to the new names. (@mperrin, josephoenix)
And some smaller enhancements and fixes:
New functions for synthesis of OPDs from Zernike coefficients, iterative Zernike expansion on obscured apertures for which Zernikes aren’t orthonormal, 2x faster optimized computation of Zernike basis sets, and computation of hexike basis sets using the alternate ordering of hexikes used by the JWST Wavefront Analysis System software. (@mperrin)
New function for orthonormal Zernike-like basis on arbitrary aperture (#166; Arthur Vigan)
Flip the sign of defocus applied via the
ThinLens
class, such that positive defocus means a converging lens and negative defocus means diverging. (#164; @mperrin)New
wavefront_display_hint
optional attribute on OpticalElements in an OpticalSystem allows customization of whether phase or intensity is displayed for wavefronts at that plane. Applies tocalc_psf
calls withdisplay_intermediates=True
. (@mperrin)When displaying wavefront phases, mask out and don’t show the phase for any region with intensity less than 1/100th of the mean intensity of the wavefront. This is to make the display less visually cluttered with near-meaningless noise, especially in cases where a Rotation has sprayed numerical interpolation noise outside of the true beam. The underlying Wavefront values aren’t affected at all, this just pre-filters a copy of the phase before sending it to matplotlib.imshow. (@mperrin)
remove deprecated parameters in some function calls (#148; @mperrin)
0.4.1
2016 Apr 4:
Mostly minor bug fixes:
Fix inconsistency between older deprecated
angle
parameter to some optic classes versus newrotation
parameter for any AnalyticOpticalElement (#140; @kvangorkom, @josephoenix, @mperrin)Update to newer API for
psutil
(#139; Anand Sivaramakrishnan, @mperrin)“measure_strehl” function moved to
webbpsf
instead ofpoppy
. (#138; Kathryn St.Laurent, @josephoenix, @mperrin)Add special case to handle zero radius pixel in circular BandLimitedOcculter. (#137; @kvangorkom, @mperrin)
The output FITS header of an
AnalyticOpticalElement
’stoFITS()
function is now compatible with the input expected byFITSOpticalElement
.Better saving and reloading of FFTW wisdom.
Misc minor code cleanup and PEP8 compliance. (#149; @mperrin)
And a few more significant enhancements:
Added
MatrixFTCoronagraph
subclass for fast optimized propagation of coronagraphs with finite fields of view. This is a related variant of the approach used in theSemiAnalyticCoronagraph
class, suited for coronagraphs with a focal plane field mask limiting their field of view, for instance those under development for NASA’s WFIRST mission. ( #128; #147; @neilzim)The
OpticalSystem
class now hasnpix
andpupil_diameter
parameters, consistent with theFresnelOpticalSystem
. (#141; @mperrin)Added
SineWaveWFE
class to represent a periodic phase ripple.
0.4.0
2015 November 20
Major enhancement: the addition of Fresnel propagation ( #95, #100, #103, #106, #107, #108, #113, #114, #115, #100, #100; @douglase, @mperrin, @josephoenix) Many thanks to @douglase for the initiative and code contributions that made this happen.
Improvements to Zernike aberration models ( #99, #110, #121, #125; @josephoenix)
Consistent framework for applying arbitrary shifts and rotations to any AnalyticOpticalElement (#7, @mperrin)
When reading FITS files, OPD units are now selected based on BUNIT header keyword instead of always being “microns” by default, allowing the units of files to be set properly based on the FITS header.
Added infrastructure for including field-dependent aberrations at an optical plane after the entrance pupil ( #105, @josephoenix)
Improved loading and saving of FFTW wisdom ( #116, #120, #122, @josephoenix)
Allow configurable colormaps and make image origin position consistent (#117, @josephoenix)
Wavefront.tilt calls are now recorded in FITS header HISTORY lines (#123; @josephoenix)
Various improvements to unit tests and test infrastructure (#111, #124, #126, #127; @josephoenix, @mperrin)
0.3.5
2015 June 19
Now compatible with Python 3.4 in addition to 2.7! (#83, @josephoenix)
Updated version numbers for dependencies (@josephoenix)
Update to most recent astropy package template (@josephoenix)
AsymmetricSecondaryObscuration
enhanced to allow secondary mirror supports offset from the center of the optical system. (@mperrin)New optic
AnnularFieldStop
that defines a circular field stop with an (optional) opaque circular center region (@mperrin)display() functions now return Matplotlib.Axes instances to the calling functions.
FITSOpticalElement
will now determine if you are initializing a pupil plane optic or image plane optic based on the presence of aPUPLSCAL
orPIXSCALE
header keyword in the supplied transmission or OPD files (with the transmission file header taking precedence). (#97, @josephoenix)The
poppy.zernike.zernike()
function now actually returns a NumPy masked array when called withmask_array=True
poppy.optics.ZernikeAberration and poppy.optics.ParameterizedAberration have been moved to poppy.wfe and renamed
ZernikeWFE
andParameterizedWFE
. Also, ZernikeWFE now takes an iterable of Zernike coefficients instead of (n, m, k) tuples.Various small documentation updates
Bug fixes for:
redundant colorbar display (#82)
Unnecessary DeprecationWarnings in
poppy.utils.imshow_with_mouseover()
(#53)Error in saving intermediate planes during calculation (#81)
Multiprocessing causes Python to hang if used with Apple Accelerate (#23, n.b. the fix depends on Python 3.4)
Copy in-memory FITS HDULists that are passed in to FITSOpticalElement so that in-place modifications don’t affect the caller’s copy of the data (#89)
Error in the
poppy.utils.measure_EE()
function produced values for the edges of the radial bins that were too large, biasing EE values and leading to weird interpolation behavior near r = 0. (#96)
0.3.4
2015 February 17
Continued improvement in unit testing (@mperrin, @josephoenix)
Continued improvement in documentation (@josephoenix, @mperrin)
Functions such as addImage, addPupil now also return a reference to the added optic, for convenience (@josephoenix)
Multiprocessing code and semi-analytic coronagraph method can now return intermediate wavefront planes (@josephoenix)
Display methods for radial profile and encircled energy gain a normalization keyword (@douglase)
matrixDFT: refactor into unified function for all centering types (@josephoenix)
matrixDFT bug fix for axes parity flip versus FFT transforms (Anand Sivaramakrishnan, @josephoenix, @mperrin)
Bug fix: Instrument class can now pass through dict or tuple sources to OpticalSystem calc_psf (@mperrin)
Bug fix: InverseTransmission class shape property works now. (@mperrin)
Refactor instrument validateConfig method and calling path (@josephoenix)
Code cleanup and rebalancing where lines had been blurred between poppy and webbpsf (@josephoenix, @mperrin)
Misc packaging infrastructure improvements (@embray)
Updated to Astropy package helpers 0.4.4
Set up integration with Travis CI for continuous testing. See https://travis-ci.org/mperrin/poppy
0.3.3
2014 Nov
Bigger team!. This release log now includes github usernames of contributors:
New classes for wavefront aberrations parameterized by Zernike polynomials (@josephoenix, @mperrin)
ThinLens class now reworked to require explicitly setting an outer radius over which the wavefront is normalized. Note this is an API change for this class, and will require minor changes in code using this class. ThinLens is now a subclass of CircularAperture.
Implement resizing of phasors to allow use of FITSOpticalElements with Wavefronts that have different spatial sampling. (@douglase)
Installation improvements and streamlining (@josephoenix, @cslocum)
Code cleanup and formatting (@josephoenix)
Improvements in unit testing (@mperrin, @josephoenix, @douglase)
Added normalize=’exit_pupil’ option; added documentation for normalization options. (@mperrin)
Bug fix for “FQPM on an obscured aperture” example. Thanks to Github user qisaiman for the bug report. (@mperrin)
Bug fix to compound optic display (@mperrin)
Documentation improvements (team)
0.3.2
Released 2014 Sept 8
Bug fix: Correct pupil orientation for inverse transformed pupils using PyFFTW so that it is consistent with the result using numpy FFT.
0.3.1
Released August 14 2014
- Astropy compatibility updated to 0.4.
Configuration system reworked to accomodate the astropy.configuration transition.
Package infrastructure updated to most recent astropy package-template.
Several OpticalElements got renamed, for instance
IdealCircularOcculter
became justCircularOcculter
. (All the optics inpoppy
are fairly idealized and it seemed inconsistent to signpost that for only some of them. The explicit ‘Ideal’ nametag is kept only for the FQPM to emphasize that one in particular uses a very simplified prescription and neglects refractive index variation vs wavelength.)Substantially improved unit test system.
Some new utility functions added in poppy.misc for calculating analytic PSFs such as Airy functions for comparison (and use in the test system).
Internal code reorganization, mostly which should not affect end users directly.
Packaging improvements and installation process streamlining, courtesy of Christine Slocum and Erik Bray
Documentation improvements, in particular adding an IPython notebook tutorial.
0.3.0
Released April 7, 2014
Dependencies updated to use astropy.
Added documentation and examples for POPPY, separate from the WebbPSF documentation.
Improved configuration settings system, using astropy.config framework.
The astropy.config framework itself is in flux from astropy 0.3 to 0.4; some of the related functionality in poppy may need to change in the future.
Added support for rectangular subarray calculations. You can invoke these by setting fov_pixels or fov_arcsec with a 2-element iterable:
>> nc = webbpsf.NIRCam() >> nc.calc_psf('F212N', fov_arcsec=[3,6]) >> nc.calc_psf('F187N', fov_pixels=(300,100) )Those two elements give the desired field size as (Y,X) following the usual Python axis order convention.
Added support for pyFFTW in addition to PyFFTW3.
pyFFTW will auto save wisdom to disk for more rapid execution on subsequent invocations
InverseTransmission of an AnalyticElement is now allowed inside a CompoundAnalyticOptic
Added SecondaryObscuration optic to conveniently model an opaque secondary mirror and adjustable support spiders.
Added RectangleAperture. Added rotation keywords for RectangleAperture and SquareAperture.
Added AnalyticOpticalElement.sample() function to sample analytic functions onto a user defined grid. Refactored the display() and toFITS() functions. Improved functionality of display for CompoundAnalyticOptics.
0.2.8
First release as a standalone package (previously was integrated as part of webbpsf). See the release notes for WebbPSF for prior versions.
switched package building to use
setuptools
instead ofdistutils
/stsci_distutils_hack
new
Instrument
class in poppy provides much of the functionality previously in JWInstrument, to make it easier to model generic non-JWST instruments using this code.