def disk(x, y, height, gaussian_width):
disk_radius = height/<NUM_LIT><EOL>distance_from_origin = np.sqrt(x**<NUM_LIT:2>+y**<NUM_LIT:2>)<EOL>distance_outside_disk = distance_from_origin - disk_radius<EOL>sigmasq = gaussian_width*gaussian_width<EOL>if sigmasq==<NUM_LIT:0.0>:<EOL><INDENT>falloff = x*<NUM_LIT:0.0><EOL><DEDENT>else:<EOL><INDENT>with float_error_ignore():<EOL><INDENT>falloff = np.exp(np.divide(-distance_outside_disk*distance_outside_disk,<EOL><NUM_LIT:2>*sigmasq))<EOL><DEDENT><DEDENT>return np.where(distance_outside_disk<=<NUM_LIT:0>,<NUM_LIT:1.0>,falloff)<EOL>
Circular disk with Gaussian fall-off after the solid central region.