Skip to content

May I know how template matching curve looks? #1

@subhasiny

Description

@subhasiny

Hello, we are trying to look at the spike detection analysis in one part of our research work. We faced some issues and would like to get your opinion and recommendation on it

"from scipy import signal, signal.triang(np.round(down_samp_freq * 0.06)) (under detect function)" doesn't work causing error - module scipy.signal has no attribute triang.

So in 1.13.1 (not stable) version, using

from scipy.signal.windows import triang
template= triang(np.round(down_samp_freq*0.06))
kernel = np.array([-2, -1, 1, 2]) / float(8)
template = np.convolve(kernel, np.convolve(template, kernel, 'valid') ,'full'),

we got a signal as attached

triang_function_result

But as it is mentined in webpage of scipy to shift to stable version, we decided to use sawtooth (which was mentioned that it will return triangular waveform) to recreate the template waveform

t= np.linspace(0,1,12)
template=signal.sawtooth(2np.pit)
kernel = np.array([-2, -1, 1, 2]) / float(8)
template = np.convolve(kernel, np.convolve(template, kernel, 'valid') ,'full')

and we got image like this

sawtooth_traingular_template

Also, in both figures- time and amplitude varies. If you could provide us image or values(both amplitude and time) that u obtained for template matching , we could try to change it accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions