Skip to content

Computing PSD with welch #493

Description

@fabrielB

Hi everyone ! In the process of checking how Osekit computs PSD with the welch function I came upon some bug and unchanged behavior regarding the handling of multichannel audio. (see following code section)

1) Confusion between overlap and hop

noverlap = self.fft.hop

As one can see on line 330 of the code, the overlap parameter, then implemented to scipy welch() function, is defined as equal to the hop parameter of the ShortTimeFFT scipy class. However it is false since the relation between both parameters is actually

overlap = window - hop.

2) Unsolved multichannel handling

self.audio_data.get_value_calibrated()[
:,
0,
], # Only considers the 1rst channel

It appears on line 339 that this method is still only considering the 1st audio channel of the given file. A behavior that should have been changed by the PR #445, but that has apparently not been updated here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething's fishy

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions