Skip to content

Commit 5fd3093

Browse files
authored
Merge pull request #40 from Kitware/restructure-waveplot-metadata
restructure waveplot output
2 parents 5e04bc7 + c8438bc commit 5fd3093

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

batbot/spectrogram/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,23 +1841,23 @@ def compute_wrapper(
18411841
compressed_paths = []
18421842
mask_paths = []
18431843
masked_paths = []
1844+
waveplot_compressed_paths = []
1845+
waveplot_plots = []
18441846
if not fast_mode:
18451847
datas = [
18461848
(output_paths, 'jpg', stft_db),
18471849
]
18481850
if plot_uncompressed_amplitude:
18491851
datas += [
1850-
(output_paths, 'waveplot.jpg', waveplot),
1852+
(waveplot_plots, 'waveplot.jpg', waveplot),
18511853
]
1852-
else:
1853-
datas = []
18541854
if 'stft_db' in segments:
18551855
datas += [
18561856
(compressed_paths, 'compressed.jpg', segments['stft_db']),
18571857
]
18581858
if 'waveplot' in segments:
18591859
datas += [
1860-
(compressed_paths, 'compressed.waveplot.jpg', segments['waveplot']),
1860+
(waveplot_compressed_paths, 'compressed.waveplot.jpg', segments['waveplot']),
18611861
]
18621862

18631863
# Create masked image
@@ -1897,6 +1897,8 @@ def compute_wrapper(
18971897
'spectrogram': {
18981898
'uncompressed.path': output_paths,
18991899
'compressed.path': compressed_paths,
1900+
'waveplot.path': waveplot_plots,
1901+
'waveplot.compressed.path': waveplot_compressed_paths,
19001902
'mask.path': mask_paths,
19011903
'masked.path': masked_paths,
19021904
},

0 commit comments

Comments
 (0)