2015-03-19 14:32:50 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
Created Mar 2015
|
|
|
|
Function to derive first motion (polarity) for given phase onset based on zero crossings.
|
|
|
|
|
2015-04-02 15:45:38 +02:00
|
|
|
:author: MAGS2 EP3 working group / Ludger Kueperkoch
|
2015-03-19 14:32:50 +01:00
|
|
|
"""
|
|
|
|
|
2015-04-02 15:45:38 +02:00
|
|
|
import argparse
|
|
|
|
import obspy
|
|
|
|
from pylot.core.pick.utils import fmpicker
|
2015-03-19 14:32:50 +01:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2015-04-02 15:45:38 +02:00
|
|
|
parser = argparse.ArgumentParser()
|
2016-03-30 08:14:58 +02:00
|
|
|
parser.add_argument('--Xraw', type=obspy.core.stream.Stream,
|
|
|
|
help='unfiltered time series (seismogram) read with obspy module read')
|
|
|
|
parser.add_argument('--Xfilt', type=obspy.core.stream.Stream,
|
|
|
|
help='filtered time series (seismogram) read with obspy module read')
|
2015-04-02 15:45:38 +02:00
|
|
|
parser.add_argument('--pickwin', type=float, help='length of pick window [s] for first motion determination')
|
|
|
|
parser.add_argument('--Pick', type=float, help='Onset time of most likely pick')
|
|
|
|
parser.add_argument('--iplot', type=int, help='if set, figure no. iplot occurs')
|
|
|
|
args = parser.parse_args()
|
|
|
|
fmpicker(args.Xraw, args.Xfilt, args.pickwin, args.Pick, args.iplot)
|