Skip to content

Commit 9333cb0

Browse files
committed
savu paganin work3
1 parent aec3a9a commit 9333cb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

httomolibgpu/prep/phase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def paganin_filter(
139139

140140

141141
def _calculate_alpha(energy, distance, ratio_delta_beta):
142-
return (_wavelength_micron(energy) * distance / (4 * math.pi)) * ratio_delta_beta
142+
return _wavelength(energy) * distance * ratio_delta_beta / (4 * math.pi)
143143

144144

145145
# the scaling is different here and doesn't follow the original formula
@@ -212,7 +212,7 @@ def _pad_projections_to_second_power(
212212
return padded_tomo, tuple(pad_list)
213213

214214

215-
def _wavelength_micron(energy: float) -> float:
215+
def _wavelength(energy: float) -> float:
216216
# for photons: E = 1keV -> 1.23984193 nm
217217
return (1.23984193e-9) / energy
218218

0 commit comments

Comments
 (0)