Skip to content

Commit

Permalink
fixed bug initializing emulator.py variables (there was bug in lowpas…
Browse files Browse the repository at this point in the history
…s filter returning tuple at first)
  • Loading branch information
tobidelbruck committed Jun 7, 2022
1 parent 967f0f5 commit 44800bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion v2ecore/emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def generate_events(self, new_frame, t_frame):
noise = self.photoreceptor_noise_vrms * torch.randn(self.log_new_frame.shape, dtype=torch.float32, device=self.device)
self.photoreceptor_noise_arr=low_pass_filter(noise,self.photoreceptor_noise_arr,None,delta_time,self.cutoff_hz)
self.photoreceptor_noise_samples.append(self.photoreceptor_noise_arr[0,0].cpu().item())
std=np.std(self.photoreceptor_noise_samples)
# std=np.std(self.photoreceptor_noise_samples)

# surround computations by time stepping the diffuser
if self.csdvs_enabled:
Expand Down
2 changes: 1 addition & 1 deletion v2ecore/emulator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def low_pass_filter(
"""
if cutoff_hz <= 0:
# unchanged
return log_new_frame, log_new_frame
return log_new_frame

# else low pass
tau = 1/(math.pi*2*cutoff_hz)
Expand Down

0 comments on commit 44800bc

Please sign in to comment.