def read_process_data(lst): stadata = SACStation(lst) idx = np.argsort(stadata.bazi) stadata.event = stadata.event[idx] stadata.bazi = stadata.bazi[idx] stadata.datar = stadata.datar[idx] stadata.datat = stadata.datat[idx] time_axis = np.arange(stadata.RFlength) * stadata.sampling - stadata.shift return stadata, time_axis
def read_process_data(path, resamp_dt=0.1): stadata = SACStation(path) stadata.resample(resamp_dt) idx = np.argsort(stadata.bazi) stadata.event = stadata.event[idx] stadata.bazi = stadata.bazi[idx] stadata.datar = stadata.datar[idx] stadata.datat = stadata.datat[idx] return stadata