Skip to content

Commit

Permalink
fix tof_step_to_ns
Browse files Browse the repository at this point in the history
  • Loading branch information
steinnymir committed Oct 13, 2023
1 parent bfd3daa commit ea5c5fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sed/calibrator/energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,10 @@ def tof_step_to_ns(
raise ValueError("Either tof_ns_column or config must be given.")
tof_ns_column = config["dataframe"]["tof_ns_column"]

df[tof_ns_column] = df.map_partitions(tof2ns, meta=(tof_column, np.float64))
def func(x):
return tof2ns(x, tof_column, tof_binwidth, tof_binning)

df[tof_ns_column] = df.map_partitions(func, meta=(tof_column, np.float64))
metadata: Dict[str, Any] = {"applied": True, "tof_binwidth": tof_binwidth}
return df, metadata

Expand Down

0 comments on commit ea5c5fd

Please sign in to comment.