Skip to content

Commit 2aa3d74

Browse files
bingli621nvaytet
andauthored
Update src/tof/utils.py
Co-authored-by: Neil Vaytet <39047984+nvaytet@users.noreply.github.com>
1 parent b207bb8 commit 2aa3d74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tof/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def speed_to_energy(x: sc.Variable, unit="meV") -> sc.Variable:
5252
unit:
5353
The unit of the output energies.
5454
"""
55-
return (const.m_n * x * x / 2).to(unit=unit)
55+
return ((0.5 * const.m_n) * x * x).to(unit=unit)
5656

5757

5858
def energy_to_speed(x: sc.Variable, unit="m/s") -> sc.Variable:

0 commit comments

Comments
 (0)