laszukdawid / PyEMD

Python implementation of Empirical Mode Decompoisition (EMD) method
https://pyemd.readthedocs.io/
Apache License 2.0
867 stars 224 forks source link

Add __call__ to class #11

Closed lkjell closed 7 years ago

lkjell commented 7 years ago

Request to make the classes callable to pass on signal and other parameters.

Example:

emd = EMD()
IMF = emd(signal)

This can be done by adding

def __call__ (self, S, T=None, max_imf=-1): 
    return self.emd(S,T,max_imf)

to the class

laszukdawid commented 7 years ago

Thanks for suggestion! :+1: This was considered in the past, but for previous shape this was not feasible. You are right that in current form this might be beneficial modification. Let me think on this.

laszukdawid commented 7 years ago

Feature added. See commit 12f4cfb84da649ac532fe29800d3bf3dd1fca2bd.