code: def get_shakemap_array(grid_file, uncertainty_file=None):
      
      data = _get_shakemap_array(grid_file)
      if uncertainty_file:
          data2 = _get_shakemap_array(uncertainty_file)
          # sanity check: lons and lats must be the same
          for coord in ('lon', 'lat'):
              numpy.testing.assert_equal(data[coord], data2[coord])
          # copy the stddevs from the uncertainty array
          for imt in data2['std'].dtype.names:
              data['std'][imt] = data2['std'][imt]
      return data
docs: :param grid_file: a shakemap grid file
      :param uncertainty_file: a shakemap uncertainty_file file
      :returns: array with fields lon, lat, vs30, val, std