weixin_39714835
weixin_39714835
2020-11-20 19:57

Events not plotting on dayplot

On Windows, python 2.7, obspy 1.0.1.

To get events to print on a dayploy I had to edit these lines in imaging/waveform/plot_day:


486        events = kwargs.get("events", []) 
487         # Potentially download some events with the help of obspy.clients.fdsn. 
488         if "min_magnitude" in events: 
489             try: 
490                 from obspy.clients.fdsn import Client 
491                 c = Client("EMSC") 
492                 events = c.get_events(starttime=self.starttime, 
493                                       endtime=self.endtime, 
494                                       minmagnitude=events["min_magnitude"]) 
495             except Exception as e: 
496                 events = None 
497                 msg = "Could not download the events because of '%s: %s'." % \ 
498                     (e.__class__.__name__, str(e)) 
499                 warnings.warn(msg) 
500         if events: 

to


486        events = self.kwargs.get("events", []) 
500         if not events: 

May be a bug, or may be the user here.

该提问来源于开源项目:obspy/obspy

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

10条回答

为你推荐

换一换