Skip to content

Update edc.py#154

Open
f-brinkmann wants to merge 1 commit intofix/rename_freq_parameterfrom
fix/rename_freq_parameter_suggestion
Open

Update edc.py#154
f-brinkmann wants to merge 1 commit intofix/rename_freq_parameterfrom
fix/rename_freq_parameter_suggestion

Conversation

@f-brinkmann
Copy link
Member

Which issue(s) are closed by this pull request?

Hi @h-chmeruk this is a suggestion to improve the if case that you commented on in intersection_time_lundeby.

This suggestion fails for the case cdim==2 below, which probably requires broadcasting in _smooth_rir. Maybe this can be fixed and the if case be avoided in a similar way, i.e., by broadcasting the parameter that now can be an array like as well

import pyfar as pf
import pyrato
import numpy as np

cdim = 2

rir = pf.signals.files.room_impulse_response(crop_noise_tail=False)

if cdim == 2:
    rirs = rir.copy()
    rirs.time = np.tile(rirs.time, (3, 1))[:, None, :]
    rirs = pf.utils.concatenate_channels((rirs, rirs), 1)
elif cdim == 1:
    rirs = rir.copy()
    rirs = pf.utils.concatenate_channels((rirs, rirs, rirs), 0)

pyrato.edc.intersection_time_lundeby(rirs, smoothing_parameter=1000)

@f-brinkmann f-brinkmann requested a review from h-chmeruk March 17, 2026 12:04
h-chmeruk added a commit that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant