Skip to content

Latest commit

 

History

History
executable file
·
82 lines (58 loc) · 1.76 KB

README.rst

File metadata and controls

executable file
·
82 lines (58 loc) · 1.76 KB

sonify

badge

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.

screenshot

acknowledgements:

This work was originally authored by Liam Toney: sea: https://github.com/liamtoney/sonify

Quickstart

  1. Prepare environment

    conda create -n sonify -c conda-forge colorcet ffmpeg obspy
    conda activate sonify
    
  2. Obtain and install

    git clone https://github.com/Donavin97/SeismicSonify.git
    cd SeismicSonify
    pip install -e .
    
  3. Run

    python
    >>> from sonify import sonify

Example

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.

Documentation

API documentation for the module is available here.