Esempio n. 1
0
def hk():
    parser = argparse.ArgumentParser(
        description="HK stacking for single station")
    parser.add_argument('cfg_file', type=str, help='Path to HK configure file')
    parser.add_argument(
        '-s',
        help='Path to PRFs with folder name of the station name',
        dest='station',
        type=str,
        default='')
    parser.add_argument('-H',
                        help='Range for searching best H: <hmin>/<hmax>',
                        type=str,
                        default='')
    parser.add_argument('-K',
                        help='Range for searching best K: <kmin>/<kmax>',
                        type=str,
                        default='')
    parser.add_argument('-p',
                        help='If save the figure',
                        dest='isplot',
                        action='store_true')
    arg = parser.parse_args()
    hpara = hkpara(arg.cfg_file)
    if arg.station != '':
        hpara.rfpath = arg.station
    if arg.H != '':
        hmin, hmax = [float(val) for val in arg.H.split('/')]
        hpara.hrange = np.arange(hmin, hmax, 0.1)
    if arg.K != '':
        kmin, kmax = [float(val) for val in arg.K.split('/')]
        hpara.krange = np.arange(kmin, kmax, 0.1)
    hksta(hpara, isplot=arg.isplot)
Esempio n. 2
0
def hk_sta_test():
    hpara = hkpara('/Users/xumj/Researches/YNRF/hk.cfg')
    hksta(hpara, isplot=True)