-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Wrote a quick function to get the appropriate pixel size for a given max number of pixels and array. This should allow us to always stay under the max until we obtain a better way of defining the patterns.
import numpy as np
n = 3.5e6
z = 2
w = 400e-6
l = 250e-6
e = 0.2
def get_pixel_size(n, z, w, l, e):
x = np.sqrt((n/z)/(w*(l*(1+e))))
return 1/x
pixel_size = get_pixel_size(n, z, w, l, e)
print(f'Pixel size (nm): {pixel_size*1e9}')
print(f'Number of pixels in w: {w/pixel_size}')
print(f'Number of pixels in l: {l/pixel_size}')
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request