EQTransformer.utils.hdf5_maker module¶
Created on Sat Aug 31 21:21:31 2019
@author: mostafamousavi
last update: 01/29/2021
- downsampling using the interpolation function can cause false segmentaiton error.
- This depend on your data and its sampling rate. If you kept getting this error when using multiprocessors, try using only a single cpu.
-
EQTransformer.utils.hdf5_maker.
preprocessor
(preproc_dir, mseed_dir, stations_json, overlap=0.3, n_processor=None)[source]¶ Performs preprocessing and partitions the continuous waveforms into 1-minute slices.
Parameters: - preproc_dir (str) – Path of the directory where will be located the summary files generated by preprocessor step.
- mseed_dir (str) – Path of the directory where the mseed files are located.
- stations_json (str) – Path to a JSON file containing station information.
- overlap (float, default=0.3) – If set, detection, and picking are performed in overlapping windows.
- n_processor (int, default=None) – The number of CPU processors for parallel preprocessing.
Returns: - mseed_dir_processed_hdfs/station.csv (Phase information for the associated events in hypoInverse format.)
- mseed_dir_processed_hdfs/station.hdf5 (Containes all slices and preprocessed traces.)
- preproc_dir/X_preprocessor_report.txt (A summary of processing performance.)
- preproc_dir/time_tracks.pkl (Contain the time track of the continous data and its type.)
-
EQTransformer.utils.hdf5_maker.
stationListFromMseed
(mseed_directory, station_locations, dir_json='./')[source]¶ Contributed by: Tyler Newton
Reads all miniseed files contained within subdirectories in the specified directory and generates a station_list.json file that describes the miniseed files in the correct format for EQTransformer.
Parameters: - mseed_directory (str) – String specifying the absolute path to the directory containing miniseed files. Directory must contain subdirectories of station names, which contain miniseed files in the EQTransformer format. Each component must be a seperate miniseed file, and the naming convention is GS.CA06.00.HH1__20190901T000000Z__20190902T000000Z .mseed, or more generally NETWORK.STATION.LOCATION.CHANNEL__STARTTIMESTAMP__ENDTIMESTAMP.mseed where LOCATION is optional.
- station_locations (dict) – Dictonary with station names as keys and lists of latitude, longitude, and elevation as items. For example: {“CA06”: [35.59962, -117.49268, 796.4], “CA10”: [35.56736, -117.667427, 835.9]}
- dir_json (str) – String specifying the path to the output json file.
Returns: stations_list.json
Return type: A dictionary containing information for the available stations.
Example
directory = ‘/Users/human/Downloads/eqt/examples/downloads_mseeds’ locations = {“CA06”: [35.59962, -117.49268, 796.4], “CA10”: [35.56736, -117.667427, 835.9]} stationListFromMseed(directoy, locations)