Skip to content

Commit

Permalink
fix sign error
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Jun 19, 2024
1 parent d0ebe51 commit ea7fef9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def compute_shifts(coef):
result = calibration.apply_spectrum_model(
spectrum_mz_arr=test_masses, spectrum_int_arr=test_masses_int, model_coef=xr.DataArray(coef, dims=["c"])
)
return xr.DataArray(result[0] - test_masses, dims=["m"])
# result = test_mass - shift => shift = test_mass - result
return xr.DataArray(test_masses - result[0], dims=["m"])

shifts = xr.apply_ufunc(
compute_shifts,
Expand Down

0 comments on commit ea7fef9

Please sign in to comment.