Skip to content

Commit

Permalink
Merge commit '85a479fad8d960fe0fca4b7b7dc427b20b1cc898' into release_…
Browse files Browse the repository at this point in the history
…prep
  • Loading branch information
BradleySappington committed May 11, 2023
2 parents ffdee95 + 85a479f commit 6f9b2ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ The spatial or angular scale of these arrays must also be indicated by a FITS
header keyword. By default, poppy checks for the keyword `PIXSCALE` for image
plane pixel scale in arcseconds/pixel or `PUPLSCAL` for pupil plane scale in
meters/pixel. However if your FITS file uses some alternate keyword, you can specify that
keyword name with the `pupilscale=` argument in the call to the `~poppy.FITSOpticalElement` constructor, i.e.::
keyword name with the `pixelscale=` argument in the call to the `~poppy.FITSOpticalElement` constructor, i.e.::

myoptic = poppy.FITSOpticalElement(transmission='transfile.fits', opd='opdfile.fits', pupilscale="PIXELSCL")
myoptic = poppy.FITSOpticalElement(transmission='transfile.fits', opd='opdfile.fits', pixelscale="PIXELSCL")


Lastly if there is no such keyword available, you can specify the numerical scale directly via the same keyword by providing a float instead of a string::

myoptic = poppy.FITSOpticalElement(transmission='transfile.fits', opd='opdfile.fits', pupilscale=0.020)
myoptic = poppy.FITSOpticalElement(transmission='transfile.fits', opd='opdfile.fits', pixelscale=0.020)


Creating a custom instrument
Expand Down
1 change: 1 addition & 0 deletions docs/fresnel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The Fresnel propagation API necessarily differs in several ways from the origina
First, when we define a Fresnel wavefront, the first argument specifies the desired diameter of the wavefront, and must be given as an `astropy.Quantity <http://docs.astropy.org/en/stable/units/>`_ of dimension length::

import astropy.units as u
npix = 256
wf_fresnel = poppy.FresnelWavefront(0.5*u.m,wavelength=2200e-9,npix=npix,oversample=4)
# versus:
wf_fraunhofer = poppy.Wavefront(diam=0.5, wavelength=2200e-9,npix=npix,oversample=4)
Expand Down
3 changes: 3 additions & 0 deletions poppy/tests/test_fresnel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
from pkg_resources import parse_version as version

from .. import poppy_core
from .. import optics
Expand Down Expand Up @@ -193,11 +194,13 @@ def test_Circular_Aperture_PTP_long(display=False, npix=512, display_proper=Fals

try:
from skimage.registration import phase_cross_correlation
import skimage
HAS_SKIMAGE = True
except ImportError:
HAS_SKIMAGE = False

@pytest.mark.skipif(not HAS_SKIMAGE, reason='This test requires having scikit-image installed.')
@pytest.mark.skipif(HAS_SKIMAGE and (version(skimage.__version__) >= version('0.19')), reason='This test is known to fail for skimage > 0.19; see #552.')
def test_Circular_Aperture_PTP_short(display=False, npix=512, oversample=4, include_wfe=True, display_proper=False):
""" Tests plane-to-plane propagation at short distances, by comparison
of the results from propagate_ptp and propagate_direct calculations
Expand Down

0 comments on commit 6f9b2ba

Please sign in to comment.