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

Improve documentation for linop.optics #233

Merged
merged 33 commits into from
Mar 31, 2022
Merged

Improve documentation for linop.optics #233

merged 33 commits into from
Mar 31, 2022

Conversation

bwohlberg
Copy link
Collaborator

Improve documentation for linop.optics.

@bwohlberg bwohlberg added the documentation Improvements or additions to documentation label Feb 24, 2022
@codecov
Copy link

codecov bot commented Feb 24, 2022

Codecov Report

Merging #233 (986627c) into main (4d85a93) will increase coverage by 0.10%.
The diff coverage is 100.00%.

❗ Current head 986627c differs from pull request most recent head faedb73. Consider uploading reports for the commit faedb73 to get more accurate results

@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
+ Coverage   93.83%   93.94%   +0.10%     
==========================================
  Files          50       50              
  Lines        3681     3681              
==========================================
+ Hits         3454     3458       +4     
+ Misses        227      223       -4     
Flag Coverage Δ
unittests 93.94% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
scico/_generic_operators.py 91.81% <ø> (ø)
scico/array.py 97.40% <ø> (ø)
scico/util.py 90.90% <ø> (ø)
scico/linop/optics.py 99.13% <100.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d85a93...faedb73. Read the comment docs.

k0: Illumination wavenumber, :math:`k_0`, corresponding to
:math:`2 \pi` / wavelength.
z: Propagation distance, :math:`z`.
pad_factor: The padded input shape is the input shape
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lukepfister: Can you suggest some guidance to the user on selection of the padding factor?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a complicated subject; it's the same as the choice of padding for DFT-based linear convolution but has extra physical interpretation. Would probably just leave a pointer to Chapter 5 of voelz.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Better than nothing, I guess, but I was hoping to provide some guidance that didn't require the user to first do enough reading to be able to write their own implementation!

Copy link
Contributor

Choose a reason for hiding this comment

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

🤷‍♂️ I think it is too complicated to get into the docs. Unlike a standard analysis of convolution in a signal processing class, the side lengths have physical meaning. Sometimes the size of your domain is just the size of your domain and any spatial aliasing is really indicative that you haven’t modeled the transmission channel properly (not accounting for reflections, etc)

there is a case to be made that those options should be removed entirely and the user should set up the domain side lengths to be larger.

scico/linop/optics.py Outdated Show resolved Hide resolved
@bwohlberg bwohlberg merged commit 492e172 into main Mar 31, 2022
@bwohlberg bwohlberg deleted the brendt/optics branch March 31, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants