Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
spranav1205 committed Oct 24, 2024
1 parent 48e441a commit d128490
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stingray/simulator/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ def simple_ir(self, start=0, width=1000, intensity=1):
# Fill in 0 entries until the start time
h_zeros = np.zeros(int(np.ceil((start / self.dt))))
impulse_train = h_zeros
if(start%self.dt == 0):

if start % self.dt == 0:
impulse_train = np.append(h_zeros, 0.5)

# Define constant impulse response
h_ones = np.ones(int((start%self.dt + width) / self.dt)) * intensity
impulse_train = np.append(impulse_train,h_ones)
h_ones = np.ones(int((start % self.dt + width) / self.dt)) * intensity
impulse_train = np.append(impulse_train, h_ones)

if ((start+width)%self.dt == 0):
if (start + width) % self.dt == 0:
impulse_train[-1] = 0.5

return impulse_train
Expand Down

0 comments on commit d128490

Please sign in to comment.