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

Tickets/dm 1218 #8

Merged
merged 5 commits into from Jan 27, 2015
Merged

Tickets/dm 1218 #8

merged 5 commits into from Jan 27, 2015

Conversation

jdswinbank
Copy link
Contributor

No description provided.

This guarantees that BasePlugin instances have the attributes set there
without having to assume anything about their subclasses.
@@ -106,7 +107,7 @@ def run(display=False):
xy = s.getCentroid()
ds9.dot('+', *xy, ctype=ds9.CYAN if s.get("flags_negative") else ds9.GREEN, frame=frame)
ds9.dot(s.getShape(), *xy, ctype=ds9.RED, frame=frame)
ds9.dot('o', *xy, size=config.plugins["base_SincFlux"].radius2, ctype=ds9.YELLOW, frame=frame)
ds9.dot('o', *xy, size=config.plugins["base_CircularApertureFlux"].radii[0], ctype=ds9.YELLOW, frame=frame)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is too long per the coding standards.

Copy link
Member

Choose a reason for hiding this comment

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

Fixed.

This removes some code duplication at the expense of a bit of opaque
argument-forwarding.  It'll become more important shortly, as the
now-shared code is about to grow.
This changes aperture flux outputs to look more like an array-of-structs
rather than a struct of array, e.g. "base_CircularApertureFlux_[0,1,2]_flux"
instead of "base_CircularApertureFlux_flux_[0,1,2]".  This makes it
its field suffixes compatible with the slot mechanism.
Now that it can participate in slots, CircularApertureFlux can do everything
NaiveFlux and SincFlux once did, so there's no need for all that code duplication
and boilerplate.
A "using" declaration to un-shadow the multiple overloads of measure() doesn't
appear to work with Swig, so we move those methods to protected to make
Swig continue to call throught the base class interface, which works fine.
@mjuric mjuric merged commit 9dd3f51 into master Jan 27, 2015
@ktlim ktlim deleted the tickets/DM-1218 branch August 25, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants