Skip to content

Commit

Permalink
Break out tilt and segmented docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andykee committed Dec 8, 2023
1 parent 1c5f8e5 commit c526eae
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 58 deletions.
23 changes: 0 additions & 23 deletions docs/user/fundamentals/diffraction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,30 +257,7 @@ Sampling considerations
.. :width: 550px
.. :align: center
.. _user.diffraction.tilt:
Working with large tilts
========================
.. image:: /_static/img/propagate_tilt_phase.png
:width: 450px
:align: center

.. image:: /_static/img/propagate_tilt_phase_wrap.png
:width: 650px
:align: center

.. image:: /_static/img/propagate_tilt_angle.png
:width: 600px
:align: center

.. image:: /_static/img/propagate_tilt_angle_steps.png
:width: 600px
:align: center

.. _user.diffraction.segmented:

Differences for segmented apertures
===================================
Expand Down
37 changes: 2 additions & 35 deletions docs/user/fundamentals/planes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,40 +115,7 @@ Resampling or rescaling a Plane
It is possible to resample a plane using either the :func:`~lentil.Plane.resample`
or :func:`~lentil.Plane.rescale` methods. Both methods use intrepolation to
resample the amplitude, opd, and mask attributes and readjust the pixelscale
attribute as necessary. The default behavior is to perform this interpolation
on a copy of the plane, but it is possible to operate in-place by setting
``inplace=True``.

.. _user_guide.planes.fit_tilt:

Fitting and removing Plane tilt
-------------------------------
The plane's :func:`~lentil.Plane.fit_tilt` method performs a least squares fit to
estimate and remove tilt from the :attr:`~lentil.Plane.opd` attribute. The removed
tilt is accounted for by appending an equivalent :class:`~lentil.Tilt` object to the
plane's :attr:`~lentil.Plane.tilt` attribute. The optical effect of the tilt is
automatically applied during a propagation step.

See :ref:`user.diffraction.tilt` for additional information on when to use
this method.

Segmented optical systems
=========================
Creating a model of a segmented aperture optical system in Lentil doesn't require any
special treatment. The |Plane| object works the same with sparse or
segmented amplitude, opd, and mask attributes as with monolithic ones.

That being said, it is advantageous from a performance point of view to supply a
3-dimensional `segment mask` when specifying a Plane's :attr:`~lentil.Plane.mask`
attribute rather than a flattened 2-dimensional `global mask` when working
with a segmented aperture, as depicted below:

.. plot:: _img/python/segmask.py
:scale: 50

This modification is not necessary to achieve accurate propagations, but can
greatly improve performance. For additional details, see
:ref:`user.diffraction.segmented`.
attribute as necessary.

.. _user.planes.pupil:

Expand All @@ -173,7 +140,7 @@ A pupil is defined by the following required parameters:
* :attr:`~lentil.Pupil.pixelscale` - Defines the physical sampling of each pixel in
the discretely sampled attributes described below

Discretely sampled pupil attributes can also be specified:
Discreetly sampled pupil attributes can also be specified:

* :attr:`~lentil.Pupil.amplitude` - Defines the relative electric field amplitude
transmission through the pupil
Expand Down
21 changes: 21 additions & 0 deletions docs/user/fundamentals/segmented.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _user.fundamentals.segmented:

*************************
Segmented optical systems
*************************

Lentil works with segmented apertures out of the box.
Creating a model of a segmented aperture optical system in Lentil doesn't require any
special treatment. The |Plane| object works the same with sparse or
segmented amplitude, opd, and mask attributes as with monolithic ones.

That being said, it is advantageous from a performance point of view to supply a
3-dimensional `segment mask` when specifying a Plane's :attr:`~lentil.Plane.mask`
attribute rather than a flattened 2-dimensional `global mask` when working
with a segmented aperture, as depicted below:

.. plot:: _img/python/segmask.py
:scale: 50

This modification is not necessary to achieve accurate propagations, but can
greatly improve performance.
34 changes: 34 additions & 0 deletions docs/user/fundamentals/tilt.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _user.fundamentals.tilt:

********************************
Working with large optical tilts
********************************


One of lentil's unique features is its hybrid approach to handling tilt.

The plane's :func:`~lentil.Plane.fit_tilt` method performs a least squares fit to
estimate and remove tilt from the :attr:`~lentil.Plane.opd` attribute. The removed
tilt is accounted for by appending an equivalent :class:`~lentil.Tilt` object to the
plane's :attr:`~lentil.Plane.tilt` attribute. The optical effect of the tilt is
automatically applied during a propagation step.





.. image:: /_static/img/propagate_tilt_phase.png
:width: 450px
:align: center

.. image:: /_static/img/propagate_tilt_phase_wrap.png
:width: 650px
:align: center

.. image:: /_static/img/propagate_tilt_angle.png
:width: 600px
:align: center

.. image:: /_static/img/propagate_tilt_angle_steps.png
:width: 600px
:align: center
2 changes: 2 additions & 0 deletions docs/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The User Guide provides documentation for all of Lentil's features and capabilit
fundamentals/wavefront_error
fundamentals/wavefront
fundamentals/diffraction
fundamentals/tilt
fundamentals/segmented
fundamentals/artifacts
fundamentals/image_sensors
fundamentals/radiometry
Expand Down

0 comments on commit c526eae

Please sign in to comment.