@@ -263,6 +263,10 @@ def energy_decay_curve_truncation(
263263 >>> ax.legend()
264264
265265 """
266+ # flatten to allow signals with cdim > 1
267+ shape = data .time .shape
268+ data = data .flatten ()
269+
266270 energy_data = dsp .preprocess_rir (
267271 data ,
268272 is_energy = is_energy ,
@@ -309,7 +313,7 @@ def energy_decay_curve_truncation(
309313 energy_decay_curve /= max_start_value
310314
311315 edc = pf .TimeData (
312- energy_decay_curve , data .times , comment = data .comment )
316+ energy_decay_curve . reshape ( shape ) , data .times , comment = data .comment )
313317
314318 if plot :
315319 ax = pf .plot .time (data , dB = True , label = 'RIR' )
@@ -401,6 +405,9 @@ def energy_decay_curve_lundeby(
401405 >>> ax.legend()
402406
403407 """
408+ # flatten to allow signals with cdim > 1
409+ shape = data .time .shape
410+ data = data .flatten ()
404411
405412 energy_data = dsp .preprocess_rir (
406413 data ,
@@ -455,7 +462,7 @@ def energy_decay_curve_lundeby(
455462 energy_decay_curve /= max_start_value
456463
457464 edc = pf .TimeData (
458- energy_decay_curve , data .times , comment = data .comment )
465+ energy_decay_curve . reshape ( shape ) , data .times , comment = data .comment )
459466
460467 if plot :
461468 ax = pf .plot .time (data , dB = True , label = 'RIR' )
@@ -548,6 +555,10 @@ def energy_decay_curve_chu(
548555 >>> ax.legend()
549556
550557 """
558+ # flatten to allow signals with cdim > 1
559+ shape = data .cshape
560+ data = data .flatten ()
561+
551562 energy_data = dsp .preprocess_rir (
552563 data ,
553564 is_energy = is_energy ,
@@ -582,6 +593,8 @@ def energy_decay_curve_chu(
582593 trunc_levels = 10 * np .log10 ((psnr )) - threshold
583594 edc = truncate_energy_decay_curve (edc , trunc_levels )
584595
596+ edc = edc .reshape (shape )
597+
585598 if plot :
586599 plt .figure (figsize = (15 , 3 ))
587600 pf .plot .use ('light' )
@@ -687,6 +700,9 @@ def energy_decay_curve_chu_lundeby(
687700 >>> ax.legend()
688701
689702 """
703+ # flatten to allow signals with cdim > 1
704+ shape = data .time .shape
705+ data = data .flatten ()
690706
691707 energy_data = dsp .preprocess_rir (
692708 data ,
@@ -746,7 +762,7 @@ def energy_decay_curve_chu_lundeby(
746762 energy_decay_curve /= max_start_value
747763
748764 edc = pf .TimeData (
749- energy_decay_curve , data .times , comment = data .comment )
765+ energy_decay_curve . reshape ( shape ) , data .times , comment = data .comment )
750766
751767 if plot :
752768 ax = pf .plot .time (data , dB = True , label = 'RIR' )
0 commit comments