# 5.6.1.2. eqcorrscan.utils.despike.template_remove

`eqcorrscan.utils.despike.``template_remove`(tr, template, cc_thresh, windowlength, interp_len, debug=0)

  Looks for instances of template in the trace and removes the matches.

  Parameters: | tr (obspy.core.trace.Trace) Trace to remove spikes from. template (osbpy.core.trace.Trace) Spike template to look for in data. cc_thresh (float) Cross-correlation threshold (-1 - 1). windowlength (float) Length of window to look for spikes in in seconds. interp_len (float) Window length to remove and fill in seconds. debug (int) Debug level.
  Returns: | tr, works in place.
  Return type: | `obspy.core.trace.Trace`