lsst.ip.isr gf5f1c85443+e8e946ae08
Loading...
Searching...
No Matches
lsst.ip.isr.electrostaticBrighterFatter.CustomFFTConvolution Class Reference
Inheritance diagram for lsst.ip.isr.electrostaticBrighterFatter.CustomFFTConvolution:

Public Member Functions

 __init__ (self, im, kernel, threads=1)
 
 __call__ (self, im, kernels)
 

Public Attributes

 fftImageObj = pyfftw.builders.rfftn(im, s=shape, threads=threads)
 
 fftKernelObj = pyfftw.builders.rfftn(kernel, s=shape, threads=threads)
 
 ifftObj
 

Detailed Description

A class that performs image convolutions in Fourier space, using pyfftw.
The constructor takes images as arguments and creates the FFTW plans.
The convolutions are performed by the __call__ routine.
This is faster than scipy.signal.fftconvolve, and it saves some transforms
by allowing the same image to be convolved with several kernels.
pyfftw does not accommodate float32 images, so everything
should be double precision.

Code adaped from :
https://stackoverflow.com/questions/14786920/convolution-of-two-three-dimensional-arrays-with-padding-on-one-side-too-slow
Code posted by Henry Gomersal

Definition at line 501 of file electrostaticBrighterFatter.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.isr.electrostaticBrighterFatter.CustomFFTConvolution.__init__ ( self,
im,
kernel,
threads = 1 )

Definition at line 515 of file electrostaticBrighterFatter.py.

Member Function Documentation

◆ __call__()

lsst.ip.isr.electrostaticBrighterFatter.CustomFFTConvolution.__call__ ( self,
im,
kernels )
Perform the convolution and trim the result to the
size of the input image. If kernels is a list, then
the routine returns a list of corresponding
convolutions.

Definition at line 532 of file electrostaticBrighterFatter.py.

Member Data Documentation

◆ fftImageObj

lsst.ip.isr.electrostaticBrighterFatter.CustomFFTConvolution.fftImageObj = pyfftw.builders.rfftn(im, s=shape, threads=threads)

Definition at line 524 of file electrostaticBrighterFatter.py.

◆ fftKernelObj

lsst.ip.isr.electrostaticBrighterFatter.CustomFFTConvolution.fftKernelObj = pyfftw.builders.rfftn(kernel, s=shape, threads=threads)

Definition at line 525 of file electrostaticBrighterFatter.py.

◆ ifftObj

lsst.ip.isr.electrostaticBrighterFatter.CustomFFTConvolution.ifftObj
Initial value:
= pyfftw.builders.irfftn(
self.fftImageObj.get_output_array(),
s=shape,
threads=threads,
)

Definition at line 526 of file electrostaticBrighterFatter.py.


The documentation for this class was generated from the following file: