Commit 5a8275af authored by Leon Merten Lohse's avatar Leon Merten Lohse
Browse files

Use pep8 naming in the hankel module

parent 09859d87
......@@ -9,9 +9,9 @@ import scipy.special
from . import _hankel
def hankelMatrix(N, order=0):
def hankel_matrix(N, order=0):
"""
Create a N x N matrix for discrete Hankel transfrom (DHT) [1]_ of order `order`.
Create a N x N matrix for discrete Hankel transform (DHT) [1]_ of order `order`.
Parameters
----------
......@@ -33,7 +33,9 @@ def hankelMatrix(N, order=0):
References
----------
.. [1] N. Baddour and U. Chouinard, “Theory and operational rules for the discrete Hankel transform,” Journal of the Optical Society of America A, vol. 32, no. 4, p. 611, Mar. 2015. https://doi.org/10.1364/JOSAA.32.000611
.. [1] N. Baddour and U. Chouinard, “Theory and operational rules for the discrete Hankel transform,”
Journal of the Optical Society of America A, vol. 32, no. 4, p. 611, Mar. 2015.
https://doi.org/10.1364/JOSAA.32.000611
"""
jn = np.asarray(scipy.special.jn_zeros(order, N + 1))
......@@ -49,7 +51,7 @@ def hankelMatrix(N, order=0):
return Y
def hankelSamples(N, xmax=1, order=0):
def hankel_samples(N, xmax=1, order=0):
"""
Returns the real space sampling grid for the DHT
......@@ -57,10 +59,10 @@ def hankelSamples(N, xmax=1, order=0):
----------
N : int
number of pixels
order : int, optional
order of DHT
xmax : float, optional
width of real space grid
order : int, optional
order of DHT
Returns
......@@ -74,7 +76,7 @@ def hankelSamples(N, xmax=1, order=0):
return jn[:-1] * xmax / jn[N]
def hankelFreq(N, kmax=0.5, order=0):
def hankel_freq(N, kmax=0.5, order=0):
"""
Returns the Hankel space (frequency) sampling grid for the inverse DHT
......@@ -133,11 +135,13 @@ class ResampleTransform:
See also
--------
fresnel.hankel.hankelSamples
fresnel.hankel.hankel_samples
References
----------
.. [2] A. W. Norfolk and E. J. Grace, “Reconstruction of optical fields with the Quasi-discrete Hankel transform,” Optics Express, vol. 18, no. 10, p. 10551, May 2010. https://doi.org/10.1364%2Foe.18.010551
.. [2] A. W. Norfolk and E. J. Grace, “Reconstruction of optical fields with the Quasi-discrete Hankel transform,”
Optics Express, vol. 18, no. 10, p. 10551, May 2010.
https://doi.org/10.1364%2Foe.18.010551
"""
def __init__(self, N, samplesout, xmax=1, order=0, eps=1e-10):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment