diff --git a/docs/_themes/theme_webbpsf/static/bootstrap-astropy.css b/docs/_themes/theme_webbpsf/static/bootstrap-astropy.css
index 7739ca03..286b2c89 100644
--- a/docs/_themes/theme_webbpsf/static/bootstrap-astropy.css
+++ b/docs/_themes/theme_webbpsf/static/bootstrap-astropy.css
@@ -173,7 +173,7 @@ h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt, pre, code, tt {
background-color: #f8f8f8;
}
-/* override box for links & other sphinx-specifc stuff */
+/* override box for links & other sphinx-specific stuff */
tt.xref, a tt, tt.descname, tt.descclassname {
padding: 0 1px 0 1px;
border: none;
@@ -485,7 +485,7 @@ a.headerlink {
a.headerlink:hover {
background-color: #0069d6;
color: white;
- text-docoration: none;
+ text-decoration: none;
}
diff --git a/docs/_themes/theme_webbpsf/static/bootstrap-webbpsf.css b/docs/_themes/theme_webbpsf/static/bootstrap-webbpsf.css
index 56659ea1..a71eacc8 100644
--- a/docs/_themes/theme_webbpsf/static/bootstrap-webbpsf.css
+++ b/docs/_themes/theme_webbpsf/static/bootstrap-webbpsf.css
@@ -176,7 +176,7 @@ h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt, pre, code, tt {
background-color: #f8f8f8;
}
-/* override box for links & other sphinx-specifc stuff */
+/* override box for links & other sphinx-specific stuff */
tt.xref, a tt, tt.descname, tt.descclassname {
padding: 0 1px 0 1px;
border: none;
@@ -488,7 +488,7 @@ a.headerlink {
a.headerlink:hover {
background-color: #0069d6;
color: white;
- text-docoration: none;
+ text-decoration: none;
}
diff --git a/docs/_themes/theme_webbpsf/static/sidebar.js b/docs/_themes/theme_webbpsf/static/sidebar.js
index 15d87f3a..ecf5d62f 100644
--- a/docs/_themes/theme_webbpsf/static/sidebar.js
+++ b/docs/_themes/theme_webbpsf/static/sidebar.js
@@ -5,7 +5,7 @@
* This script makes the Sphinx sidebar collapsible.
*
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
- * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
+ * in .sphinxsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
* used to collapse and expand the sidebar.
*
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
diff --git a/docs/about.rst b/docs/about.rst
index 93d48598..48038ab0 100644
--- a/docs/about.rst
+++ b/docs/about.rst
@@ -22,7 +22,7 @@ The Team
-----------------
POPPY is developed primarily by a team of astronomers at the `Space Telescope
-Science Insitute `_, but is open to contributions from
+Science Institute `_, but is open to contributions from
scientists and software developers around the world. Development takes place
on Github at http://github.com/spacetelescope/poppy. See that page for the most up-to-date
list of contributors.
diff --git a/docs/coronagraphs.rst b/docs/coronagraphs.rst
index 50f1882d..de044d0b 100644
--- a/docs/coronagraphs.rst
+++ b/docs/coronagraphs.rst
@@ -3,7 +3,7 @@ Efficient Lyot coronagraph propagation
=============================================
-Poppy has extensive functionality to faciliate the modeling of coronagraph point spread functions. In addition to the general summary of those capabilities here, see the examples in the notebooks subdirectory:
+Poppy has extensive functionality to facilitate the modeling of coronagraph point spread functions. In addition to the general summary of those capabilities here, see the examples in the notebooks subdirectory:
`POPPY Examples `_
and
`MatrixFTCoronagraph_demo `_.
@@ -20,11 +20,11 @@ By default, an optical system defined in Poppy uses the Fast Fourier Transform (
:alt: Schematics of two Lyot coronagraph design variants
:align: right
-The upper design in the figure represents the classical Lyot coronagraph and its widely implemented, optimized descendent, the `apodized pupil Lyot coronagraph (APLC) `_. In this case an intermediate focal plane (labeled B) is occulted by a round, opaque mask. By applying the principle of electromagnetic field superposition, combined with knowledge of how FFT complexity scales with array size, `Soummer et al. (2007) `_ showed that the number of operations needed to compute the PSF is greatly reduced by replacing the FFT with discrete Fourier transfoms, implemented in a vectorized fashion and spatially restricted to the *occulted* region of the intermediate focal plane. This is the now widely-used **semi-analytical** computational method for numerically modeling Lyot coronagraphs.
+The upper design in the figure represents the classical Lyot coronagraph and its widely implemented, optimized descendent, the `apodized pupil Lyot coronagraph (APLC) `_. In this case an intermediate focal plane (labeled B) is occulted by a round, opaque mask. By applying the principle of electromagnetic field superposition, combined with knowledge of how FFT complexity scales with array size, `Soummer et al. (2007) `_ showed that the number of operations needed to compute the PSF is greatly reduced by replacing the FFT with discrete Fourier transforms, implemented in a vectorized fashion and spatially restricted to the *occulted* region of the intermediate focal plane. This is the now widely-used **semi-analytical** computational method for numerically modeling Lyot coronagraphs.
The lower design in the above figure shows a slightly different Lyot coronagraph design case. Here the focal plane mask (FPM) is a diaphragm that restricts the outer edge of the transmitted field. `Zimmerman et al. (2016) `_ showed how this design variant can solve the same starlight cancellation problem, in particular for the baseline design of WFIRST. With this FPM geometry, the superposition simplification of `Soummer et al. (2007) `_ is not valid. However, again the execution time is greatly reduced by using discrete, vectorized Fourier transforms, now spatially restricted to the *transmitted* region of the intermediate focal plane.
-In Poppy, two subclasses of OpticalSystem exploit the computational methods described above: SemiAnalyticCoronagraph and MatrixFTCoronagraph. Let's see how to make use of these subclasses to speed up Lyot corongraph PSF calculations.
+In Poppy, two subclasses of OpticalSystem exploit the computational methods described above: SemiAnalyticCoronagraph and MatrixFTCoronagraph. Let's see how to make use of these subclasses to speed up Lyot coronagraph PSF calculations.
Lyot coronagraph using the SemiAnalytic subclass
---------------------------------------------------
@@ -108,13 +108,13 @@ Again we will compare the execution time with the FFT case.::
# Re-cast as MFT coronagraph with annular diaphragm FPM
matrixFTcoron_annFPM_osys = poppy.MatrixFTCoronagraph( fftcoron_annFPM_osys, occulter_box=diaphragm.uninverted_optic.radius_inner )
t0_fft = time.time()
- annFPM_fft_psf, annFPM_fft_interm = fftcoron_annFPM_osys.calc_psf(wavelen, display_intermediates=True,\
+ annFPM_fft_psf, annFPM_fft_interim = fftcoron_annFPM_osys.calc_psf(wavelen, display_intermediates=True,\
return_intermediates=True)
t1_fft = time.time()
plt.figure()
t0_mft = time.time()
- annFPM_mft_psf, annFPM_mft_interm = matrixFTcoron_annFPM_osys.calc_psf(wavelen, display_intermediates=True,\
+ annFPM_mft_psf, annFPM_mft_interim = matrixFTcoron_annFPM_osys.calc_psf(wavelen, display_intermediates=True,\
return_intermediates=True)
t1_mft = time.time()
@@ -142,10 +142,10 @@ Print some of the propagation parameters::
lamoD_asec = wavelen/fftcoron_annFPM_osys.planes[0].pupil_diam * 180/np.pi * 3600
print("System diffraction resolution element scale (lambda/D) in arcsec: %.3f" % lamoD_asec)
- print("Array width in first focal plane, FFT: %d" % annFPM_fft_interm[1].amplitude.shape[0])
- print("Array width in first focal plane, MatrixFT: %d" % annFPM_mft_interm[1].amplitude.shape[0])
- print("Array width in Lyot plane, FFT: %d" % annFPM_fft_interm[2].amplitude.shape[0])
- print("Array width in Lyot plane, MatrixFT: %d" % annFPM_mft_interm[2].amplitude.shape[0])
+ print("Array width in first focal plane, FFT: %d" % annFPM_fft_interim[1].amplitude.shape[0])
+ print("Array width in first focal plane, MatrixFT: %d" % annFPM_mft_interim[1].amplitude.shape[0])
+ print("Array width in Lyot plane, FFT: %d" % annFPM_fft_interim[2].amplitude.shape[0])
+ print("Array width in Lyot plane, MatrixFT: %d" % annFPM_mft_interim[2].amplitude.shape[0])
System diffraction resolution element scale (lambda/D) in arcsec: 0.103
Array width in first focal plane, FFT: 8192
diff --git a/docs/extending.rst b/docs/extending.rst
index b8927907..f154cb92 100644
--- a/docs/extending.rst
+++ b/docs/extending.rst
@@ -33,7 +33,7 @@ Example skeleton code::
class myCustomOptic(poppy.AnalyticOpticalElement):
def __init__(self, *args, **kwargs):
- """ If your optic has adjustible parameters, then save them as attributes here """
+ """ If your optic has adjustable parameters, then save them as attributes here """
super().__init__(**kwargs)
def get_opd(self,wave):
@@ -51,7 +51,7 @@ Example skeleton code::
Note the use of the `self.get_coordinates()` helper function, which returns `y` and
-`x` arrays giving the coordinates as appopriate for the sampling of the supplied
+`x` arrays giving the coordinates as appropriate for the sampling of the supplied
`wave` object (by default in units of meters for most optics such as pupil planes,
in arcseconds for image plane optics). You can use these coordinates to
calculate the transmission and path delay appropriate for your optic. If
diff --git a/docs/fft_optimization.rst b/docs/fft_optimization.rst
index 2f96d7c0..046d80f3 100644
--- a/docs/fft_optimization.rst
+++ b/docs/fft_optimization.rst
@@ -175,7 +175,7 @@ Caching of plans means that irunning the same script a second time is much faste
-----------------------------------------------------------------------------------
Immediately after executing the above, I ran the same script again. Now the planning times all become essentially negligible.
-Oddly, the exection time for the largest array gets longer. I suspect this has something to do with memory or system load. ::
+Oddly, the execution time for the largest array gets longer. I suspect this has something to do with memory or system load. ::
For arrays of size 1024x1024
Building input circular aperture
diff --git a/docs/installation.rst b/docs/installation.rst
index 87fe350a..22cea9db 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -38,7 +38,7 @@ improvements if you are spending substantial time running calculations. See
* `psutil `__ enables slightly better
automatic selection of numbers of processes for multiprocess calculations.
* `pyFFTW `__. The FFTW library can speed
- up the FFTs used in multi-plane optical simulations such as coronagraphiy or
+ up the FFTs used in multi-plane optical simulations such as coronagraphy or
slit spectroscopy. Since direct imaging simulations use a discrete matrix FFT
instead, direct imaging simulation speed is unchanged. pyFFTW is recommended
if you expect to perform many coronagraphic calculations, particularly for
diff --git a/docs/overview.rst b/docs/overview.rst
index 3b89cc21..4982040f 100644
--- a/docs/overview.rst
+++ b/docs/overview.rst
@@ -52,7 +52,7 @@ sampling becomes wavelength dependent. To avoid these constraints, for
transforms onto the final `~poppy.Detector` plane, instead a Matrix Fourier Transform
(MFT) algorithm is used (See `Soummer et al. 2007 Optics Express `_). This allows
computation of the PSF directly on the desired detector pixel scale or an
-arbitrarily finely subsampled version therof. For equivalent array sizes *N*,
+arbitrarily finely subsampled version thereof. For equivalent array sizes *N*,
the MFT is slower than the FFT(*O(N^3)*), but in practice the ability to freely
choose a more appropriate *N* (and to avoid the need for post-FFT interpolation
onto a common pixel scale) more than makes up for this and the MFT is faster.
diff --git a/docs/performance.rst b/docs/performance.rst
index 23728006..bf9f69f1 100644
--- a/docs/performance.rst
+++ b/docs/performance.rst
@@ -71,7 +71,7 @@ The configuration options to enable multiprocessing live under :py:obj:`poppy.co
>>> poppy.conf.use_multiprocessing = True
>>> poppy.conf.use_fftw = False
-One caveat with running multiple processes is that the memory demands can become substantial for large oversampling factors. For instance, a 1024-pixel-across pupil with ``oversampling=4`` results in arrays that are 256 MB each. Several such arrays are needed in memory per calculation, with peak memory utilization reaching ~ 1 GB per process for ``oversampling=4`` and over 4 GB per process for ``oversamping=8``.
+One caveat with running multiple processes is that the memory demands can become substantial for large oversampling factors. For instance, a 1024-pixel-across pupil with ``oversampling=4`` results in arrays that are 256 MB each. Several such arrays are needed in memory per calculation, with peak memory utilization reaching ~ 1 GB per process for ``oversampling=4`` and over 4 GB per process for ``oversampling=8``.
Thus, if running on a 16-core computer, ensure at least 32 GB of RAM are available before using one process per core. If you are constrained by the amount of RAM available, you may experience better performance using fewer processes than the number of processor cores in your computer.
diff --git a/docs/relnotes.rst b/docs/relnotes.rst
index 8ba25dbd..9435602a 100644
--- a/docs/relnotes.rst
+++ b/docs/relnotes.rst
@@ -5,6 +5,21 @@ Release Notes
For a list of contributors, see :ref:`about`.
+1.0.2
+-----
+
+.. _rel1.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 (:pr:`482` by :user:`WilliamJamieson`)
+ * Update one test for numerical robustness with numpy's use of Intel avx512 instructions on some platforms (:pr:`487` by :user:`shanosborne`)
+ * Fix spelling mistakes across code base (:pr:`479` by :user:`jsoref`)
+ * Updates to recommended (not minimum) dependency versions to track latest numpy, matplotlib, etc (various PRs by :user:`shanosborne`)
+
1.0.1
-----
@@ -125,7 +140,7 @@ This is a minor release primarily for updates in packaging infrastructure, plus
* `calc_datacube` function now allows `nwavelengths>100`, removing a prior limitation of this function. (:pr:`351` by :user:`ojustino`)
* `radial_profile` function can now be applied to datacubes, with a `slice` keyword to specify which slice of the cube should be examined. (:pr:`352` by :user:`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. (:pr:`353` by :user:`mperrin`)
- * Allows `Segmented_PTT_Basis` to pass through keyword arguments to parent class `MultiHexagonAperture`, in particular for selecting/excluding particular segments from the apreture geometry. (:pr:`357` by :user:`kjbrooks`)
+ * Allows `Segmented_PTT_Basis` to pass through keyword arguments to parent class `MultiHexagonAperture`, in particular for selecting/excluding particular segments from the aperture geometry. (:pr:`357` by :user:`kjbrooks`)
* Fix a log string formatting bug encountered in MFT propagation under certain conditions (:pr:`360` by :user:`mperrin`)
**Software Infrastructure Updates and Internals:**
@@ -389,7 +404,7 @@ improved upon in a future release.
* 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`` and ``fftw_load_wisdom`` (`#177 `_, `#178 `_; @mmecthley)
+ * Fixes to ``fftw_save_wisdom`` and ``fftw_load_wisdom`` (`#177 `_, `#178 `_; @mmechtley)
* Add ``calc_datacube`` method to ``poppy.Instrument`` (`#182 `_; @mperrin)
* Test for Apple Accelerate more narrowly (`#176 `_; @mperrin)
* ``Wavefront.display()`` correctly handles ``vmin`` and ``vmax`` args (`#183 `_; @neilzim)
@@ -420,7 +435,7 @@ some lingering bugs. As always, please let us know of any issues encountered via
(`#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 affectig the phase), and ``get_phasor`` (which combines transmission
+ (for the optical path difference affecting the phase), and ``get_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
@@ -439,7 +454,7 @@ some lingering bugs. As always, please let us know of any issues encountered via
* Update many function names for `PEP8 style guide compliance `_.
For instance `calc_psf` replaces `calcPSF`. 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 encouranged to migrate to the new names.
+ 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:
@@ -659,7 +674,7 @@ Released April 7, 2014
* 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 adjustible support spiders.
+ * 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.
@@ -669,7 +684,7 @@ Released April 7, 2014
0.2.8
-----
- * First release as a standalone package (previously was integrated as part of webbpsf). See the release notes for WebbPSF for prior verions.
+ * 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 of `distutils`/`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.
diff --git a/docs/wfe.rst b/docs/wfe.rst
index 92949469..085e752f 100644
--- a/docs/wfe.rst
+++ b/docs/wfe.rst
@@ -245,7 +245,7 @@ desired in the basis, as well as the desired sampling (how many pixels across ea
* :func:`poppy.zernike.zernike_basis` is the standard Zernike polynomials over a unit circle
* :func:`poppy.zernike.hexike_basis` is the Hexikes over a unit hexagon
- * :func:`poppy.zernike.arbitrary_basis` uses the Gram-Schmidt orthonormalization algorthm to generate an
+ * :func:`poppy.zernike.arbitrary_basis` uses the Gram-Schmidt orthonormalization algorithm to generate an
orthonormal basis for any supplied arbitrary aperture shape.
* :class:`poppy.zernike.Segment_Piston_Basis` implements bases defined by hexagonal segments controlled in piston only. Unlike the prior basis functions, this one is a function class: first you must instantiate it to specify the desired number of hexagons and other pupil geometry information, and then you can use the resulting object as a basis function to compute the hexikes.
* :class:`poppy.zernike.Segment_PTT_Basis` is similar, but each segment can be controlled in piston, tip, and tilt.
@@ -256,7 +256,7 @@ desired in the basis, as well as the desired sampling (how many pixels across ea
Using any of the above basis functions, OPD arrays can be decomposed into coefficients per each term, or conversely
OPD arrays can be generated from provided coefficients. There are several functions provided for OPD decomposition, tuned for different usage scenarios.
- * :func:`poppy.zernike.compose_opd_from_basis` generates an OPD from providend coefficients for any of the above basis sets.
+ * :func:`poppy.zernike.compose_opd_from_basis` generates an OPD from provided coefficients for any of the above basis sets.
* :func:`poppy.zernike.decompose_opd` projects a given OPD into a basis, and returns the resulting coefficients. This version of the function works best when dealing with cases closer to ideal, i.e. Zernikes over an actually-circular aperture.
* :func:`poppy.zernike.decompose_opd_nonorthonormal_basis` does the same, but uses an alternate iterative algorithm that works better when dealing with basis sets that are not strictly orthonormal over the given aperture.
* :func:`poppy.zernike.decompose_opd_segments` uses a similar iterative algorithm but with some adjustments to better handle spatially disjoint basis elements such as different segments. Use this for best results if you're dealing with a segmented aperture.
diff --git a/poppy/__init__.py b/poppy/__init__.py
index 03d564c1..d7e872b6 100644
--- a/poppy/__init__.py
+++ b/poppy/__init__.py
@@ -68,7 +68,7 @@ class Conf(_config.ConfigNamespace):
'is available)?')
use_opencl = _config.ConfigItem(True, 'Use OpenCL for FFTs on GPU (assuming it' +
'is available)?')
- use_numexpr = _config.ConfigItem(True, 'Use NumExpr to accelarate array math (assuming it' +
+ use_numexpr = _config.ConfigItem(True, 'Use NumExpr to accelerate array math (assuming it' +
'is available)?')
double_precision = _config.ConfigItem(True, 'Floating point values use float64 and complex128 if True,' +
diff --git a/poppy/accel_math.py b/poppy/accel_math.py
index 403b849c..df5d6828 100644
--- a/poppy/accel_math.py
+++ b/poppy/accel_math.py
@@ -136,7 +136,7 @@ def _ifftshift(x):
Otherwise defaults to numpy.
Note, ifftshift and fftshift are identical for even-length x,
the functions differ by one sample for odd-length x. This function
- implictly assumes that if using CUDA, the array size must be even,
+ implicitly assumes that if using CUDA, the array size must be even,
so we can use the same algorithm as fftshift.
Note - TODO write an OpenCL version
@@ -564,7 +564,7 @@ def fftw_1thread(it):
pyfftw.interfaces.numpy_fft.fft2(it, thread=1)
def fftw(it):
- # explictly try multithreaded here
+ # explicitly try multithreaded here
pyfftw.interfaces.numpy_fft.fft2(it, threads=threads)
def mklfft(it):
diff --git a/poppy/dms.py b/poppy/dms.py
index 9a15a027..5d3bf652 100644
--- a/poppy/dms.py
+++ b/poppy/dms.py
@@ -33,7 +33,7 @@ class ContinuousDeformableMirror(optics.AnalyticOpticalElement):
actuator_spacing : float or astropy Quantity with dimension length
Spacing between adjacent actuators as seen in that plane
influence_func : Influence function filename. Optional. If not supplied,
- a Gaussian model approximatly representative of an influence function
+ a Gaussian model approximately representative of an influence function
for a Boston MEMS DMs will be used. This parameter can let you provide
a more detailed model for your particular mirror.
radius : float or Quantity with dimension length
@@ -329,7 +329,7 @@ def get_opd(self, wave):
if hasattr(self, 'shift_x') or hasattr(self, 'shift_y'):
# Apply shifts here, if necessary. Doing it this way lets the same shift code apply
# across all of the above 3 potential ingredients into the OPD, potentially at some
- # small cost in accuracy rather than shifting each individuall at a subpixel level.
+ # small cost in accuracy rather than shifting each individually at a subpixel level.
# suppress irrelevant scipy warning from ndzoom calls
import warnings
@@ -391,7 +391,7 @@ def _get_surface_via_gaussian_influence_functions(self, wave):
interpolated_surface = np.zeros(wave.shape)
- crosstalk = 0.15 # amount of crosstalk on advancent actuator
+ crosstalk = 0.15 # amount of crosstalk on adjacent actuator
sigma = self.actuator_spacing.to(u.meter).value / np.sqrt((-np.log(crosstalk)))
pixelscale = x[0, 1] - x[0, 0] # scale of x,y
@@ -662,7 +662,7 @@ def display_influence_fn(self):
if self.influence_type == 'from file':
act_space_m = self.actuator_spacing.to(u.meter).value
r = np.linspace(0, 4 * act_space_m, 50)
- crosstalk = 0.15 # amount of crosstalk on advancent actuator
+ crosstalk = 0.15 # amount of crosstalk on adjacent actuator
sigma = act_space_m / np.sqrt((-np.log(crosstalk)))
plt.plot(r, np.exp(- (r / sigma) ** 2))
plt.xlabel('Separation [m]')
@@ -815,7 +815,7 @@ class CircularSegmentedDeformableMirror(SegmentedDeformableMirror, optics.MultiC
----------
rings, segment_radius, gap, center : various
All keywords for defining the segmented aperture geometry are inherited from
- the MultiCircularperture class. See that class for details.
+ the MultiCircularAperture class. See that class for details.
include_factor_of_two : Bool
include the factor of two due to reflection in the OPD function (optional, default False).
diff --git a/poppy/fresnel.py b/poppy/fresnel.py
index 98c0189c..5e193059 100644
--- a/poppy/fresnel.py
+++ b/poppy/fresnel.py
@@ -168,7 +168,7 @@ def __init__(self,
class FixedSamplingImagePlaneElement(FITSOpticalElement):
'''
This class allows the definition of focal plane masks using .fits files that will be applied to a
- wavefront via an FFT/MFT sequence to acheive the correct sampling at the assumed focal plane.
+ wavefront via an FFT/MFT sequence to achieve the correct sampling at the assumed focal plane.
This element will only function as an intermediate planetype due to pixelscale and display functionality
when propagating to this plane.
diff --git a/poppy/geometry.py b/poppy/geometry.py
index 12cff4a9..8353b02d 100644
--- a/poppy/geometry.py
+++ b/poppy/geometry.py
@@ -52,7 +52,7 @@ def _oneside(x, y0, y1, r):
"""
Compute the area of intersection between a triangle and a circle.
The circle is centered at the origin and has a radius of r. The
- triangle has verticies at the origin and at (x,y0) and (x,y1).
+ triangle has vertices at the origin and at (x,y0) and (x,y1).
This is a signed area. The path is traversed from y0 to y1. If
this path takes you clockwise the area will be negative.
"""
diff --git a/poppy/instrument.py b/poppy/instrument.py
index f7789af8..aa7680e9 100644
--- a/poppy/instrument.py
+++ b/poppy/instrument.py
@@ -828,7 +828,7 @@ def _get_filter_list(self):
bandpasslist : dict
dictionary of string names for use by synphot
- This could probably be folded into one using an OrderdDict. FIXME do that later
+ This could probably be folded into one using an OrderedDict. FIXME do that later
"""
@@ -976,9 +976,9 @@ def _get_weights(self, source=None, nlambda=None, monochromatic=None, verbose=Fa
wavelengths = wavelengths * units.Unit(waveunit)
lrange = wavelengths[throughputs > 0.4].to_value(units.m) # convert from Angstroms to Meters
# get evenly spaced points within the range of allowed lambdas, centered on each bin
- lambd = np.linspace(np.min(lrange), np.max(lrange), nlambda, endpoint=False) + (
- np.max(lrange) - np.min(lrange)) / (2 * nlambda)
+ points = np.linspace(np.min(lrange), np.max(lrange), nlambda, endpoint=False) + (
+ np.max(lrange) - np.min(lrange)) / (2 * nlambda)
filter_fn = scipy.interpolate.interp1d(wavelengths.to_value(units.m), throughputs, kind='cubic',
bounds_error=False)
- weights = filter_fn(lambd)
- return lambd, weights
+ weights = filter_fn(points)
+ return points, weights
diff --git a/poppy/matrixDFT.py b/poppy/matrixDFT.py
index 80106ec7..956431ec 100644
--- a/poppy/matrixDFT.py
+++ b/poppy/matrixDFT.py
@@ -9,7 +9,7 @@
the Fourier transform is located, i.e. where the PSF center ends up.
- 'FFTSTYLE' centered on one pixel
- - 'SYMMETRIC' centerd on crosshairs between middle pixel
+ - 'SYMMETRIC' centered on crosshairs between middle pixel
- 'ADJUSTABLE', always centered in output array depending on
whether it is even or odd
diff --git a/poppy/optics.py b/poppy/optics.py
index 6f6e0766..4cc56651 100644
--- a/poppy/optics.py
+++ b/poppy/optics.py
@@ -505,7 +505,7 @@ def get_transmission(self, wave):
# add in the ND squares. Note the positions are not exactly the same in the two wedges.
# See the figures in Krist et al. of how the 6 ND squares are spaced among the 5
- # corongraph regions
+ # coronagraph regions
# Also add in the opaque border of the coronagraph mask holder.
if self.sigma > 4:
# MASK210R has one in the corner and one half in the other corner
@@ -540,7 +540,7 @@ def get_transmission(self, wave):
# either end
# scalefact = np.linspace(1,7, x.shape[1]).clip(2,6)
- # the scale fact should depent on X coord in arcsec, scaling across a 20 arcsec FOV.
+ # the scale fact should depend on X coord in arcsec, scaling across a 20 arcsec FOV.
# map flat regions to 2.5 arcsec each?
# map -7.5 to 2, +7.5 to 6. slope is 4/15, offset is +9.5
scalefact = (2 + (-x + 7.5) * 4 / 15).clip(2, 6)
@@ -572,7 +572,7 @@ def get_transmission(self, wave):
# add in the ND squares. Note the positions are not exactly the same in the two wedges.
# See the figures in Krist et al. of how the 6 ND squares are spaced among the 5
- # corongraph regions. Also add in the opaque border of the coronagraph mask holder.
+ # coronagraph regions. Also add in the opaque border of the coronagraph mask holder.
if np.abs(self.wavelength - 2.1e-6) < 0.1e-6:
# half ND square on each side
wnd = (
@@ -657,7 +657,7 @@ class CircularPhaseMask(AnalyticImagePlaneElement):
Wavelength in meters for which the phase mask was designed
retardance : float
Optical path delay at that wavelength, specified in waves
- relative to the reference wavelengt. Default is 0.5.
+ relative to the reference wavelength. Default is 0.5.
"""
@@ -1407,7 +1407,7 @@ class MultiHexagonAperture(MultiSegmentAperture):
Note that this routine becomes a bit slow for nrings >4. For repeated computations on
the same aperture, avoid repeated evaluations of this function. It will be faster to create
- this aperture, evalute it once, and save the result onto a discrete array, via either
+ this aperture, evaluate it once, and save the result onto a discrete array, via either
(1) saving it to a FITS file using the to_fits() method, and then use that in a
FITSOpticalElement, or
(2) Use the fixed_sampling_optic function to create an ArrayOpticalElement with
@@ -1520,7 +1520,7 @@ class MultiCircularAperture(MultiSegmentAperture):
The number of rings of hexagons to include, not counting the central segment
segment_radius : float, optional
radius of the circular sub-apertures in meters, default is 1 meters
- gap: float, otional
+ gap: float, optional
Gap between adjacent segments, in meters. Default is 0.01 m = 1 cm
center : bool, optional
should the central segment be included? Default is True.
@@ -2126,7 +2126,7 @@ def fixed_sampling_optic(optic, wavefront, oversample=2):
Returns
-------
new_array_optic : poppy.ArrayOpticalElement
- A version ofthe input optic with fixed arrays for OPD and transmission.
+ A version of the input optic with fixed arrays for OPD and transmission.
"""
from .poppy_core import ArrayOpticalElement
diff --git a/poppy/poppy_core.py b/poppy/poppy_core.py
index 09aa63a9..29c6cccc 100644
--- a/poppy/poppy_core.py
+++ b/poppy/poppy_core.py
@@ -449,7 +449,7 @@ def display(self, what='intensity', nrows=1, row=1, showpadding=False,
halfpix = self.pixelscale.to_value(pixelscale_unit) * 0.5
extent = [x.min() - halfpix, x.max() + halfpix, y.min() - halfpix, y.max() + halfpix]
- # implement semi-intellegent selection of what to display, if the user wants
+ # implement semi-intelligent selection of what to display, if the user wants
if what == 'best':
if self.planetype == PlaneType.image:
what = 'intensity' # always show intensity for image planes
@@ -1000,7 +1000,7 @@ def propagate_to(self, optic):
"""
if self.planetype == optic.planetype:
if isinstance(optic, Detector):
- _log.debug(" Resampling wavefront to match detector pixellation.")
+ _log.debug(" Resampling wavefront to match detector pixelation.")
self._resample_wavefront_pixelscale(optic)
else:
_log.debug(" Wavefront and optic %s already at same plane type, no propagation needed." % optic.name)
@@ -1604,7 +1604,7 @@ def calc_psf(self, wavelength=1e-6,
if _USE_FFTW:
utils.fftw_load_wisdom()
- if conf.use_multiprocessing and len(wavelength) > 1: # ######## Parallellized computation ############
+ if conf.use_multiprocessing and len(wavelength) > 1: # ######## Parallelized computation ############
# Avoid a Mac OS incompatibility that can lead to hard-to-reproduce crashes.
# see issues #23 and #176
@@ -2347,7 +2347,7 @@ class OpticalElement(object):
i.e. an identity function on transmitted wavefronts.) Use one of the many subclasses to
create a nontrivial optic.
- The OpticalElement class follows the behavoior of the Wavefront class, using units
+ The OpticalElement class follows the behavior of the Wavefront class, using units
of meters/pixel in pupil space and arcsec/pixel in image space.
The internal implementation of this class represents an optic with an array
diff --git a/poppy/sub_sampled_optics.py b/poppy/sub_sampled_optics.py
index 21da53ba..3934c591 100644
--- a/poppy/sub_sampled_optics.py
+++ b/poppy/sub_sampled_optics.py
@@ -29,12 +29,12 @@ class Subapertures(poppy.OpticalElement):
#initialize this new class, where the array of optics define the subapertures (e.g. lenslets)
Subapertures.sample_wf(wf) #this function takes the wavefront and subsamples it by the area of each optic
- Subapertures.get_wavefront_array() #returns an array of input sub-wavefronts multipled by subaperture optics
+ Subapertures.get_wavefront_array() #returns an array of input sub-wavefronts multiplied by subaperture optics
Subapertures.get_psfs() #fraunhofer or fresnel propagation of each pupil to the image/ waist
- image=Subapertures.get_composite_wavefont() # returns wavefront of image plane of all the spots put back together
+ image=Subapertures.get_composite_wavefront() # returns wavefront of image plane of all the spots put back together
Subapertures.opd #single array made up of subapertures
Subapertures.amplitude #single array made up of subapertures
- Subapertures.getphasor #returns propagated array of spots from get_composite_wavefont
+ Subapertures.getphasor #returns propagated array of spots from get_composite_wavefront
Subapertures.get_centroids() # computes centroids of each subaperture after propagated to the detector
@@ -238,7 +238,7 @@ def get_centroids(self,
inputs:
cent_function: function names
- see available funtions in .utils (if using a different one make sure to include it at top of this file as well)
+ see available functions in .utils (if using a different one make sure to include it at top of this file as well)
relative to: string
can be either 'center' or 'origin' for default centroid function
asFITS: bool
@@ -434,7 +434,7 @@ def _zonal_reconstruction(self, centroids_x, centroids_y, subap_diameter):
http://ebooks.spiedigitallibrary.org/book.aspx?doi=10.1117/3.769212.
Modified to work with rectangular spotfields
Modified from Greg Allan's master's thesis (Simulation and Testing of Wavefront Reconstruction Algorithms
- for the Deformable Mirror (DeMi) Cubesat. Master's Thesis, Massachusetts Institute of Techonology, 2018)
+ for the Deformable Mirror (DeMi) Cubesat. Master's Thesis, Massachusetts Institute of Technology, 2018)
inputs:
centroids_x: np array
diff --git a/poppy/tests/test_core.py b/poppy/tests/test_core.py
index 9e0d02d3..f1ad0647 100644
--- a/poppy/tests/test_core.py
+++ b/poppy/tests/test_core.py
@@ -18,7 +18,7 @@
import matplotlib.pyplot as plt
-####### Test Common Infrastructre #######
+####### Test Common Infrastructure #######
def check_wavefront(filename_or_hdulist, slice=0, ext=0, test='nearzero', comment=""):
""" A helper routine to verify certain properties of a wavefront FITS file,
@@ -54,7 +54,7 @@ def test_basic_functionality():
osys.add_detector(pixelscale=0.1, fov_arcsec=5.0) # use a large FOV so we grab essentially all the light and conserve flux
psf = osys.calc_psf(wavelength=1.0e-6)
- # we need to be a little careful here due to floating point math comparision equality issues... Can't just do a strict equality
+ # we need to be a little careful here due to floating point math comparison equality issues... Can't just do a strict equality
assert abs(psf[0].data.max() - 0.201) < 0.001
# test the (fairly trivial) description function.
@@ -194,7 +194,7 @@ def test_normalization():
from .. import conf
conf.enable_flux_tests = True
- # we need to be a little careful here due to floating point math comparision equality issues... Can't just do a strict equality
+ # we need to be a little careful here due to floating point math comparison equality issues... Can't just do a strict equality
# this should be very very close to one
psf_last = osys.calc_psf(wavelength=1.0e-6, normalize='last')
@@ -746,7 +746,7 @@ def test_CompoundOpticalSystem():
# Tests for the inwave argument
-def test_inwave_fraunhoffer(plot=False):
+def test_inwave_fraunhofer(plot=False):
'''Verify basic functionality of the inwave kwarg for a basic OpticalSystem()'''
npix=128
oversample=2
diff --git a/poppy/tests/test_fft.py b/poppy/tests/test_fft.py
index c87ab50e..c766716d 100644
--- a/poppy/tests/test_fft.py
+++ b/poppy/tests/test_fft.py
@@ -39,7 +39,7 @@ def test_fft_normalization():
osys.add_pupil(pupil)
osys.add_image() # null plane to force FFT
osys.add_pupil() # null plane to force FFT
- osys.add_detector(pixelscale=0.01, fov_arcsec=10.0) # use a large FOV so we grab essentially all the ligh
+ osys.add_detector(pixelscale=0.01, fov_arcsec=10.0) # use a large FOV so we grab essentially all the light
poppy_core._log.info('TEST: wavelen = {0}, radius = {1}'.format(wavelen, radius))
diff --git a/poppy/tests/test_fresnel.py b/poppy/tests/test_fresnel.py
index 8526efd3..5d2e9481 100644
--- a/poppy/tests/test_fresnel.py
+++ b/poppy/tests/test_fresnel.py
@@ -771,7 +771,7 @@ def test_CompoundOpticalSystem_hybrid(npix=128):
# First part is Fraunhofer then second is Fresnel
osys1 = poppy.OpticalSystem(npix=128, oversample=4, name="FIRST PART, FRAUNHOFER")
# Note for strict consistency we need to apply a half pixel shift to optics in the Fraunhofer part;
- # this accomodates the differences between different types of image centering.
+ # this accommodates the differences between different types of image centering.
pixscl = osys.input_wavefront().pixelscale
halfpixshift = (pixscl*0.5*u.pixel).to(u.m).value
opt1shifted = poppy.SquareAperture(shift_x = halfpixshift, shift_y = halfpixshift)
diff --git a/poppy/tests/test_fwcentroid.py b/poppy/tests/test_fwcentroid.py
index 326cd6df..165d5aee 100644
--- a/poppy/tests/test_fwcentroid.py
+++ b/poppy/tests/test_fwcentroid.py
@@ -5,7 +5,7 @@
from .test_errorhandling import _exception_message_starts_with
-# fwcentroid is a standalong package that's just included as a copy in
+# fwcentroid is a standalone package that's just included as a copy in
# poppy. It has its own test function
def test_fwcentroid_square(n=20,):
diff --git a/poppy/tests/test_geometry.py b/poppy/tests/test_geometry.py
index b936e68c..37cad3b8 100644
--- a/poppy/tests/test_geometry.py
+++ b/poppy/tests/test_geometry.py
@@ -27,7 +27,7 @@ def test_clipping():
assert res.max() <= 1.0
-# Come up with some representative plausible test cases for whcih we know the answers
+# Come up with some representative plausible test cases for which we know the answers
# Test effect of shifting the center of the image by integer pixels
@@ -35,7 +35,7 @@ def test_clipping():
# Test effect of shifting the center of the image by fractional pixels
# cross correlation of shifted & unshifted to demonstrate 1/2 pixel shifts?
-# Test using subpixel scaling of incput X and Y arrays
+# Test using subpixel scaling of input X and Y arrays
# Test the specific case at fault here.
diff --git a/poppy/tests/test_matrixDFT.py b/poppy/tests/test_matrixDFT.py
index 0771e40d..6947489d 100644
--- a/poppy/tests/test_matrixDFT.py
+++ b/poppy/tests/test_matrixDFT.py
@@ -36,7 +36,7 @@ def complexinfo(a, str=None):
def euclid2(s, c=None):
""" Compute Euclidean distance between points across an 2d ndarray
- Paramters
+ Parameters
----------
s : tuple
shape of array
@@ -82,7 +82,7 @@ def test_MFT_flux_conservation(centering='FFTSTYLE', outdir=None, outname='test_
Directory path to output diagnostic FITS files. If not specified, files will not be written.
precision : float, either 0.01 or 0.001
How precisely to expect flux conservation; it will not be strictly 1.0 given any finite array size.
- This function usesd predetermined MFT array sizes based on the desired precision level of the test.
+ This function uses predetermined MFT array sizes based on the desired precision level of the test.
"""
# Set up constants for either a more precise test or a less precise but much
@@ -144,7 +144,7 @@ def test_MFT_fluxconsv_all_types(centering=None, **kwargs):
-def test_DFT_rect(centering='FFTSTYLE', outdir=None, outname='DFT1R_', npix=None, sampling=10., nlamd=None, display=False):
+def test_DFT_rect(centering='FFTSTYLE', outdir=None, outname='DFT1R_', npix=None, sampling=10., nlambda=None, display=False):
"""
Test matrix DFT, including non-square arrays, in both the
forward and inverse directions.
@@ -167,14 +167,14 @@ def test_DFT_rect(centering='FFTSTYLE', outdir=None, outname='DFT1R_', npix=None
# make things rectangular:
- if nlamd is None and npix is None:
- nlamd = (10,20)
- npix = [val*sampling for val in nlamd] #(100, 200)
+ if nlambda is None and npix is None:
+ nlambda = (10,20)
+ npix = [val*sampling for val in nlambda] #(100, 200)
elif npix is None:
- npix = [val*sampling for val in nlamd] #(100, 200)
- elif nlamd is None:
- nlamd = [val/sampling for val in npix]
- u = nlamd
+ npix = [val*sampling for val in nlambda] #(100, 200)
+ elif nlambda is None:
+ nlambda = [val/sampling for val in npix]
+ u = nlambda
_log.info("Requested sampling in pixels: "+str(npix))
_log.info("Requested sampling in lam/D units: "+str(u))
#(u, float(u)/npix[0]*npix[1])
@@ -207,8 +207,8 @@ def test_DFT_rect(centering='FFTSTYLE', outdir=None, outname='DFT1R_', npix=None
if outdir is not None:
fits.PrimaryHDU(pupil.astype(np.float32)).writeto(outdir+os.sep+outname+"pupil.fits", overwrite=True)
- _log.info('performing MFT with pupil shape: '+ str(pupil.shape)+ ' nlamd: '+ str( nlamd)+ ' npix: '+ str(npix))
- a = mft1.perform(pupil, nlamd, npix)
+ _log.info('performing MFT with pupil shape: '+ str(pupil.shape)+ ' nlambda: '+ str( nlambda)+ ' npix: '+ str(npix))
+ a = mft1.perform(pupil, nlambda, npix)
_log.info('Shape of MFT result: '+str(a.shape))
@@ -645,7 +645,7 @@ def test_MFT_FFT_equivalence_in_OpticalSystem(tmpdir, display=False, source_offs
Wavefront class's _propagateTo() machinery, which is not
tested in the above function. Hence the two closely related tests.
- This test now includes a source offset, to test equivalnce of handling for
+ This test now includes a source offset, to test equivalence of handling for
nonzero WFE, in this case for tilts.
"""
diff --git a/poppy/tests/test_misc.py b/poppy/tests/test_misc.py
index d4a14c6b..8e5121f8 100644
--- a/poppy/tests/test_misc.py
+++ b/poppy/tests/test_misc.py
@@ -90,7 +90,7 @@ def test_sinc2_2d(display=False):
assert fn2d.shape == (511, 511)
assert fn2d[255,255] == 1.0
- # and the horizontal axis should be 2x as spaced out as the vertcal, given the rectangular aperture above.
+ # and the horizontal axis should be 2x as spaced out as the vertical, given the rectangular aperture above.
assert cut_v[20] == cut_h[10]
assert cut_v[200] == cut_h[100]
diff --git a/poppy/tests/test_multiprocessing.py b/poppy/tests/test_multiprocessing.py
index c17ded49..60bc2b2e 100644
--- a/poppy/tests/test_multiprocessing.py
+++ b/poppy/tests/test_multiprocessing.py
@@ -10,7 +10,6 @@
import astropy.io.fits as fits
import sys
from distutils.version import LooseVersion
-from astropy.tests.helper import remote_data
try:
import pytest
@@ -21,7 +20,7 @@
if _HAVE_PYTEST:
- #@pytest.mark.xfail
+ @pytest.mark.xfail
# Just skip this test entirely for right now because sometimes it hangs the
# entire Python process...
diff --git a/poppy/tests/test_optics.py b/poppy/tests/test_optics.py
index b8d3d79f..8f011889 100644
--- a/poppy/tests/test_optics.py
+++ b/poppy/tests/test_optics.py
@@ -271,8 +271,8 @@ def test_rotations():
# Some simple tests of the rotation code on AnalyticOpticalElements. Incomplete!
# rotating a square by +45 and -45 should give the same result
- ar1 = optics.SquareAperture(rotation=45, size=np.sqrt(2)).sample(npix=256, grid_size=2)
- ar2 = optics.SquareAperture(rotation=-45, size=np.sqrt(2)).sample(npix=256, grid_size=2)
+ ar1 = optics.SquareAperture(rotation=45, size=np.sqrt(2)).sample(npix=255, grid_size=2)
+ ar2 = optics.SquareAperture(rotation=-45, size=np.sqrt(2)).sample(npix=255, grid_size=2)
assert np.allclose(ar1,ar2)
# rotating a rectangle with flipped side lengths by 90 degrees should give the same result
@@ -291,7 +291,7 @@ def test_rotations():
#
# # First let's do a rotation of the wavefront itself by 90^0 after an optic
#
-# # now try a 90^0 rotation for the field stop at that optic. Assuming perfect system w/ no aberrations when comparing rsults. ?
+# # now try a 90^0 rotation for the field stop at that optic. Assuming perfect system w/ no aberrations when comparing results. ?
# fs = poppy_core.RectangularFieldStop(width=1, height=10, ang;le=90)
# wave = poppy_core.Wavefront(npix=100, pixelscale=0.1, wavelength=1e-6) # 10x10 arcsec square
#
@@ -365,7 +365,7 @@ def test_MultiHexagonAperture(display=False):
def test_NgonAperture(display=False):
""" Test n-gon aperture
- Note we could better test this if we impemented symmetry checks using the rotation argument?
+ Note we could better test this if we implemented symmetry checks using the rotation argument?
"""
# should make n-gon PSF for n=4, 6 and compare to square and hex apertures
optic= optics.NgonAperture(nsides=4, radius=1, rotation=45)
diff --git a/poppy/tests/test_plotting.py b/poppy/tests/test_plotting.py
index 3f34ecde..3b39e8da 100644
--- a/poppy/tests/test_plotting.py
+++ b/poppy/tests/test_plotting.py
@@ -36,7 +36,7 @@
#
# utils.display_psf(psf)
#
-# # we need to be a little careful here due to floating point math comparision equality issues...
+# # we need to be a little careful here due to floating point math comparison equality issues...
# # Can't just do a strict equality
# assert abs(psf[0].data.max() - 0.201) < 0.001
#
diff --git a/poppy/tests/test_sign_conventions.py b/poppy/tests/test_sign_conventions.py
index de83446d..56490fd2 100644
--- a/poppy/tests/test_sign_conventions.py
+++ b/poppy/tests/test_sign_conventions.py
@@ -94,7 +94,7 @@ def test_wavefront_tilt_sign_and_direction_fresnel(plot=False, npix=128):
n = wave.shape[0]
nominal_cen = n // 2 # In Fresnel mode, PSFs are centered on a pixel by default
- # (different from in Frauhofer mode by half a pixel)
+ # (different from in Fraunhofer mode by half a pixel)
cen = poppy.measure_centroid(wave.as_fits())
assert np.allclose(cen[0], nominal_cen), "Tilt in X should not displace the PSF in Y"
diff --git a/poppy/tests/test_special_prop.py b/poppy/tests/test_special_prop.py
index 78edba7f..106d64e5 100644
--- a/poppy/tests/test_special_prop.py
+++ b/poppy/tests/test_special_prop.py
@@ -27,7 +27,7 @@ def test_SAMC(fft_oversample=4, samc_oversample=8, npix=512,
Oversampling factor for resolution & precision
extra_test_plane : bool
Should we add an extra plane in the beginning? This allows easy testing of
- muliple cases in the updated flexible-about-number-of-planes SAMC implementation.
+ multiple cases in the updated flexible-about-number-of-planes SAMC implementation.
"""
lyot_radius = 6.5/2.5
diff --git a/poppy/tests/test_sub_sampled_optics.py b/poppy/tests/test_sub_sampled_optics.py
index b01fc5c1..c274ca83 100644
--- a/poppy/tests/test_sub_sampled_optics.py
+++ b/poppy/tests/test_sub_sampled_optics.py
@@ -24,7 +24,7 @@ def test_ShackHartmannWFS(n_lenslets=2):
"""
wavelength = 635*u.nm
- # define nominal shack harttmann wavefront sensor:
+ # define nominal shack hartmann wavefront sensor:
shwfs = sub_sampled_optics.ShackHartmannWavefrontSensor(n_lenslets=n_lenslets)
dm_size = shwfs.lenslet_pitch*24
diff --git a/poppy/tests/test_utils.py b/poppy/tests/test_utils.py
index 0a2bb595..22b46ddf 100644
--- a/poppy/tests/test_utils.py
+++ b/poppy/tests/test_utils.py
@@ -222,7 +222,7 @@ def test_measure_FWHM(display=False, verbose=False):
# We test both well sampled and barely sampled cases.
# In this test case the FWHM is 0.206265 arcsec, so pixel scale up to 0.2 arcsec.
pixscales = [0.01, 0.1, 0.2]
- # We allow slightly worse accurance for less well sampled data
+ # We allow slightly worse occurrence for less well sampled data
tolerances= [0.01, 0.015, 0.04]
for pixscale, tolerance in zip(pixscales, tolerances):
diff --git a/poppy/tests/test_wavefront.py b/poppy/tests/test_wavefront.py
index 62bbf4db..c6338f93 100644
--- a/poppy/tests/test_wavefront.py
+++ b/poppy/tests/test_wavefront.py
@@ -56,7 +56,7 @@ def test_wavefront_copy():
def test_wavefront_rotation():
- # test rotation doesn't do anything in imul, but instead does stuff in propatage
+ # test rotation doesn't do anything in imul, but instead does stuff in propagate
wave = poppy_core.Wavefront(npix=100, wavelength=1e-6)
rot = poppy_core.Rotation(10)
wave0 = wave
diff --git a/poppy/tests/test_wfe.py b/poppy/tests/test_wfe.py
index d3103b94..0775193b 100644
--- a/poppy/tests/test_wfe.py
+++ b/poppy/tests/test_wfe.py
@@ -189,7 +189,7 @@ def radial_profile(image, center=None):
assert (0.1 <= index <= 10), "index is outside of the range supported by this unit test"
import astropy.modeling
- # guess a power law model; but don't have the starting guess be the right anwser
+ # guess a power law model; but don't have the starting guess be the right answer
plaw_guess = astropy.modeling.models.PowerLaw1D(alpha=index*1.5,
bounds={'alpha': (0.1, 10)}) # avoid floating point overflow warnings on test
diff --git a/poppy/tests/test_zernike.py b/poppy/tests/test_zernike.py
index f60068dd..2a436da9 100644
--- a/poppy/tests/test_zernike.py
+++ b/poppy/tests/test_zernike.py
@@ -90,7 +90,7 @@ def test_cross_zernikes():
that Zernike times N other ones.
Note that the Zernikes are only strictly orthonormal over a
- fully circular aperture evauated analytically. For any discrete
+ fully circular aperture evaluated analytically. For any discrete
aperture the orthonormality is only approximate.
"""
for testj in (2, 3, 4, 5, 6):
@@ -137,7 +137,7 @@ def test_cross_hexikes():
that Hexike times N other ones.
Note that the Hexike are only strictly orthonormal over a
- fully hexagonal aperture evauated analytically. For any discrete
+ fully hexagonal aperture evaluated analytically. For any discrete
aperture the orthonormality is only approximate.
"""
for testj in (2, 3, 4, 5, 6):
@@ -198,7 +198,7 @@ def test_cross_arbitrary_basis():
each function times N other ones.
Note that the Hexike are only strictly orthonormal over a
- fully hexagonal aperture evauated analytically. For any discrete
+ fully hexagonal aperture evaluated analytically. For any discrete
aperture the orthonormality is only approximate.
"""
for testj in (2, 3, 4, 5, 6):
diff --git a/poppy/utils.py b/poppy/utils.py
index a7d32a33..5f3589f1 100644
--- a/poppy/utils.py
+++ b/poppy/utils.py
@@ -72,7 +72,7 @@ def imshow_with_mouseover(image, ax=None, *args, **kwargs):
def report_pixel(x, y):
# map data coords back to pixel coords
- # and be sure to clip appropriatedly to avoid array bounds errors
+ # and be sure to clip appropriately to avoid array bounds errors
img_y = np.floor((y - imext[2]) / (imext[3] - imext[2]) * imsize[0])
img_y = int(img_y.clip(0, imsize[0] - 1))
@@ -1340,7 +1340,7 @@ def __init__(self, func=None, **kwargs):
self.decorator_kwargs = kwargs
def __call__(self, wrapped_function):
- from astropy.utils.decorators import wraps
+ from functools import wraps
from astropy.units import UnitsError, add_enabled_equivalencies, Quantity
import inspect
@@ -1633,7 +1633,7 @@ def sort_sptype(typestr):
raise LookupError(errmsg)
-# Back compatibility allias
+# Back compatibility alias
specFromSpectralType = spectrum_from_spectral_type
@@ -1683,7 +1683,7 @@ def estimate_optimal_nprocesses(osys, nwavelengths=None, padding_factor=None, me
wavefrontsize))
# The following is a very rough estimate
# empirical tests show that an 8192x8192 propagation results in Python sessions with ~4 GB memory used w/ FFTW
- # usingg mumpy FT, the memory usage per process can exceed 5 GB for an 8192x8192 propagation.
+ # using numpy FT, the memory usage per process can exceed 5 GB for an 8192x8192 propagation.
padding_factor = 4 if conf.use_fftw else 5
else:
# oversampling not relevant for memory size in MFT mode
diff --git a/poppy/wfe.py b/poppy/wfe.py
index aeac30d3..53b3455e 100644
--- a/poppy/wfe.py
+++ b/poppy/wfe.py
@@ -360,7 +360,7 @@ def get_opd(self, wave):
class PowerSpectrumWFE(WavefrontError):
r"""
- WFE model specificed via a Power Spectral Density (PSD),
+ WFE model specified via a Power Spectral Density (PSD),
or a list of multiple PSDs, which follow von Karman PSD model:
:math:`P(k) = \frac{\beta} {\left( \left(\frac{1}{L_{0}}\right)^{2} + |k|^{2} \right)^{{\alpha/2}}} e^{-(|k|l_{0})^{2}} + \beta_{sr}`
@@ -416,7 +416,7 @@ class PowerSpectrumWFE(WavefrontError):
surf_roughness: astropy quantity
Surface roughness normalization. Should match units of PSD.
psd_weight: iterable list of floats
- Specifies the weight muliplier to set onto each model PSD
+ Specifies the weight multiplier to set onto each model PSD
seed : integer
Seed for the random phase screen generator
apply_reflection: boolean
diff --git a/poppy/zernike.py b/poppy/zernike.py
index 58ee77e2..767b3e4b 100644
--- a/poppy/zernike.py
+++ b/poppy/zernike.py
@@ -297,7 +297,7 @@ def cached_zernike1(j, shape, pixelscale, pupil_radius, outside=np.nan, noll_nor
"""Compute Zernike based on Noll index *j*, using an LRU cache
for efficiency. Refer to the `zernike1` docstring for details.
- Note: all arguents should be plain ints, tuples, floats etc rather than
+ Note: all arguments should be plain ints, tuples, floats etc rather than
Astropy Quantities.
"""
y, x = Wavefront.pupil_coordinates(shape, pixelscale)
@@ -835,7 +835,7 @@ def __init__(self, rings=2, flattoflat=1*u.m, gap=1*u.cm, center=False,
the MultiHexagonAperture class. Set that when creating
an instance of this class, then you can call the resulting function object
to generate a basis set with the desired sampling, or pass it to
- the compse_opd_from_basis or decompse_opd_segments functions.
+ the compose_opd_from_basis or decompose_opd_segments functions.
The basis is generated over a square array that exactly circumscribes
the hexagonal aperture.
diff --git a/requirements.txt b/requirements.txt
index f23c1581..ebd1a58e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
astropy==5.0
-matplotlib==3.5.0
-numpy==1.21.4
+matplotlib==3.5.1
+numpy==1.22.1
scipy==1.7.3
diff --git a/setup.cfg b/setup.cfg
index 343f26db..205087a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,7 +1,7 @@
[metadata]
name = poppy
description = Physical optics propagation (wavefront diffraction) for optical simulations, particularly of telescopes.
-long_description = (this placeholder string will be replaced automatically with poppy's top-level docstring.)
+long_description = "POPPY (**P**\ hysical **O**\ ptics **P**\ ropagation in **Py**\ thon) 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."
author = Marshall Perrin
author_email = mperrin@stsci.edu
license = BSD