Exemplo n.º 1
0
def get_test_data():
    from HinetPy import Client
    client = Client(username, password)
    client.select_stations('0101', ['N.NGUH', 'N.NNMH'])
    client.get_continuous_waveform('0101', '2017-01-01T00:00', 3, outdir=path,
                        cleanup=False)
    for file in glob.glob("20170101000?0101VM.cnt"):
        os.rename(file, os.path.join(path, file))
Exemplo n.º 2
0
def get_test_data():
    from HinetPy import Client
    client = Client(username, password)
    client.select_stations('0101', ['N.NGUH', 'N.NNMH'])
    client.get_waveform('0101',
                        '2017-01-01T00:00',
                        3,
                        outdir=path,
                        cleanup=False)
    for file in glob.glob("20170101000?0101VM.cnt"):
        os.rename(file, os.path.join(path, file))
Exemplo n.º 3
0
def get_test_data():
    from HinetPy import Client

    client = Client(username, password)
    client.select_stations("0101", ["N.NGUH", "N.NNMH"])
    client.get_continuous_waveform("0101",
                                   "2017-01-01T00:00",
                                   3,
                                   outdir=path,
                                   cleanup=False)
    for file in glob.glob("20170101000?0101VM.cnt"):
        os.rename(file, os.path.join(path, file))
Exemplo n.º 4
0
def client():
    client = Client(username, password)
    client.select_stations('0101', ['N.AAKH', 'N.ABNH'])
    yield client
    client.select_stations('0101')
from HinetPy import Client, win32
from datetime import datetime
from shutil import copy2
client = Client("UserName",
                "password",
                sleep_time_in_seconds=60,
                max_sleep_count=2)
client.select_stations('0101', ['N.KKWH', 'N.RZTH', 'N.KAKH'])
print(client.get_selected_stations('0101'))
events = [line.rstrip('\n') for line in open("eventfile.txt")]
for starttime in events:
    print(starttime)
    outdir = starttime
    data, ctable = client.get_waveform('0101', starttime, 5, outdir=outdir)
    win32.extract_sac(data, ctable, outdir=outdir, with_pz=True)
    copy2(starttime + "_arr.txt", "./" + outdir)
Exemplo n.º 6
0
def client():
    client = Client(username, password)
    client.select_stations("0101", ["N.AAKH", "N.ABNH"])
    yield client
    client.select_stations("0101")