Esempio n. 1
0
def read_cresis_mat(matfile):
    """ Read in a CRESIS Antarctica/Greenland MATLAB datafile as a
    `CommonOffsetGather`. """
    C = scipy.io.loadmat(matfile)
    R = RecordList(None)
    R.lats = C['Latitude']
    R.lons = C['Longitude']
    R.timestamps = C['GPS_time']
    R.sample_rate = 1.0 / np.diff(C['Time'][0]).mean() * np.ones(C['Data'].shape[0])
    return CommonOffsetGather(C['Data'], line=0, metadata=R)
Esempio n. 2
0
def read_pEKKO_as_gather(fstem):
    lmeta, tmeta, darray = read_pulseEKKO(fstem)
    metadata = RecordList(None)
    smple_rate = float(lmeta.get("NOMINAL FREQUENCY", np.nan))
    metadata.sample_rate = [smple_rate for i in range(len(tmeta))]
    return CommonOffsetGather(darray, line=0, metadata=metadata)