diff --git a/corrscope/corrscope.py b/corrscope/corrscope.py index f25b23a..3e435d4 100644 --- a/corrscope/corrscope.py +++ b/corrscope/corrscope.py @@ -265,13 +265,9 @@ class CorrScope: self.renderer.render_frame(datas) self.output.write_frame(self.renderer.get_frame()) - extra_outputs.window = None - if "window" in internals: - extra_outputs.window = RenderOutput() - - extra_outputs.buffer = None - if "buffer" in internals: - extra_outputs.buffer = RenderOutput() + extra_outputs.window = RenderOutput() if "window" in internals else None + extra_outputs.buffer = RenderOutput() if "buffer" in internals else None + extra_outputs.spectrum = RenderOutput() if "spectrum" in internals else None # endregion if PRINT_TIMESTAMP: @@ -333,17 +329,22 @@ class CorrScope: continue # region Display buffers, for debugging purposes. + triggers = cast(List[CorrelationTrigger], self.triggers) if extra_outputs.window: - triggers = cast(List[CorrelationTrigger], self.triggers) extra_outputs.window.render_frame( [trigger._prev_window for trigger in triggers] ) if extra_outputs.buffer: - triggers = cast(List[CorrelationTrigger], self.triggers) extra_outputs.buffer.render_frame( [trigger._buffer for trigger in triggers] ) + + if extra_outputs.spectrum: + extra_outputs.spectrum.render_frame( + [trigger._spectrum - 0.99 for trigger in triggers] + ) + # endregion if not_benchmarking or benchmark_mode >= BenchmarkMode.RENDER: