This tool “squeezes” seismic or infrasound signals into audible frequencies and creates animated spectrograms to accompany the audio. Data are pulled from the IRIS DMC.
This project won an Honorable Mention in the 2020 SciPy John Hunter Excellence in Plotting Contest (JHEPC).
conda create -n sonify -c conda-forge colorcet ffmpeg obspy conda activate sonify
Obtain and install
git clone https://github.com/liamtoney/sonify.git cd sonify pip install -e .
python >>> from sonify import sonify
To make a movie of the seismic signal generated by a massive avalanche occurring in Alaska on 21 June 2019, sped up by a factor of 200:
from sonify import sonify from obspy import UTCDateTime sonify( network='AV', station='ILSW', channel='BHZ', starttime=UTCDateTime(2019, 6, 20, 23, 10), endtime=UTCDateTime(2019, 6, 21, 0, 30), freqmin=1, freqmax=23, speed_up_factor=200, fps=1, # Use fps=60 to fully recreate the JHEPC entry (slow to save!) spec_win_dur=8, db_lim=(-180, -130), )
The result is a 4K 1fps video file named
AV_ILSW_BHZ_200x.mp4. A screenshot
of the movie is shown at the top of this README.