base_url=options.fdsn_base_url, timeout=options.fdsn_timeout, user=options.fdsn_user, password=options.fdsn_password, ) for id in options.fdsn_ids.split(","): net, sta, loc, cha = id.split(".") net_sta = "%s.%s" % (net, sta) if net_sta in sta_fetched: print "%s skipped! (Was already retrieved)" % net_sta.ljust(8) continue try: sys.stdout.write("\r%s ..." % net_sta.ljust(8)) sys.stdout.flush() st = client.get_waveforms( network=net, station=sta, location=loc, channel=cha, starttime=t1, endtime=t2, attach_response=True ) sta_fetched.add(net_sta) sys.stdout.write("\r%s fetched.\n" % net_sta.ljust(8)) sys.stdout.flush() except Exception, e: sys.stdout.write("\r%s skipped! (Server replied: %s)\n" % (net_sta.ljust(8), e)) sys.stdout.flush() continue for tr in st: tr.stats["_format"] = "FDSN" try: tr.stats.paz = tr.stats.response.get_paz_dict() except: tr.stats.paz = _get_paz_dict_from_response(tr.stats.response) streams.append(st)