Circular disk with Gaussian fall-off after the solid central region.

def disk(x, y, height, gaussian_width):
    """
    Circular disk with Gaussian fall-off after the solid central region.
    """
    disk_radius = height/2.0

    distance_from_origin = np.sqrt(x**2+y**2)
    distance_outside_disk = distance_from_origin - disk_radius
    sigmasq = gaussian_width*gaussian_width

    if sigmasq==0.0:
        falloff = x*0.0
    else:
        with float_error_ignore():
            falloff = np.exp(np.divide(-distance_outside_disk*distance_outside_disk,
                                  2*sigmasq))

    return np.where(distance_outside_disk<=0,1.0,falloff)