lsst.ip.isr gbffcd5fa91+90bfeb2273
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 607 of file electrostaticBrighterFatter.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 621 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 638 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 630 of file electrostaticBrighterFatter.py.

◆ fftKernelObj

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

Definition at line 631 of file electrostaticBrighterFatter.py.

◆ ifftObj

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

Definition at line 632 of file electrostaticBrighterFatter.py.


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