Skip to content

Commit

Permalink
Update ptype docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andykee committed Dec 8, 2023
1 parent 943d7b3 commit b2f0d16
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/user/fundamentals/planes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ optical effects:
* The :class:`~lentil.Flip` plane flips a wavefront about its x, y, or both x and y
axes.

ptypes
======
ptype
=====
A plane's type (:attr:`~lentil.Plane.ptype`) defines how it interacts with a
|Wavefront|. When a wavefront interacts with a plane, it inherits the plane's
``ptype``. Plane type is set automatically and unexpected behavior may
occur if it is changed.

Lentil supports the following ptypes:
Lentil planes support the following ptypes:

================== ======================================================
ptype Planes with this type
Expand Down
43 changes: 40 additions & 3 deletions docs/user/fundamentals/wavefront.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,27 @@

.. currentmodule:: lentil

*********************
Wavefronts and Fields
*********************
*******************
Wavefront and Field
*******************

ptype
=====
A wavefront's type (:attr:`~lentil.Wavefront.ptype`) defines how it interacts
with a |Plane|. When a wavefront interacts with a plane, it inherits the plane's
``ptype``. Plane type is set automatically and unexpected behavior may
occur if it is changed.

|Wavefront| support the following ptypes:

================== ===========================================================
:class:`none` Wavefront has no specific type
:class:`pupil` Wavefront is at a pupil plane and has a finite focal length
:class:`image` Wavefront is at an image plane
================== ===========================================================

The rules defining when a wavefront is allowed to interact with a plane based
on ``ptype`` are described :ref:`here <user.fundamentals.wavefront.ptype_rules>`.

.. _user.fundamentals.plane_wavefront:

Expand Down Expand Up @@ -44,6 +62,25 @@ the wavefront's complex data array:

Multiplication rules
====================
The table below outlines when a wavefront can interact with a plane based on their
``ptype`` and what the wavefront's pytpe is after interaction:

+-----------------+------------+-------------+-------------+
| | .. centered:: Wavefront ``ptype`` |
+ Plane ``ptype`` +------------+-------------+-------------+
| | ``none`` | ``pupil`` | ``image`` |
+=================+============+=============+=============+
| ``none`` | ``none`` | Not allowed | Not allowed |
+-----------------+------------+-------------+-------------+
| ``pupil`` | ``pupil`` | ``pupil`` | Not allowed |
+-----------------+------------+-------------+-------------+
| ``image`` | ``image`` | Not allowed | ``image`` |
+-----------------+------------+-------------+-------------+
| ``tilt`` | ``none`` | ``pupil`` | ``image`` |
+-----------------+------------+-------------+-------------+
| ``transform`` | ``none`` | ``pupil`` | ``image`` |
+-----------------+------------+-------------+-------------+


Broadcasting
============

0 comments on commit b2f0d16

Please sign in to comment.