Skip to content

Commit

Permalink
tof2ns fix units and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
steinnymir committed Oct 25, 2023
1 parent 0433019 commit 4cad800
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sed/calibrator/energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ def residual(pars, time, data, binwidth, binning, energy_scale):
),
vary=t0_pars.get("vary", True),
)
E0_pars = kwds.pop("E0", {})
E0_pars = kwds.pop("E0", {}) # pylint: disable=invalid-name
pars.add(
name="E0",
value=E0_pars.get("value", min(vals)),
Expand Down Expand Up @@ -2211,13 +2211,13 @@ def tof2ns(
designed for use with dask.dataframe.DataFrame.map_partitions.
Args:
binwidth (float): Time step size in nanoseconds.
binwidth (float): Time step size in seconds.
binning (int): Binning of the time-of-flight steps.
t (float): TOF value in bin number.
Returns:
float: Converted time in nanoseconds.
"""
val = t * binwidth * 2**binning
val = t * 1e9 * binwidth * 2**binning
return val


Expand Down

0 comments on commit 4cad800

Please sign in to comment.