-
Notifications
You must be signed in to change notification settings - Fork 8
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
added kwargs for psf.convolve #278
Conversation
This looks good but a few small tweaks are needed.
|
This good for the test? assert isinstance(psf.convolve(np.ones((2, 2)), method="fft"), PSF) |
Yep more than happy for that as the test |
src/dLux/psfs.py
Outdated
@@ -79,21 +79,26 @@ def downsample(self: PSF, n: int) -> PSF: | |||
""" | |||
return self.set("data", dlu.downsample(self.data, n, mean=False)) | |||
|
|||
def convolve(self: PSF, other: Array) -> PSF: | |||
def convolve(self: PSF, other: Array, method="auto") -> PSF: |
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.
Last tweak - type hint for the method input: method: str="auto")
Last thing is the type hint for the method argument |
I'm trying my best I promise |
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.
Looks good
Allows for
"fft"
convolution method which is faster for medium-to-large arrays (thanks @ataras2)