some fixes

This commit is contained in:
2026-06-23 13:52:31 +03:00
parent 02bbe83446
commit d522828875
2 changed files with 15 additions and 6 deletions
@@ -725,18 +725,18 @@ class AppWindowPreprocessMixin:
) -> None:
"""Save amplitude/phase PNGs for every captured combo across all radar configs.
The live preview only shows the last config of each combo, so this persists a
graph for the other configs too, under the store's ``preview_png/`` tree. The
The live preview only shows one trace per config, so this persists a graph for
every config and every combo (port) under the store's ``preview_png/`` tree.
Iterating per config over its full trace set (not the per-batch preview trace)
is what makes matrix radars save all ports instead of only the last one. The
set is already saved by the time we get here, so any rendering failure is
logged but never aborts the save.
"""
channel = preprocess_asset_channel(kind)
display_name = preprocess_asset_display_name(kind)
# batch.traces and saved_sets are both ordered by the session's radar
# variants, so index i refers to the same config in both.
saved_count = 0
for batch in session.captured_batches():
for trace, saved in zip(batch.traces, saved_sets):
for saved in saved_sets:
for trace in session.traces_for_radar_key(saved.radar_key):
combo_label = f"input={trace.combo.input} output={trace.combo.output}"
try:
png_path = self._store.preview_png_dir(kind, set_name, saved.radar_key) / (