Open patrickcleeve2 opened 2 years ago
Snippet:
def create_lens(pixel_size, diameter, coefficient, escape_path, exponent): n_pixels = utils._calculate_num_of_pixels(diameter, pixel_size) radius = diameter / 2 n_pixels_in_radius = n_pixels // 2 + 1 radius_px = np.linspace(0, radius, n_pixels_in_radius)
----- actual changes here -----
profile = -coefficient * radius_px ** exponent
profile -= np.min(profile)
-------------------------------
profile = np.append(profile, np.zeros(int(escape_path * len(profile))))
profile = np.append(np.flip(profile[1:]), profile)
profile = np.expand_dims(profile, 0).astype(np.float32)
exclusive definition with height