def mapintensity(map, lat, lon, amp):
    """
    Calculates a grid of intensities, multiplied by the amplitude given.
    """
    grid = map.intensity(lat=lat.flatten(), lon=lon.flatten()).eval()
    grid *= amp
    grid = grid.reshape(lat.shape)
    return grid