receiver_functions.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:seis_tools 作者: romaguir 项目源码 文件源码
def plot_pierce_points(self,depth=410.0,ax='None'):
      '''
      Plots pierce points for a given depth.  If an axes object is supplied
      as an argument it will use it for the plot.  Otherwise, a new axes 
      object is created.
      '''

      if ax == 'None':
         m = Basemap(llcrnrlon=0.0,llcrnrlat=-35.0,urcrnrlon=120.0,urcrnrlat=35.0)
      else:
         m = ax

      m.drawmapboundary()
      m.drawcoastlines()
      found_points = False

      for i in range(0,len(self.pierce_dict)):
         if self.pierce_dict[i]['depth'] == depth:
            x,y = m(self.pierce_dict[i]['lon'],self.pierce_dict[i]['lat'])
            found_points = True

      if found_points == True:
         m.scatter(x,y,50,marker='+',color='r')
      else:
         print "no pierce points found for the given depth"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号