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')
"""
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.