-
Notifications
You must be signed in to change notification settings - Fork 34
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
Initialize CircularAperture from other apertures #393
Initialize CircularAperture from other apertures #393
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
==========================================
+ Coverage 77.52% 77.55% +0.03%
==========================================
Files 81 81
Lines 7096 7106 +10
==========================================
+ Hits 5501 5511 +10
Misses 1595 1595 ☔ View full report in Codecov by Sentry. |
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.
All seems to check out. Tested documentation examples on OSX and works fine.
Thanks! |
The
Afrho
andEfrho
classes can take aQuantity
or anAperture
as an input for the photometric aperture radius, and they will convert it to a coma equivalent radius, as needed. While writing new code for PR #376, I needed to repeat that same Quantity/Aperture conversion code, and also repeat tests for each case. This seemed like an opportunity for an enhancement that could simplify the code.Each of the
Aperture
classes can be converted to an effective circular aperture based on the assumption of a 1/rho coma. This PR enables any of theAperture
classes to directly initialize aCircularAperture
object using that coma equivalent aperture conversion:Or, a radius may be given as a
Quantity
, in which case the "coma equivalent" radius is the same value:With this change, the
Afrho
,Efrho
, and any similar code that needs the effective aperture radius for a 1/rho coma can pass their input parameters toCircularAperture
without the need to test forQuantity
vs.Aperture
input, and the developers do not need to be concerned with the conversions for testing coverage: