5.2.5.1.7. eqcorrscan.utils.correlate.register_array_xcorr

eqcorrscan.utils.correlate.register_array_xcorr(name, func=None, is_default=False)[source]

Decorator for registering correlation functions.

Each function must have the same interface as numpy_normxcorr, which is f(templates, stream, pads, *args, **kwargs) any number of specific kwargs can be used.

Register_normxcorr can be used as a decorator (with or without arguments) or as a callable.

Parameters:
  • name (str, callable) – The name of the function for quick access, or the callable that will be wrapped when used as a decorator.

  • func (callable, optional) – The function to register

  • is_default (bool) – True if this function should be marked as default normxcorr

Returns:

callable