Skip to content

Lacourse 2018 very slow #13

@bdyetton

Description

@bdyetton

Hi Wonambi Team,
First, thank you for this amazing package!
I'm using it to apply the Lacourse 2018 detector. This detector is very slow. It's 'moving_power_ratio' that seems to be slow. I'm wondering if there are some code optimizations possible. For example, unless im mistaken, line 1347 and line 1353 do the same thing, twice:

sf, psd = periodogram(windat, s_freq, 'hann', nfft=nfft,
                                       detrend='constant')

That should give a factor of 2 speed up at least. There are also a lot of regular python functions which could be numpy functions to also speed things up (sum vs np.sum).
I don't know if you guys have time, but if so, it would help speed up the 2000 records id like to detect spindles for ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions