Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixel Size Calculator #1

Open
DavidDierickx opened this issue Nov 10, 2022 · 0 comments
Open

Pixel Size Calculator #1

DavidDierickx opened this issue Nov 10, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@DavidDierickx
Copy link
Contributor

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}')

@DavidDierickx DavidDierickx added the enhancement New feature or request label Nov 10, 2022
@patrickcleeve2 patrickcleeve2 self-assigned this Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants