6.2.11.1.1. eqcorrscan.utils.pre_processing.multi_process

eqcorrscan.utils.pre_processing.multi_process(st, lowcut, highcut, filt_order, samp_rate, parallel=False, num_cores=False, starttime=None, endtime=None, daylong=False, seisan_chan_names=False, fill_gaps=True, ignore_length=False, ignore_bad_data=False)[source]

Apply standardised processing workflow to data for matched-filtering

Steps:

  1. Check length and continuity of data meets user-defined criteria

  2. Fill remaining gaps in data with zeros and record gap positions

  3. Detrend data (using a simple linear detrend to set start and end to 0)

  4. Pad data to length

  5. Resample in the frequency domain

  6. Detrend data (using a simple linear detrend to set start and end to 0)

  7. Zerophase Butterworth filter

  8. Re-check length

  9. Re-apply zero-padding to gap locations recording in step 2 to remove filtering and resampling artefacts

Parameters:
  • st (obspy.core.Stream) – Stream to process

  • lowcut (float) – Lowcut of butterworth filter in Hz. If set to None and highcut is given a highpass filter will be applied. If both lowcut and highcut are given, a bandpass filter will be applied. If lowcut and highcut are both None, no filtering will be applied.

  • highcut (float) – Highcut of butterworth filter in Hz. If set to None and lowcut is given a lowpass filter will be applied. If both lowcut and highcut are given, a bandpass filter will be applied. If lowcut and highcut are both None, no filtering will be applied.

  • filt_order (int) – Filter order

  • samp_rate (float) – Desired sample rate of output data in Hz

  • parallel (bool) – Whether to process data in parallel (uses multi-threading)

  • num_cores (int) – Maximum number of cores to use for parallel processing

  • starttime (obspy.core.UTCDateTime) – Desired starttime of data

  • endtime (obspy.core.UTCDateTime) – Desired endtime of data

  • daylong (bool) – Whether data should be considered to be one-day long. Setting this will assume that your data should start as close to the start of a day as possible given the sampling.

  • seisan_chan_names (bool) – Whether to convert channel names to two-char seisan channel names

  • fill_gaps (bool) – Whether to fill-gaps in the data

  • ignore_length (bool) – Whether to ignore data that are not long enough.

  • ignore_bad_data (bool) – Whether to ignore data that are excessively gappy

Returns:

Processed stream as obspy.core.Stream

Note:

Works in place on your data, copy before giving to this function if you want to reuse your input data.