-
Notifications
You must be signed in to change notification settings - Fork 30
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 GMT and TMT pupil #114
Conversation
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
==========================================
+ Coverage 79.99% 80.29% +0.30%
==========================================
Files 94 94
Lines 6582 6700 +118
==========================================
+ Hits 5265 5380 +115
- Misses 1317 1320 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only formatting changes and one function request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the two code paths for the elliptical_aperture()
function.
I also see that the CI failed on the unrelated thin lens tests, and only for Linux with Python 3.9 for some reason. It's not incidental, since I restarted CI multiple times and it's still there. I'm not gonna merge this before that error is fixed, since that would break CI for the master branch. But that must be done in a separate PR, and this PR will need to be rebased onto master after merging that separate PR. |
Yeah we need to figure out what's wrong. I went through the changelog if python 3.9 yesterday and I couldn't find an obvious perpetrator. So I will probably have to go through it line by line. |
I created a branch to investigate this: |
Yeah, so it's definitely intermittent. The failure disappeared after a few CI test runs with the test branch. And I just reran this branch, which failed before, and it passes now. I remember seeing this test fail before, so it's something that may depend on the specific machine its running on. I'm copy pasting the relevant part of the failure below, as the runs on Azure get deleted after 30 days.
We'll come back to this once it starts failing again, but I'm now sure it's totally unrelated to what you're doing here. I'm fine with merging once you've addressed my comments above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do an admin merge tomorrow, after running the tests myself as well.
The failing test is #116 related and master is already failing because of it, so I see no reason for this to wait until after that's fixed.
Merged. Thanks! |
I needed the GMT and TMT pupil for some work I am doing at the moment. I implemented both of them. There were no clear definitions of the pupils, so I used multiple sources to come to a best version.
The TMT has the correct shape (number of segments and size) except that the spider width and the central obscuration were fitted from published images.
The GMT pupil is quite difficult to make because of the complex spider structure on the central segment. There is no description of the shadow that the spiders create. The pupil is derived from ZEMAX ray tracing as far as I know. That will make it difficult to have a precise analytical description. I based the sizes of the segments themselves on the design document of the GMT. I compared the implementation with the actual pupil that is used with the GMT Organization (GMTO). This led to minor corrections of the segment sizes and offsets. I also derived the spiders structure from the GMTO pupil file. The file was sampled with 1 cm pixel sizes. So, the current hcipy implementation is correct with errors smaller than 1 cm. The final errors on the sizes are smaller than 0.1%, which I think is an acceptable error margin.