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

DM-43849: Create spatiallySampledMetric to visualize the diffim kernel #328

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

BrunoSanchez
Copy link
Contributor

No description provided.

Copy link
Contributor

@isullivan isullivan left a comment

Choose a reason for hiding this comment

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

Looks good! I had a few minor comments for clarity.

Comment on lines 859 to 861
This is following Robert's code at
https://lsstc.slack.com/archives/C2JPMCF5X/p1715784207956889
https://lsstc.slack.com/archives/C2JPMCF5X/p1715865918632319
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should have references to Slack conversations in code.

@@ -853,6 +853,64 @@ def detectDipoleSources(self, doMerge=True, diffim=None, detectSigma=5.5, grow=3
return detectTask, schema


def getKernelCenterDisplacement(kernel, x, y, im=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure to also add this function to __all__


# obtain the kernel image
hsize = kernel.getWidth()//2
krnl_sum = kernel.computeImage(im, doNormalize=False, x=x, y=y)
Copy link
Contributor

Choose a reason for hiding this comment

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

Here and elsewhere spell out kernel_sum

The x position on the detector to evaluate the kernel
y : `float`
The y position on the detector to evaluate the kernel
im : `~lsst.afw.image._image.ImageD`
Copy link
Contributor

Choose a reason for hiding this comment

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

Here and elsewhere spell out image

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, omit the _image in the type definition, it should just be ~lsst.afw.image.Image

center of the extraction of the kernel
dy : `float`
The displacement of the kernel averaged peak, with respect to the
center of the extraction of the kernel
Copy link
Contributor

Choose a reason for hiding this comment

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

add pos_angle and length to the return definition

@isullivan isullivan merged commit f907d66 into main Jun 20, 2024
2 checks passed
@isullivan isullivan deleted the tickets/DM-43849 branch June 20, 2024 01: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
Development

Successfully merging this pull request may close these issues.

2 participants