catalogue2DD¶
Module written by Calum Chamberlain as part of the EQcorrscan package.
This module contains functions to convert a seisan catalogue to files ready for relocation in hypoDD - it will generate both a catalogue (dt.ct) file, event file (event.dat), station information file (station.dat), and a correlation oiutput file correlated every event in the catalogue with every other event to optimize the picks (dt.cc).
The correlation routine relies on obspy’s xcorrPickCorrection function from the obspy.signal.cross_correlation module. This function optimizes picks to better than sample accuracy by interpolating the correlation function and finding the maximum of this rather than the true maximum correlation value. The output from this function is stored in the dt.cc file.
Information for the station.dat file is read from SEISAN’s STATION0.HYP file
Earthquake picks and locations are taken from the catalogued s-files - these must be pre-located before entering this routine as origin times and hypocentre locations are needed for event.dat files.
Copyright 2015 Calum Chamberlain
This file is part of EQcorrscan.
EQcorrscan is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
EQcorrscan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with EQcorrscan. If not, see <http://www.gnu.org/licenses/>.
-
catalogue2DD.
_av_weight
(W1, W2)[source]¶ Function to convert from two seisan weights (0-4) to one hypoDD weight(0-1)
Parameters: Returns: str
-
catalogue2DD.
_cc_round
(num, dp)[source]¶ Convenience function to take a float and round it to dp padding with zeros to return a string
Parameters: Returns: string
-
catalogue2DD.
readSTATION0
(path, stations)[source]¶ Function to read the STATION0.HYP file on the path given. Outputs written in station.dat file.
Parameters: - path (String) – Path to the STATION0.HYP file
- station (List) – Stations to look for
Returns: List of tuples of station, lat, long, elevation
-
catalogue2DD.
write_catalogue
(event_list, max_sep=1, min_link=8)[source]¶ Function to write the dt.ct file needed by hypoDD - takes input event list from write_event as a list of tuples of event id and sfile. It will read the pick information from the seisan formated s-file using the Sfile_util utilities.
Parameters: Returns: List stations
-
catalogue2DD.
write_correlations
(event_list, wavbase, extract_len, pre_pick, shift_len, lowcut=1.0, highcut=10.0, max_sep=4, min_link=8, coh_thresh=0.0)[source]¶ Function to write a dt.cc file for hypoDD input - takes an input list of events and computes pick refienements by correlation.
Note that this is NOT fast.
Parameters: - event_list (List of tuple) – List of tuples of event_id (int) and sfile (String)
- wavbase (string) – Path to the seisan wave directory that the wavefiles in the S-files are stored
- extract_len (float) – Length in seconds to extract around the pick
- pre_pick (float) – Time before the pick to start the correclation window
- shift_len (float) – Time to allow pick to vary
- lowcut (float) – Lowcut in Hz - default=1.0
- highcut (float) – Highcut in Hz - deafult=10.0
- max_sep (float) – Maximum seperation between event pairs in km
- min_link (int) – Minimum links for an event to be paired