File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -100,13 +100,17 @@ def paganin_filter(
100100 alpha = _calculate_alpha (energy , distance , ratio_delta_beta )
101101
102102 # Compute the reciprocal grid
103- pixel_size *= 1e6 # rescaling to meters
104- indx = _reciprocal_coord (pixel_size / ( 2 * math . pi ) , dy )
105- indy = _reciprocal_coord (pixel_size / ( 2 * math . pi ) , dx )
103+ # pixel_size *= 1e6 # rescaling to meters
104+ indx = _reciprocal_coord (pixel_size , dy )
105+ indy = _reciprocal_coord (pixel_size , dx )
106106
107107 # Build Lorentzian-type filter
108108 phase_filter = fftshift (
109- 1.0 / (1.0 + alpha * (cp .add .outer (cp .square (indx ), cp .square (indy ))))
109+ 1.0
110+ / (
111+ 1.0
112+ + alpha * (cp .add .outer (cp .square (indx ), cp .square (indy )) / (4 * math .pi ))
113+ )
110114 )
111115
112116 phase_filter = phase_filter / phase_filter .max () # normalisation
@@ -139,7 +143,7 @@ def paganin_filter(
139143
140144
141145def _calculate_alpha (energy , distance , ratio_delta_beta ):
142- return _wavelength (energy ) * distance * ratio_delta_beta / ( 4 * math . pi )
146+ return _wavelength (energy ) * distance * ratio_delta_beta
143147
144148
145149# the scaling is different here and doesn't follow the original formula
You can’t perform that action at this time.
0 commit comments