예제 #1
0
    pick_path = path.join('record_picks', recfile)

    # check if pick file exists
    if not path.isfile(pick_path):

        # fix stream channels
        fix_stream_channels(path.join('iris_dump', mseedfile))

        # read mseed
        #st = read(path.join('mseed_dump', mseedfile))
        st = read(path.join('iris_dump', mseedfile))

        # remove junk channels
        cannotMerge = False
        try:
            st = remove_low_sample_data(st)
        except:
            cannotMerge = True

        ###############################################################################
        # associate event and get fe
        ###############################################################################

        evFound = False
        for evnum, ev in enumerate(evdict):
            #ev['datetime'] = UTCDateTime(1996,9,25,7,49,56)
            if st[0].stats.starttime > UTCDateTime(ev['datetime']-timedelta(seconds=601)) \
               and st[0].stats.starttime < UTCDateTime(ev['datetime']+timedelta(seconds=300)):
                evFound = True
                eqlo = ev['lon']
                eqla = ev['lat']
예제 #2
0
 if review_wave == True:
    # reopen for appending
    f = open('mseed_qa.csv', 'a')
    
    st = read(path.join('mseed_dump', msf))
    st_filt = st.copy()
    
    print(msf)
    #st.plot()
    
    fig = plt.figure(1, figsize=(13,9))
    
    i = 0
    jj = []
    plt.suptitle(msf)
    st_filt = remove_low_sample_data(st_filt)
    freqmax = st_filt[0].stats.sampling_rate * 0.45
    st_filt = st_filt.filter('bandpass', freqmin=0.1, freqmax=freqmax)
    for j, tr in enumerate(st_filt):
        if tr.stats.channel[1] != 'N' and len(st_filt) > 3:
            i += 1
            ax = plt.subplot(3, 1, i)
            
            idxs = range(0, len(tr.data))
            plt.plot(idxs, tr.data, '-', lw=0.5)
            plt.title(tr.stats.channel)
            jj.append(j)
            
    # select
    idx1, idx2 = plt.ginput(2)
    plt.close()