Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions stingray/simulator/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from stingray import utils
from stingray import Lightcurve
from stingray import AveragedPowerspectrum
import math

__all__ = ["Simulator"]

Expand Down Expand Up @@ -275,10 +276,10 @@ def simple_ir(self, start=0, width=1000, intensity=1):
"""

# Fill in 0 entries until the start time
h_zeros = np.zeros(int(start / self.dt))
h_zeros = np.zeros(math.ceil(start / self.dt))

# Define constant impulse response
h_ones = np.ones(int(width / self.dt)) * intensity
h_ones = np.ones(math.ceil(width / self.dt)) * intensity

return np.append(h_zeros, h_ones)

Expand Down