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

DEV: Prototype some zernike polynomials #188

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

carterbox
Copy link
Contributor

Purpose

Approach

Pre-Merge Checklists

Submitter

  • Write a helpfully descriptive pull request title.
  • Organize changes into logically grouped commits with descriptive commit messages.
  • Document all new functions.
  • Click 'details' on the readthedocs check to view the updated docs.
  • Write tests for new functions or explain why they are not needed.
  • Address any complaints from pep8speaks.

Reviewer

  • Actually read all of the code.
  • Run the new code yourself; the included tests should make this easy.
  • Write a summary of the changes as you understand them.
  • Thank the submitter.

Copy link
Contributor

@stevehenke stevehenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll want to use float division then round/cast back to an int. Otherwise the binomial function will overflow pretty quickly.

@carterbox
Copy link
Contributor Author

I've been playing with Zernike-basis transforms of a reconstructed probe from some real data. I'm a bit concerned that zernike polynomials are not a good basis because the number of basis vectors needed to accurately represent the probe is approaching the number of pixels in the probe.

zernike-basis

We need like degree 40 polynomials which is 861 polynomials to get moderately high details.

@stevehenke
Copy link
Contributor

stevehenke commented Feb 24, 2022

Nicely done, you got this working quickly. I like that image. I have several questions on implementation details that might help. Maybe we can discuss tomorrow. One useful thing to look at is a bar chart of the Zernike coefficients. It can provide some insight into what is going on.

@pep8speaks
Copy link

pep8speaks commented Jan 18, 2024

Hello @carterbox! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 18:81: E501 line too long (1320 > 80 characters)
Line 162:81: E501 line too long (95 > 80 characters)

Line 29:81: E501 line too long (84 > 80 characters)

Line 94:81: E501 line too long (87 > 80 characters)
Line 148:81: E501 line too long (88 > 80 characters)

Comment last updated at 2024-01-19 18:23:37 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants