sonify module¶
-
sonify.
sonify
(network, station, channel, starttime, endtime, location='*', freqmin=None, freqmax=None, speed_up_factor=200, fps=1, resolution='4K', output_dir=None, spec_win_dur=5, db_lim='smart', log=False, utc_offset=None)[source]¶ Produce an animated spectrogram with a soundtrack derived from sped-up seismic or infrasound data.
Parameters: - network (str) – SEED network code
- station (str) – SEED station code
- channel (str) – SEED channel code
- starttime (
UTCDateTime
) – Start time of animation (UTC) - endtime (
UTCDateTime
) – End time of animation (UTC) - location (str) – SEED location code
- freqmin (int or float) – Lower bandpass corner [Hz] (defaults to 20 Hz / speed_up_factor)
- freqmax (int or float) – Upper bandpass corner [Hz] (defaults to 20,000 Hz / speed_up_factor or the Nyquist frequency, whichever is smaller)
- speed_up_factor (int) – Factor by which to speed up the waveform data (higher values = higher pitches)
- fps (int) – Frames per second of output video
- resolution (str) – Resolution of output video; one of ‘crude’ (640 \(\times\) 360), ‘720p’ (1280 \(\times\) 720), ‘1080p’ (1920 \(\times\) 1080), ‘2K’ (2560 \(\times\) 1440), or ‘4K’ (3840 \(\times\) 2160)
- output_dir (str or
Path
) – Directory where output video should be saved (defaults tocwd()
) - spec_win_dur (int or float) – Duration of spectrogram window [s]
- db_lim (tuple or str) – Tuple defining min and max colormap cutoffs [dB], ‘smart’ for a sensible automatic choice, or None for no clipping
- log (bool) – If True, use log scaling for \(y\)-axis of spectrogram
- utc_offset (int or float) – If not None, convert UTC time to local time using this offset [hours] before plotting