Skip to content

Commit

Permalink
Minor syntax issue
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobachetti committed Feb 20, 2024
1 parent 48879a8 commit 2629c67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stingray/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ def pi_to_energy(pis, rmf_file=None):
The rmf file used to read the calibration. If None or not specified,
the one given by default_nustar_rmf() is used.
"""
calp, calEmin, calEmax = read_rmf(rmf_file)
calp, cal_emin, cal_emax = read_rmf(rmf_file)
es = np.zeros(len(pis), dtype=float)
for ic, c in enumerate(calp):
good = pis == c
if not np.any(good):
continue
es[good] = (calEmin[ic] + calEmax[ic]) / 2
es[good] = (cal_emin[ic] + cal_emax[ic]) / 2

return es

Expand Down

0 comments on commit 2629c67

Please sign in to comment.