OpticalSystem¶
-
class
poppy.poppy_core.
OpticalSystem
(name='unnamed system', verbose=True, oversample=2, npix=None, pupil_diameter=None)[source]¶ Bases:
poppy.poppy_core.BaseOpticalSystem
A class representing a series of optical elements, either Pupil, Image, or Detector planes, through which light can be propagated.
The difference between Image and Detector planes is that Detectors have fixed pixels in terms of arcsec/pixel regardless of wavelength (computed via MFT) while Image planes have variable pixels scaled in terms of lambda/D. Pupil planes are some fixed size in meters, of course.
- namestring
descriptive name of optical system
- oversampleint
Either how many times above Nyquist we should be (for pupil or image planes), or how many times a fixed detector pixel will be sampled. E.g.
oversample=2
means image plane sampling lambda/4*D (twice Nyquist) and detector plane sampling 2x2 computed pixels per real detector pixel. Default is 2.- verbosebool
whether to be more verbose with log output while computing
- pupil_diameterastropy.Quantity of dimension length
Diameter of entrance pupil. Defaults to size of first optical element if unspecified, or else 1 meter.
Methods Summary
OpticalSystem.addDetector
OpticalSystem.addImage
OpticalSystem.addPupil
OpticalSystem.addRotation
OpticalSystem.calcPSF
describe
()Print out a string table describing all planes in an optical system
display
(**kwargs)Display all elements in an optical system on screen.
OpticalSystem.inputWavefront
propagate_mono
([wavelength, normalize, …])Propagate a monochromatic wavefront through the optical system.
Methods Documentation
-
display
(**kwargs)¶ Display all elements in an optical system on screen.
Any extra arguments are passed to the
optic.display()
methods of each element.
-
propagate_mono
(wavelength=<Quantity 1.e-06 m>, normalize='first', retain_intermediates=False, retain_final=False, display_intermediates=False)¶ Propagate a monochromatic wavefront through the optical system. Called from within
calc_psf
. Returns a tuple with afits.HDUList
object and a list of intermediateWavefront`s (empty if `retain_intermediates=False
).- wavelengthfloat
Wavelength in meters
- normalizestring, {‘first’, ‘last’}
how to normalize the wavefront? * ‘first’ = set total flux = 1 after the first optic, presumably a pupil * ‘last’ = set total flux = 1 after the entire optical system. * ‘exit_pupil’ = set total flux = 1 at the last pupil of the optical system. * ‘first=2’ = set total flux = 2 after the first optic (used for debugging only)
- display_intermediatesbool
Should intermediate steps in the calculation be displayed on screen? Default: False.
- retain_intermediatesbool
Should intermediate steps in the calculation be retained? Default: False. If True, the second return value of the method will be a list of
poppy.Wavefront
objects representing intermediate optical planes from the calculation.- retain_finalbool
Should the final complex wavefront be retained? Default: False. If True, the second return value of the method will be a single element list (for consistency with retain intermediates) containing a
poppy.Wavefront
object representing the final optical plane from the calculation. Overridden by retain_intermediates.
- final_wffits.HDUList
The final result of the monochromatic propagation as a FITS HDUList
- intermediate_wfslist
A list of
poppy.Wavefront
objects representing the wavefront at intermediate optical planes. The 0th item is “before first optical plane”, 1st is “after first plane and before second plane”, and so on. (n.b. This will be empty ifretain_intermediates
is False and singular if retain_final is True.)