code: def within_depth_range(self, lower_depth=None, upper_depth=None):
          '''
          Selects events within a specified depth range
  
          :param float lower_depth:
              Lower depth for consideration
  
          :param float upper_depth:
              Upper depth for consideration
  
          :returns:
              Instance of :class:`openquake.hmtk.seismicity.catalogue.Catalogue`
              containing only selected events
          '''
          if not lower_depth:
              if not upper_depth:
                  # No limiting depths defined - so return entire catalogue!
                  return self.catalogue
              else:
                  lower_depth = np.inf
  
          if not upper_depth:
              upper_depth = 0.0
  
          is_valid = np.logical_and(self.catalogue.data['depth'] >= upper_depth,
                                    self.catalogue.data['depth'] < lower_depth)
          return self.select_catalogue(is_validf within_depth_range(self, lower_depth=None, upper_depth=None):
          '''
          Selects events within a specified depth range
  
          :param float lower_depth:
              Lower depth for consideration
  
          :param float upper_depth:
              Upper depth for consideration
  
          :returns:
              Instance of :class:`openquake.hmtk.seismicity.catalogue.Catalogue`
              containing only selected events
          '''
          if not lower_depth:
              if not upper_depth:
                  # No limiting depths defined - so return entire catalogue!
                  return self.catalogue
              else:
                  lower_depth = np.inf
  
          if not upper_depth:
              upper_depth = 0.0
  
          is_valid = np.logical_and(self.catalogue.data['depth'] >= upper_depth,
                                    self.catalogue.data['depth'] < lower_depth)
          return self.select_catalogue(is_valid)
docs: Selects events within a specified depth range
  
          :param float lower_depth:
              Lower depth for consideration
  
          :param float upper_depth:
              Upper depth for consideration
  
          :returns:
              Instance of :class:`openquake.hmtk.seismicity.catalogue.Catalogue`
              containing only selected events