5.9.1.5. eqcorrscan.utils.sfile_util.eventtosfile

eqcorrscan.utils.sfile_util.eventtosfile(event, userID, evtype, outdir, wavefiles, explosion=False, overwrite=False)[source]

Function to take an obspy.event and write the relevant information to a nordic formatted s-file

Parameters:
  • event (obspy.event.core.Event) – A single obspy event
  • userID (str) – Up to 4 character user ID
  • evtype (str) – Single character string to describe the event, either L, R or D.
  • outdir (str) – Path to directory to write to
  • wavefiles (list of str) – Waveforms to associate the sfile with
  • explosion (bool) – Note if the event is an explosion, will be marked by an E.
  • overwrite (bool) – force to overwrite old files, defaults to False
Returns:

str: name of sfile written

Note

Seisan can find waveforms either by their relative or absolute path, or by looking for the file recursiuvely in directories within the WAV directory in your seisan install. Because all lines need to be less than 79 charecters long (fortran hangover) in the s-files, you will need to determine whether the full-path is okay or not.