5.7.1.2. eqcorrscan.utils.mag_calc.amp_pick_sfile¶
-
eqcorrscan.utils.mag_calc.
amp_pick_sfile
(sfile, datapath, respdir, chans=[u'Z'], var_wintype=True, winlen=0.9, pre_pick=0.2, pre_filt=True, lowcut=1.0, highcut=20.0, corners=4)[source]¶ Function to pick amplitudes for local magnitudes from NORDIC s-files.
Reads information from a SEISAN s-file, load the data and the picks, cut the data for the channels given around the S-window, simulate a Wood Anderson seismometer, then pick the maximum peak-to-trough amplitude.
Output will be put into a mag_calc.out file which will be in full S-file format and can be copied to a REA database.
Parameters: - sfile (str) Path to NORDIC format s-file
- datapath (str) Path to the waveform files - usually the path to the WAV directory
- respdir (str) Path to the response information directory
- chans (list) List of the channels to pick on, defaults to [‘Z’] - should just be the orientations, e.g. Z,1,2,N,E
- var_wintype (bool) If True, the winlen will be multiplied by the P-S time if both P and S picks are available, otherwise it will be multiplied by the hypocentral distance*0.34 - derived using a p-s ratio of 1.68 and S-velocity of 1.5km/s to give a large window, defaults to True
- winlen (float) Length of window, see above parameter, if var_wintype is False then this will be in seconds, otherwise it is the multiplier to the p-s time, defaults to 0.5.
- pre_pick (float) Time before the s-pick to start the cut window, defaults to 0.2
- pre_filt (bool) To apply a pre-filter or not, defaults to True
- lowcut (float) Lowcut in Hz for the pre-filter, defaults to 1.0
- highcut (float) Highcut in Hz for the pre-filter, defaults to 20.0
- corners (int) Number of corners to use in the pre-filter
Returns: obspy.core.event