Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename 'wedge' segment shame to 'keystone' #647

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions poppy/dms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import numexpr as ne

__all__ = ['ContinuousDeformableMirror', 'HexSegmentedDeformableMirror', 'CircularSegmentedDeformableMirror',
'WedgeSegmentedDeformableMirror']
'KeystoneSegmentedDeformableMirror']


# noinspection PyUnresolvedReferences
Expand Down Expand Up @@ -851,7 +851,7 @@ def __init__(self, rings=1, segment_radius=1.0 * u.m, gap=0.01 * u.m,


# note, must inherit first from SegmentedDeformableMirror to get correct method resolution order
class WedgeSegmentedDeformableMirror(SegmentedDeformableMirror, optics.WedgeSegmentedCircularAperture):
class KeystoneSegmentedDeformableMirror(SegmentedDeformableMirror, optics.KeystoneSegmentedCircularAperture):
""" Circularly segmented DM. Each actuator is controllable in piston, tip, and tilt (and any zernike term)

Parameters
Expand All @@ -873,9 +873,9 @@ class WedgeSegmentedDeformableMirror(SegmentedDeformableMirror, optics.WedgeSegm
def __init__(self, name='WedgeSegDM', radius=1.0 * u.m, rings=1, nsections=4, gap_radii=None, gap=0.01 * u.m,
include_factor_of_two=False, **kwargs):
#FIXME ? using grey pixel does not work. something in the geometry module generate a true divide error
optics.WedgeSegmentedCircularAperture.__init__(self, name=name, radius=radius, rings=rings,
nsections=nsections, gap_radii=gap_radii,
gap=gap, **kwargs)
optics.KeystoneSegmentedCircularAperture.__init__(self, name=name, radius=radius, rings=rings,
nsections=nsections, gap_radii=gap_radii,
gap=gap, **kwargs)
SegmentedDeformableMirror.__init__(self, rings=rings, include_factor_of_two=include_factor_of_two)


Expand All @@ -884,4 +884,4 @@ def _setup_arrays(self, npix, pixelscale, wave=None):
# edges of segments. This approach results in the DM segment maps covering the segment gaps better, to
# accomodate 'gray' pixels in the transmission map
super()._setup_arrays(npix, pixelscale, wave=wave)
self._transmission = optics.WedgeSegmentedCircularAperture.get_transmission(self, wave)
self._transmission = optics.KeystoneSegmentedCircularAperture.get_transmission(self, wave)
5 changes: 3 additions & 2 deletions poppy/optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
'BandLimitedCoron', 'BandLimitedCoronagraph', 'IdealFQPM', 'CircularPhaseMask', 'RectangularFieldStop', 'SquareFieldStop',
'AnnularFieldStop', 'HexagonFieldStop',
'CircularOcculter', 'BarOcculter', 'FQPM_FFT_aligner', 'CircularAperture',
'HexagonAperture', 'MultiHexagonAperture', 'NgonAperture', 'MultiCircularAperture', 'WedgeSegmentedCircularAperture', 'RectangleAperture',
'HexagonAperture', 'MultiHexagonAperture', 'NgonAperture', 'MultiCircularAperture',
'KeystoneSegmentedCircularAperture', 'RectangleAperture',
'SquareAperture', 'SecondaryObscuration', 'LetterFAperture', 'AsymmetricSecondaryObscuration',
'ThinLens', 'GaussianAperture', 'KnifeEdge', 'TiltOpticalPathDifference', 'CompoundAnalyticOptic', 'fixed_sampling_optic']

Expand Down Expand Up @@ -1588,7 +1589,7 @@ def _one_aperture(self, wave, index, value=1):
return self.transmission


class WedgeSegmentedCircularAperture(MultiSegmentAperture, CircularAperture):
class KeystoneSegmentedCircularAperture(MultiSegmentAperture, CircularAperture):
@utils.quantity_input(radius=u.meter, gap=u.meter)
def __init__(self, name=None, radius=1.0 * u.meter,
rings=2, nsections=4, gap_radii=None, gap=0.01 * u.meter,
Expand Down
2 changes: 1 addition & 1 deletion poppy/tests/test_dms.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_basic_wedge_dm():
""" A simple test for the circularly segmented deformable mirror code -
can we move actuators, and does adding nonzero WFE result in decreased Strehl?"""

dm = dms.WedgeSegmentedDeformableMirror(rings=2, nsections=[1,6])
dm = dms.KeystoneSegmentedDeformableMirror(rings=2, nsections=[1, 6])

osys = poppy_core.OpticalSystem(npix=256)
osys.add_pupil(dm)
Expand Down
4 changes: 2 additions & 2 deletions poppy/tests/test_optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ def test_NgonAperture(display=False):


def test_WedgeSegmentedCircularAperture(plot=False):
""" test WedgeSegmentedCircularAperture """
""" test KeystoneSegmentedCircularAperture """

ap_circ = optics.CircularAperture()
ap_wedge = optics.WedgeSegmentedCircularAperture(rings=3, nsections=[1, 6, 8])
ap_wedge = optics.KeystoneSegmentedCircularAperture(rings=3, nsections=[1, 6, 8])
wave1 = poppy_core.Wavefront(npix=256, diam=2, wavelength=1e-6) # 10x10 meter square
wave2 = poppy_core.Wavefront(npix=256, diam=2, wavelength=1e-6) # 10x10 meter square

Expand Down
Loading