scikit-signal/tftb

Possible optimisation for processing.Scalogram ?

Opened this issue · 1 comments

vldv commented

Hi,

I'm not quite sure this is the right place to notify that but here I go.

I've been using the Scalogram method recently and noticed two possible improvements that can help it scale (much) better.

In affine.py, line 173 :
the conversion of self.tfr to complex type is probably not needed here, since it's already created as a complex array in base.py, line 52.

In affine.py, line 164 :
No kwargs are passed in the super method. In turn, the AffineDistribution class cannot pass such kwargs to BaseTFRepresentation. This has the consequence to set the self.tfr size to N x N ( base.py, line 38-39) with N being the length of the signal processed. This causes MemoryError for relatively small signal length.

I don't know if these are by design or not, but by modifying the files on my end I see not difference in output and significant performances improvements.

Thanks for you work,
Best,
Victor

Hi @vldv, thanks for pointing this out.

Could you please send a pull request with the proposed changes?

Thanks,