Skip to content

Commit

Permalink
Merge pull request #281 from bfhealy/fix-interp-error
Browse files Browse the repository at this point in the history
This PR adds the timeshift to the t values that are later used for interpolation when plotting analysis results.
  • Loading branch information
mcoughlin authored Nov 30, 2023
2 parents 0e5e43e + 2706a22 commit 4bfc5ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nmma/em/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,9 @@ def analysis(args):
# fetch data
samples = copy.deepcopy(processed_data[filt])
t, y, sigma_y = samples[:, 0], samples[:, 1], samples[:, 2]
# shift t values by timeshift
if "timeshift" in bestfit_params:
t += bestfit_params["timeshift"]
# only the detection data are needed
finite_idx = np.where(np.isfinite(sigma_y))[0]
if len(finite_idx) > 0:
Expand Down

0 comments on commit 4bfc5ea

Please sign in to comment.