Skip to content

Commit

Permalink
Properly convert to bin edges in FormalIntegrator
Browse files Browse the repository at this point in the history
  • Loading branch information
yeganer committed Jun 8, 2017
1 parent 4cd961b commit 678186a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tardis/montecarlo/formal_integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ def calculate_spectrum(self, frequency, N=1000):
) * (frequency[1] - frequency[0])
# Ugly hack to convert to 'bin edges'
frequency = u.Quantity(
np.concatenate(
[frequency.value, [0]]),
frequency.unit)
np.concatenate([
frequency.value,
[
frequency.value[-1] + np.diff(frequency.value)[-1]
]]),
frequency.unit)
return TARDISSpectrum(
frequency,
luminosity
Expand Down

0 comments on commit 678186a

Please sign in to comment.