5.17.1.4. eqcorrscan.utils.sfile_util.populatesfile

eqcorrscan.utils.sfile_util.populatesfile(sfile, event)[source]

Populate a blank nordic format S-file with pick information. arguments required are the filename of the blank s-file and the picks where picks is a dictionary of picks including station, channel, impulsivity, phase, weight, polarity, time, coda, amplitude, peri, azimuth, velocity, SNR, azimuth residual, Time-residual, final weight, epicentral distance & azimuth from event to station.

This is a full pick line information from the seisan manual, P. 341

Parameters:
  • sfile (str) – Path to S-file to populate, must have a header already
  • picks – A single event to be written to a single S-file.
>>> from eqcorrscan.utils.sfile_util import blanksfile, readpicks
>>> sfile = blanksfile('eqcorrscan/tests/test_data/WAV/TEST_/' +
...                    '2013-09-01-0410-35.DFDPC_024_00', 'L', 'TEST',
...                    '.', overwrite=True)
Written s-file: ./01-0410-35L.S201309
>>> # Poor example, but we need an event, so we will use one we know is
>>> # associated with the event...
>>> event = readpicks('eqcorrscan/tests/test_data/REA/TEST_/' +
...                   '01-0411-15L.S201309')
>>> populatesfile(sfile, event)