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

Add the JWST aperture. #139

Merged
merged 6 commits into from
Aug 6, 2022
Merged

Add the JWST aperture. #139

merged 6 commits into from
Aug 6, 2022

Conversation

ehpor
Copy link
Owner

@ehpor ehpor commented Aug 5, 2022

This aperture is based on the one from WebbPSF. (FYI @mperrin)

This PR adds:

  • Irregular polygons. I'm using Matplotlib Paths for evaluating those. This uses a bounding box, where only values inside the bounding box are evaluated. This provides an ~3x performance improvement. I didn't spend a lot of time on improving upon this even more.
  • JWST aperture. This uses irregular polygons for the segments as they are slightly non-hexagonal. This is based on the pre-launch values as explained in the docstring/documentation.

This PR depends on #136, so test failures are expected until that PR is merged and this PR is rebased.

Reference apertures for test (with and without struts):

image

@ehpor ehpor added the enhancement New feature or request label Aug 5, 2022
@ehpor ehpor requested a review from syhaffert August 5, 2022 20:13
@ehpor ehpor self-assigned this Aug 5, 2022
@ehpor ehpor mentioned this pull request Aug 5, 2022
6 tasks
@codecov
Copy link

codecov bot commented Aug 5, 2022

Codecov Report

Merging #139 (2677aec) into master (349d173) will increase coverage by 0.19%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   80.45%   80.65%   +0.19%     
==========================================
  Files          94       94              
  Lines        6785     6854      +69     
==========================================
+ Hits         5459     5528      +69     
  Misses       1326     1326              
Impacted Files Coverage Δ
hcipy/aperture/__init__.py 100.00% <ø> (ø)
hcipy/aperture/generic.py 93.15% <100.00%> (+0.50%) ⬆️
hcipy/aperture/realistic.py 96.56% <100.00%> (+0.20%) ⬆️
hcipy/fourier/fourier_transform.py 94.48% <0.00%> (+1.41%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Collaborator

@syhaffert syhaffert left a comment

Choose a reason for hiding this comment

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

I have two comments for this PR.

@ehpor ehpor marked this pull request as ready for review August 5, 2022 23:40
@ehpor ehpor merged commit a778fec into master Aug 6, 2022
@ehpor ehpor deleted the feature/jwst_aperture branch August 6, 2022 00:32
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

Successfully merging this pull request may close these issues.

2 participants