Commit e841dc47 authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Fix error in MTF to sigma formula

parent d1a82eca
......@@ -75,8 +75,7 @@ def generate_psf_kernel(res: float,
:return: The kernel as a ndarray of shape
[2*half_kernel_width+1, 2*half_kernel_width+1]
"""
fc = 0.5 / mtf_res
sigma = math.sqrt(-math.log(mtf_fc) / 2) / (math.pi * fc)
sigma = (mtf_res / math.pi) * math.sqrt(-2 * math.log(mtf_fc))
if half_kernel_width is None:
half_kernel_width = int(math.ceil(mtf_res / (res)))
kernel = np.zeros((2 * half_kernel_width + 1, 2 * half_kernel_width + 1))
......
Supports Markdown
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