def multi_find_peaks(arr, thresh, trig_int, debug=<NUM_LIT:0>, starttime=False,<EOL>samp_rate=<NUM_LIT:1.0>, parallel=True, full_peaks=False,<EOL>cores=None):
peaks = []<EOL>if not parallel:<EOL><INDENT>for sub_arr, arr_thresh in zip(arr, thresh):<EOL><INDENT>peaks.append(find_peaks2_short(<EOL>arr=sub_arr, thresh=arr_thresh, trig_int=trig_int, debug=debug,<EOL>starttime=starttime, samp_rate=samp_rate,<EOL>full_peaks=full_peaks))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if cores is None:<EOL><INDENT>cores = arr.shape[<NUM_LIT:0>]<EOL><DEDENT>with pool_boy(Pool=Pool, traces=cores) as pool:<EOL><INDENT>params = ((sub_arr, arr_thresh, trig_int, debug,<EOL>False, <NUM_LIT:1.0>, full_peaks)<EOL>for sub_arr, arr_thresh in zip(arr, thresh))<EOL>results = [pool.apply_async(find_peaks2_short, param)<EOL>for param in params]<EOL>peaks = [res.get() for res in results]<EOL><DEDENT><DEDENT>return peaks<EOL>
Wrapper for find-peaks for multiple arrays.

:type arr: numpy.ndarray
:param arr: 2-D numpy array is required
:type thresh: list
:param thresh:
    The threshold below which will be considered noise and peaks will not
    be found in. One threshold per array.
:type trig_int: int
:param trig_int:
    The minimum difference in samples between triggers, if multiple
    peaks within this window this code will find the highest.
:type debug: int
:param debug: Optional, debug level 0-5
:type starttime: obspy.core.utcdatetime.UTCDateTime
:param starttime: Starttime for plotting, only used if debug > 2.
:type samp_rate: float
:param samp_rate: Sampling rate in Hz, only used for plotting if debug > 2.
:type parallel: bool
:param parallel:
    Whether to compute in parallel or not - will use multiprocessing
:type full_peaks: bool
:param full_peaks: See `eqcorrscan.utils.findpeaks.find_peaks2_short`
:type cores: int
:param cores:
    Maximum number of processes to spin up for parallel peak-finding

:returns:
    List of list of tuples of (peak, index) in same order as input arrays