Skip to content

Commit

Permalink
Make docs numpydoc compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
andykee committed Dec 1, 2023
1 parent 09f87d5 commit 3a1be4e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
16 changes: 8 additions & 8 deletions lentil/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def pixel(img, oversample=1):
out : ndarray
Image with pixel sampling effects applied.
Example
-------
Examples
--------
Apply pixel MTF to a 3x oversampled PSF:
.. code:: pycon
Expand Down Expand Up @@ -209,8 +209,8 @@ def pixelate(img, oversample):
img : ndarray
Rescaled image with pixel MTF applied
Note
----
Notes
-----
``pixelate`` should only be used if ``oversample`` > 2
See Also
Expand Down Expand Up @@ -258,8 +258,8 @@ def adc(img, gain, saturation_capacity=None, warn_saturate=False, dtype=None):
img : ndarray
Array of DN
Note
----
Notes
-----
The saturation capacity should not be confused with the full-well capacity.
Saturation capacity is typically smaller than the full well capacity because
the signal is clipped before the physical saturation of the pixel is
Expand Down Expand Up @@ -572,8 +572,8 @@ def cosmic_rays(shape, pixelscale, ts, rate=4e4, proton_flux=1e9, alpha_flux=4e9
Array representing the number of electrons in a detector image due
to cosmic ray hits
Example
-------
Examples
--------
Simulate the cosmic ray hits for a 2000 second exposure over a 256 x 256 detector
patch with 5 um x 5 um x 3 um pixels:
Expand Down
2 changes: 1 addition & 1 deletion lentil/plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def mask(self, value):
@property
def global_mask(self):
"""
Flattened view of :attr:`~mask`
Flattened view of :attr:`mask`
Returns
-------
Expand Down
12 changes: 6 additions & 6 deletions lentil/radiometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ def trim(self, tol=1e-4):
tol : float, optional
Relative tolerance used to find ends. Default is 1e-4
Note
----
Notes
-----
If :attr:`~radiometry.Spectrum.value` is all zeros, no trim operation is
performed and the Spectrum remains unchanged.
Expand Down Expand Up @@ -1102,16 +1102,16 @@ class Material:
:attr:`~lentil.radiometry.Material.emission` are multiplied by contam
before being returned.
Note
----
Notes
-----
There is no explicit reflection attribute. Reflective optics should use the
:attr:`~lentil.radiometry.Material.transmission` attribute to represent
reflectivity.
See Also
--------
* :func:`lentil.radiometry.path_transmission`
* :func:`lentil.radiometry.path_emission`
radiometry.path_transmission
radiometry.path_emission
"""
def __init__(self, transmission=1, emission=0, contam=1):
Expand Down
4 changes: 2 additions & 2 deletions lentil/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ def rescale(img, scale, shape=None, mask=None, order=3, mode='nearest',
img : ndarray
Rescaled image.
Note
----
Notes
-----
The post-rescale masking operation should have no real effect on the
resulting image but is included to eliminate interpolation artifacts that
sometimes appear in large clusters of zeros in rescaled images.
Expand Down
4 changes: 2 additions & 2 deletions lentil/wfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def translation_defocus(mask, f_number, translation):
wfe : ndarray
Focus error due to axial translation
Warning
-------
Warnings
--------
Defocus is computed over a circular pupal defined by the maximum
horizontal or vertical extent of the supplied mask before applying the
mask. As a result, the RMS and peak-to-valley wavefront measurements
Expand Down
12 changes: 6 additions & 6 deletions lentil/zernike.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def zernike(mask, index, normalize=True, rho=None, theta=None):
out
Circular Zernike polynomial computed over the given mask.
Warning
-------
Warnings
--------
Zernike polynomials are defined to be orthogonal on the unit circle. If
the supplied mask is non-circular, the Zernike polynomial is computed on an
outscribing circle and then cropped by the mask. Note that this operation
Expand Down Expand Up @@ -268,8 +268,8 @@ def zernike_fit(opd, mask, modes, normalize=True, rho=None, theta=None):
List of coefficients fit to the supplied OPD over the specified number
of Zernike modes.
Example
-------
Examples
--------
.. code:: pycon
>>> import numpy as np
Expand All @@ -286,7 +286,7 @@ def zernike_fit(opd, mask, modes, normalize=True, rho=None, theta=None):
See Also
--------
:func:`zernike_remove` Fit and remove a Zernike basis set from an OPD.
zernike_remove : Fit and remove a Zernike basis set from an OPD.
References
----------
Expand Down Expand Up @@ -333,7 +333,7 @@ def zernike_remove(opd, mask, modes, rho=None, theta=None):
See Also
--------
:func:`zernike_fit`
zernike_fit
References
----------
Expand Down

0 comments on commit 3a1be4e

Please sign in to comment.