4.7. seismo_logs¶
Functions to read log-files for seismic data to determine whether there are timing issues present. Designed to be used with the EQcorrscan package and to flag data that has more than a threshold timing issue.
Currently only written to read RefTek rt130 log-files.
Written by Calum Chamberlain, VUW 2015
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/>.
-
seismo_logs.
Flag_time_err
(phase_err, time_thresh=0.02)[source]¶ Fucntion to scan through a list of tuples of time stamps and phase errors and return a list of time stamps with timing errors above a threshold.
Parameters: time_thresh (float) – Threshold to declare a timing error for Returns: List of datetime.datetime
-
seismo_logs.
Read_RT_log
(logfile, startdate)[source]¶ Function to open and read a log-file as written by a RefTek RT130 datalogger. The information within is then scanned for timing errors above the threshold.
Parameters: - logfile (String) – The logfile to look in
- startdate – The start of the file as a date - files contain timing and the julian day, but not the year.
- time_thresh (float) – Threshold to raise a flag for the data in seconds
Returns: List of tuple of :class: datetime.datetime, float as time stamps and phase error.
-
seismo_logs.
check_all_logs
(directory, time_thresh)[source]¶ Function to check all the log-files in a directory tree for timing errors.
Parameters: - directory (String) – Directory to search within
- time_thresh (float) – Time threshold in seconds
Returns: List of :class: datetime.datetime for which timing is above threshold