paudetseis / RfPy

Teleseismic receiver function calculation and post-processing
https://paudetseis.github.io/RfPy/
MIT License
40 stars 28 forks source link

Option to change wavelet used for deconvolution #23

Closed wasjabloch closed 2 years ago

wasjabloch commented 3 years ago

Currently, RFData.deconvolve._decon uses the entire time window of the parent for deconvolution. It might be beneficial to select a shorter wavelet e.g. based on the signal envelope or a user-defined time window.

I suggest to include a new private function to RFData.deconvolve, e.g.

def _wavelet(method='complete', envelope_threshold=0.1, time=5):

    """
    Select wavelet from the parent function for deconvolution using method.
    method: (str)
        'complete' use complete, tapered parent signal (current implementation)
        'envelope' use only the part of the parent signal where envelope > envelope_threshold*max(envelope)
        'time' use only the first window seconds after signal`
    envelope_threshold: (float) fraction of the envelope that defines the wavelet (for method='envelope')
    time: (float) window (seconds) that defines the wavelet (for method='time')
    """
wasjabloch commented 3 years ago

I've started implementing this.

wasjabloch commented 3 years ago

Implemented for P waves in branch: future