Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
DM-41994: Use galsim primitives vs higher level interface. #48
DM-41994: Use galsim primitives vs higher level interface. #48
Changes from all commits
ddf09c7
c2874cf
ec405c5
8843d03
fe7a5ef
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Even this isn't really guaranteed to be stable, but it should be very close to equivalent to
image.FindAdaptiveMom(...)
.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.
So there was actually a significant amount of time spent in
_convertMask
which was some of the motivation to use the primitive. If there was an officially supported way of bypassing this I think we could use the official API.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.
Oh right. The direct Python API calls the
_convertMask
function which has a bunch ofgalsim.Image
instantiations making it slow as well. I could open an issue on the GalSim repo if there's no immediate supported API.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.
That's fair. What mask do you use? None? Or something real?
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.
We supply a value for
badpix
that masks some pixels, so very much real. I think the overheads there can be reduced by usinggalsim._ImageI
instead ofgalsim.ImageI
in_convertMask
.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.
GalSim-developers/GalSim#1264
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.
Right now, this is the only sticking point I believe. Either we use the
FindAdaptiveMom
call or have a TODO comment here referring to a ticket that should replace it withFindAdaptiveMom
as soon as we have a version of GalSim with the above issue implemented.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.
Capturing the observed_shape in a variable is great, because getting this attribute is expensive. It constructs a
Shear
object, with overheads, each timeobserved_shape
is accessed from aShapeData
object.