Skip to content

Commit

Permalink
Deprecate Detector
Browse files Browse the repository at this point in the history
  • Loading branch information
andykee committed Jan 31, 2024
1 parent 05d19bb commit 8aa4f59
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 60 deletions.
1 change: 0 additions & 1 deletion docs/ref/planes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Plane objects
lentil.Plane
lentil.Pupil
lentil.Image
lentil.Detector

Plane transformations
---------------------
Expand Down
35 changes: 1 addition & 34 deletions docs/user/fundamentals/planes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ optical models:
detailed discussion of pupil planes is available in [1]_.
* The |Image| plane provides a location where the image formed by an
optical system may be manipulated or viewed.
* The |Detector| plane is conceptually identical to the Image plane but
is optimized to very efficiently compute intensity from a complex field.

In addition, several "utility" planes are provided. These planes do not
represent physical components of an optical system, but are used to implement
Expand Down Expand Up @@ -113,7 +111,7 @@ ptype Planes with this type
================== ======================================================
:class:`none` :class:`~lentil.Plane`
:class:`pupil` :class:`~lentil.Pupil`
:class:`image` :class:`~lentil.Image`, :class:`~lentil.Detector`
:class:`image` :class:`~lentil.Image`
:class:`tilt` :class:`~lentil.Tilt`, :class:`~lentil.DispersiveTilt`
:class:`transform` :class:`~lentil.Rotate`, :class:`~lentil.Flip`
================== ======================================================
Expand Down Expand Up @@ -184,37 +182,6 @@ parameters although any of the following can be specified:
* :attr:`~lentil.Image.opd` - Defines the optical path difference that a
wavefront experiences when propagating through the image plane.

Detector
========
Lentil's |Detector| plane is used to accumulate the intensity in an image
plane. Intensity is computed as the absolute value of the complex amplitude in
the image plane squared:

.. math::
\mathbf{I} = \left|\mathbf{W}\right|^2
Similar to the |Image| plane, a detector plane does not have any required
parameters although any of the following can be specified:

* :attr:`~lentil.Detector.pixelscale` - Defines the physical sampling of each
pixel in the image plane. If not provided, the sampling will be
automatically selected to ensure the results are at least Nyquist sampled.
* :attr:`~lentil.Detector.shape` - Defines the shape of the image plane. If
not provided, the image plane will grow as necessary to capture all data.

While an |Image| plane can be used to compute intensity, the |Detector| plane
implements an algorithm that greatly reduces the memory footprint and
increases the speed of this operation. Details of this algorithm are available
in the :ref:`technical-notes`.

.. note::

An |Image| plane is interchangeable with a |Detector| plane, but the
converse is not true. This is because the calculation of the real-valued
intensity discards the complex field information. Because of this,
|Detector| planes can only be used as the final plane in a Lentil model.

.. _user.planes.tilt:

Tilt
Expand Down
1 change: 0 additions & 1 deletion lentil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
Plane,
Pupil,
Image,
Detector,
Tilt,
DispersiveTilt,
Grism,
Expand Down
24 changes: 0 additions & 24 deletions lentil/plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,30 +678,6 @@ def multiply(self, wavefront):
return wavefront


class Detector(Image):
"""Class for representing an image plane that returns intensity.
The Detector should only be used as the last plane in a propagation. If
individual wavelength results or access to the complex field is required, an
:class:`Image` plane should be used instead.
Parameters
----------
pixelscale : float, optional
Pixel size in meters. Pixels are assumed to be square. Default is None.
shape : tuple of ints, optional
Number of pixels as (rows, cols). If a single value is provided,
:class:`Image` is assumed to be square with nrows = ncols = shape.
Default is None.
See Also
--------
Image
"""
pass


class TiltInterface(Plane):
"""Utility class for holding common lofic shared by classes that need to
implement the tilt interface.
Expand Down

0 comments on commit 8aa4f59

Please sign in to comment.