Skip to content

Bug when calculating pre-emphasis filter for plotting #16

@ivanpondal

Description

@ivanpondal

Hello!

When plotting, the following function is not calculating correctly the pre-emphasis filter:

return np.concatenate([x, np.subtract(x, np.multiply(x, coeff))])

The correct implementation is being used in the model:

return torch.cat((x[:, :, 0:1], x[:, :, 1:] - coeff * x[:, :, :-1]), dim=2)

At high level this is given a signal x, in order to calculate x[t] you do:
x[t] = x[t] - 0.95*x[t - 1]

btw, great project! 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions