code: def make_cube_slice(map_in, loge_bounds):
      
      # FIXME: This functionality should be moved into a slice method of
      # gammapy.maps
      axis = map_in.geom.axes[0]
      i0 = utils.val_to_edge(axis.edges, 10**loge_bounds[0])[0]
      i1 = utils.val_to_edge(axis.edges, 10**loge_bounds[1])[0]
      new_axis = map_in.geom.axes[0].slice(slice(i0, i1))
      geom = map_in.geom.to_image()
      geom = geom.to_cube([new_axis])
      map_out = WcsNDMap(geom, map_in.data[slice(i0, i1), ...].copy())
      return map_out
docs: Extract a slice from a map cube object.