The key classes for POPPY are OpticalSystem and the various OpticalElement classes (of which there are many). There is also a Wavefront class that is used internally, but users will rarely need to instantiate that directly. Results are returned as FITS files, specifically astropy.io.fits.HDUList objects.
OpticalSystem is in essence a container for OpticalElement instances, which handles creating input wavefronts, propagating them through the individual optics, and then combining the results into a broadband output point spread function.
The Instrument class provides a framework for developing high-level models of astronomical instruments. An OpticalSystem does not include any information about spectral bandpasses, filters, or light source properties, it just propagates whatever specified list of wavelengths and weights it’s provided with. The Instrument class provides the machinery for handling filters and sources to generate weighted source spectra, as well as support for configurable instruments with selectable mechanisms, and system-level impacts on PSFs such as pointing jitter.
Note that the Instrument class should not be used directly but rather is subclassed to implement the details of your particular instrument. See its class documentation for more details.
OpticalElement is the fundamental building block
FITSOpticalElement implements optics defined numerically on discrete grids read in from FITS files
AnalyticOpticalElement implements optics defined analytically on any arbitrary sampling. There are many of these.
Pupil plane analytic optics include:
InverseTransmission allows any optic, whether analytic or discrete, to be flipped in sign, a la the Babinet principle.
Rotation represents a rotation of the axes of the wavefront, for instance to change coordinate systems between two optics that are rotated with respect to one another. The axis of rotation must be the axis of optical propagation.
Detector represents a detector with some fixed sampling and pixel scale.
Physical Optics Propagation in PYthon (POPPY)
This package implements an object-oriented system for modeling physical optics propagation with diffraction, particularly for telescopic and coronagraphic imaging.
POPPY makes use of python’s logging facility for log messages, using the logger name “poppy”.
|display_EE([HDUlist_or_filename, ext, ...])||Display Encircled Energy curve for a PSF The azimuthally averaged encircled energy is plotted as a function of radius.|
|display_PSF([HDUlist_or_filename, ext, ...])||Display nicely a PSF from a given HDUlist or filename This is extensively configurable.|
|display_PSF_difference([...])||Display nicely the difference of two PSFs from given files The two files may be FITS files on disk or FITS HDUList objects in memory.|
|display_profiles([HDUlist_or_filename, ext, ...])||Produce two plots of PSF radial profile and encircled energy See also the display_EE function.|
|measure_EE([HDUlist_or_filename, ext, ...])||measure encircled energy vs radius and return as an interpolator|
|measure_centroid([HDUlist_or_filename, ext, ...])||Measure the center of an image via center-of-mass The centroid method used is the floating-box center of mass algorithm by Jeff Valenti et al., which has been adopted for JWST target acquisition measurements on orbit.|
|measure_fwhm([HDUlist_or_filename, ext, ...])||Measure FWHM by interpolation of the radial profile This measures the full width at half maximum for the supplied PSF, or optionally the full width at some other fraction of max.|
|measure_radial([HDUlist_or_filename, ext, ...])||measure azimuthally averaged radial profile of a PSF.|
|measure_sharpness([HDUlist_or_filename, ext])||Compute image sharpness, the sum of pixel squares.|
|measure_strehl([HDUlist_or_filename, ext, ...])||Estimate the Strehl ratio for a PSF.|
|radial_profile([HDUlist_or_filename, ext, ...])||Compute a radial profile of the image.|
|rebin_array([a, rc, verbose])||Rebin array by an integer factor while conserving flux Perform simple-minded flux-conserving binning...|
|save_config()||Save package configuration variables using the Astropy.config system|
|specFromSpectralType(sptype[, return_list, ...])||Get Pysynphot Spectrum object from a user-friendly spectral type string.|
|AnalyticOpticalElement(**kwargs)||Defines an abstract analytic optical element, i.e.|
|AsymmetricSecondaryObscuration([...])||Defines a central obscuration with one or more supports which can be oriented at arbitrary angles around the primary mirror, a la the three supports of JWST :Parameters: secondary_radius : float Radius of the circular secondary obscuration.|
|BandLimitedCoron([name, kind, sigma, wavelength])||Defines an ideal band limited coronagraph occulting mask.|
|CircularAperture([name, radius, pad_factor])||Defines an ideal circular pupil aperture :Parameters: name : string Descriptive name radius : float Radius of the pupil, in meters.|
|CompoundAnalyticOptic([opticslist, name, ...])||Define a compound analytic optical element made up of the combination of two or more individual optical elements.|
|Detector(pixelscale[, fov_pixels, ...])||A Detector is a specialized type of OpticalElement that forces a wavefront onto a specific fixed pixelization.|
|FITSOpticalElement([name, transmission, ...])||Defines an arbitrary optic, based on amplitude transmission and/or OPD FITS files.|
|FQPM_FFT_aligner([name, direction])||Helper class for modeling FQPMs accurately Adds (or removes) a slight wavelength- and pixel-scale-dependent tilt to a pupil wavefront, to ensure the correct alignment of the image plane FFT’ed PSF with the desired quad pixel alignment for the FQPM.|
|HexagonAperture([name, flattoflat, side])||Defines an ideal hexagonal pupil aperture Specify either the side length (= corner radius) or the flat-to-flat distance.|
|IdealBarOcculter([name, width, angle])||Defines an ideal bar occulter (like in MIRI’s Lyot coronagraph) :Parameters: name : string Descriptive name width : float width of the bar stop, in arcseconds.|
|IdealCircularOcculter([name, radius])||Defines an ideal circular occulter (opaque circle) :Parameters: name : string Descriptive name radius : float Radius of the occulting spot, in arcseconds.|
|IdealFQPM([name, wavelength])||Defines an ideal 4-quadrant phase mask coronagraph, with its retardance set perfectly to 0.5 waves at one specific wavelength and varying linearly on either side of that.|
|IdealFieldStop([name, size, angle])||Defines an ideal square field stop :Parameters: name : string Descriptive name size : float Size of the field stop, in arcseconds.|
|IdealRectangularFieldStop([name, width, ...])||Defines an ideal rectangular field stop :Parameters: name : string Descriptive name width, height: float : Size of the field stop, in arcseconds.|
|Instrument([name])||A generic astronomical instrument, composed of (1) an optical system implemented using POPPY, optionally with several configurations such as selectable image plane or pupil plane stops, and (2) some defined spectral bandpass(es) such as selectable filters, implemented using pysynphot.|
|InverseTransmission([optic])||Given any arbitrary OpticalElement with transmission T(x,y) return the inverse transmission 1 - T(x,y) This is a useful ingredient in the SemiAnalyticCoronagraph algorithm.|
|MultiHexagonAperture([name, flattoflat, ...])||Defines a hexagonally segmented aperture :Parameters: name : string Descriptive name rings : integer The number of rings of hexagons to include ( i.e.|
|NgonAperture([name, nsides, radius, rotation])||Defines an ideal N-gon pupil aperture.|
|OpticalElement([name, verbose, planetype, ...])||Base class for all optical elements, whether from FITS files or analytic functions.|
|OpticalSystem([name, verbose, oversample])||A class representing a series of optical elements, either Pupil, Image, or Detector planes, through which light can be propagated.|
|ParityTestAperture([name, radius, pad_factor])||Defines a circular pupil aperture with boxes cut out.|
|RectangleAperture([name, width, height, ...])||Defines an ideal rectangular pupil aperture :Parameters: name : string Descriptive name width : float width of the rectangle, in meters.|
|Rotation([angle, units])||Performs a rotation of the axes in the optical train.|
|ScalarTransmission([name, transmission])||Either a null optic (empty plane) or some perfect ND filter...|
|SecondaryObscuration([name, ...])||Defines the central obscuration of an on-axis telescope including secondary mirror and supports The number of supports is adjustible but they are always radially symmetric around the center.|
|SemiAnalyticCoronagraph(ExistingOpticalSystem)||A subclass of OpticalSystem that implements a specialized propagation algorithm for coronagraphs whose occulting mask has limited and small support in the image plane.|
|SquareAperture([name, size])||Defines an ideal square pupil aperture :Parameters: name : string Descriptive name size: float : side length of the square, in meters.|
|ThinLens([name, nwaves, reference_wavelength])||An idealized thin lens, implemented as a Zernike defocus term.|
|Wavefront([wavelength, npix, dtype, diam, ...])||A class representing a monochromatic wavefront that can be transformed between pupil and image planes (but not to intermediate planes, yet).|
Documentation last updated on April 06, 2014