6.2.2.1.4. eqcorrscan.utils.catalog_to_dd.write_correlations

eqcorrscan.utils.catalog_to_dd.write_correlations(catalog, stream_dict, extract_len, pre_pick, shift_len, event_id_mapper=None, lowcut=1.0, highcut=10.0, max_sep=8, min_link=8, min_cc=0.0, interpolate=False, all_horiz=False, max_workers=None, parallel_process=False, *args, **kwargs)[source]

Write a dt.cc file for hypoDD input for a given list of events.

Takes an input list of events and computes pick refinements by correlation. Outputs a single files, dt.cc file with weights as the square of the cross-correlation.

Parameters:
  • catalog (obspy.core.event.Catalog) – Catalog of events to get differential times for
  • event_id_mapper (dict) – Dictionary mapping event resource id to an integer event id for hypoDD. If this is None, or missing events then the dictionary will be updated to include appropriate event-ids. This should be of the form {event.resource_id.id: integer_id}
  • stream_dict (dict) – Dictionary of streams keyed by event-id (the event.resource_id.id, NOT the hypoDD event-id)
  • extract_len (float) – Length in seconds to extract around the pick
  • pre_pick (float) – Time before the pick to start the correlation window
  • shift_len (float) – Time to allow pick to vary in seconds
  • lowcut (float) – Lowcut in Hz - set to None to apply no lowcut
  • highcut (float) – Highcut in Hz - set to None to apply no highcut
  • max_sep (float) – Maximum separation between event pairs in km
  • min_link (int) – Minimum links for an event to be paired
  • min_cc (float) – Threshold to include cross-correlation results.
  • interpolate (bool) – Whether to interpolate correlations or not. Allows subsample accuracy
  • max_workers (int) – Maximum number of workers for parallel processing. If None then all threads will be used.
  • parallel_process (bool) – Whether to process streams in parallel or not. Experimental, may use too much memory.
Return type:

dict

Returns:

event_id_mapper

Note

You can provide processed waveforms, or let this function filter your data for you. Filtering is undertaken by detrending and bandpassing with a 8th order zerophase butterworth filter.