def arc_by_radian(x, y, height, radian_range, thickness, gaussian_width):
<EOL>radius = height/<NUM_LIT><EOL>half_thickness = thickness/<NUM_LIT><EOL>distance_from_origin = np.sqrt(x**<NUM_LIT:2>+y**<NUM_LIT:2>)<EOL>distance_outside_outer_disk = distance_from_origin - radius - half_thickness<EOL>distance_inside_inner_disk = radius - half_thickness - distance_from_origin<EOL>ring = <NUM_LIT:1.0>-np.bitwise_xor(np.greater_equal(distance_inside_inner_disk,<NUM_LIT:0.0>),<EOL>np.greater_equal(distance_outside_outer_disk,<NUM_LIT:0.0>))<EOL>sigmasq = gaussian_width*gaussian_width<EOL>if sigmasq==<NUM_LIT:0.0>:<EOL><INDENT>inner_falloff = x*<NUM_LIT:0.0><EOL>outer_falloff = x*<NUM_LIT:0.0><EOL><DEDENT>else:<EOL><INDENT>with float_error_ignore():<EOL><INDENT>inner_falloff = np.exp(np.divide(-distance_inside_inner_disk*distance_inside_inner_disk, <NUM_LIT>*sigmasq))<EOL>outer_falloff = np.exp(np.divide(-distance_outside_outer_disk*distance_outside_outer_disk, <NUM_LIT>*sigmasq))<EOL><DEDENT><DEDENT>output_ring = np.maximum(inner_falloff,np.maximum(outer_falloff,ring))<EOL>distance_from_origin += np.where(distance_from_origin == <NUM_LIT:0.0>, <NUM_LIT>, <NUM_LIT:0>)<EOL>with float_error_ignore():<EOL><INDENT>sines = np.divide(y, distance_from_origin)<EOL>cosines = np.divide(x, distance_from_origin)<EOL>arcsines = np.arcsin(sines)<EOL><DEDENT>phase_1 = np.where(np.logical_and(sines >= <NUM_LIT:0>, cosines >= <NUM_LIT:0>), <NUM_LIT:2>*pi-arcsines, <NUM_LIT:0>)<EOL>phase_2 = np.where(np.logical_and(sines >= <NUM_LIT:0>, cosines <  <NUM_LIT:0>), pi+arcsines,   <NUM_LIT:0>)<EOL>phase_3 = np.where(np.logical_and(sines <  <NUM_LIT:0>, cosines <  <NUM_LIT:0>), pi+arcsines,   <NUM_LIT:0>)<EOL>phase_4 = np.where(np.logical_and(sines <  <NUM_LIT:0>, cosines >= <NUM_LIT:0>), -arcsines,     <NUM_LIT:0>)<EOL>arcsines = phase_1 + phase_2 + phase_3 + phase_4<EOL>if radian_range[<NUM_LIT:0>] <= radian_range[<NUM_LIT:1>]:<EOL><INDENT>return np.where(np.logical_and(arcsines >= radian_range[<NUM_LIT:0>], arcsines <= radian_range[<NUM_LIT:1>]),<EOL>output_ring, <NUM_LIT:0.0>)<EOL><DEDENT>else:<EOL><INDENT>return np.where(np.logical_or(arcsines >= radian_range[<NUM_LIT:0>], arcsines <= radian_range[<NUM_LIT:1>]),<EOL>output_ring, <NUM_LIT:0.0>)<EOL><DEDENT>
Radial arc with Gaussian fall-off after the solid ring-shaped
region with the given thickness, with shape specified by the
(start,end) radian_range.