crawtools.fdsn

crawtools.fdsn.get_fdsn_stations

Download and save stations from IRIS PiLAB

Command-line function: for details type pytho get_fdsn_stations.py -h

:author: Wayne Crawford (crawford@ipgp.fr), 2019 :requires: obspy>=1.1

main

main()

Main loop

Source code in crawtools/fdsn/get_fdsn_stations.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
def main():
    """Main loop"""
    args, kwargs = _get_args()
    client = Client(args.client)
    print('Getting inventory from FDSN server...')
    print(kwargs)
    inv = client.get_stations(**kwargs)
    if args.verbose:
        _print_station_details(inv)
    outfile = _make_outfilename(args)
    if args.plot:
        _plot_stations(inv, args, outfile)
    print(f'Saving to {args.format} file {outfile}')
    inv.write(outfile, format=args.format)