In order to generate synthetic seismic waveforms, call the following on the command line and follow the instructions:
python generate_waveforms.pyCreate 32 samples using command line arguments:
python generate_waveforms.py \
--hypocentral_distance 531 \
--is_shallow_crustal 1 \
--magnitude 6 \
--vs30 154 \
--num_samples 32 \
--output waveforms.h5 \
--edm_checkpoint ../weights/edm.ckpt \
--autoencoder_checkpoint ../weights/autoencoder.ckptCreate samples using a CSV file:
python generate_waveforms.py \
--csv [japan.csv | little_japan.csv] \
--output waveforms.h5 \
--edm_checkpoint ../weights/edm.ckpt \
--autoencoder_checkpoint ../weights/autoencoder.ckptTo convert the generated waveforms.h5 file into SeisBench format, first prepare the station metadata consisting of a list of columns in .csv format, similar to the following figure:
Then, run the write_to_seisbench.py script by:
- Inspecting the command:
python write_to_seisbench.py -h
- Running the command:
python write_to_seisbench.py \
<path_to_station_metadata>/station_metadata.csv \
<path_to_gwm>/waveforms.h5 \
--origin_time "2024-02-01T00:00:00.0" \
--hypocenter 12 10 4 \
--magnitude 6 \
--num_realizations 10 \
--trace_sampling_rate 100 \
<path_to_seisbench>/events