funclp.Gaussian2D module

class funclp.Gaussian2D(**kwargs)[source]

Bases: Function

property FWHM
property FWHMx
property FWHMy
property amp
static amp0(res, *vars)
amp_fit = True
amp_max = np.float32(inf)
amp_min = np.float32(-inf)
property constants
property cpu_d_amp
property cpu_d_mux
property cpu_d_muy
property cpu_d_nsig
property cpu_d_offset
property cpu_d_pixx
property cpu_d_pixy
property cpu_d_sigx
property cpu_d_sigy
property cpu_d_theta
property cpu_function
property cpukernel_d_amp
property cpukernel_d_mux
property cpukernel_d_muy
property cpukernel_d_nsig
property cpukernel_d_offset
property cpukernel_d_pixx
property cpukernel_d_pixy
property cpukernel_d_sigx
property cpukernel_d_sigy
property cpukernel_d_theta
property cpukernel_function
d_amp

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_mux

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_muy

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_nsig

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_offset

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_pixx

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_pixy

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_sigx

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_sigy

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_theta

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

data = []
property ecc
function

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

property gpu_d_amp
property gpu_d_mux
property gpu_d_muy
property gpu_d_nsig
property gpu_d_offset
property gpu_d_pixx
property gpu_d_pixy
property gpu_d_sigx
property gpu_d_sigy
property gpu_d_theta
property gpu_function
property gpukernel_d_amp
property gpukernel_d_mux
property gpukernel_d_muy
property gpukernel_d_nsig
property gpukernel_d_offset
property gpukernel_d_pixx
property gpukernel_d_pixy
property gpukernel_d_sigx
property gpukernel_d_sigy
property gpukernel_d_theta
property gpukernel_function
property integ
property mux
static mux0(res, *vars)
mux_fit = True
mux_max = np.float32(inf)
mux_min = np.float32(-inf)
property muy
static muy0(res, *vars)
muy_fit = True
muy_max = np.float32(inf)
muy_min = np.float32(-inf)
property nsig
nsig0 = None
nsig_fit = False
nsig_max = np.float32(inf)
nsig_min = np.float32(-inf)
property offset
static offset0(res, *vars)
offset_fit = True
offset_max = np.float32(inf)
offset_min = np.float32(-inf)
property parameters
property pix
property pixx
pixx0 = None
pixx_fit = False
pixx_max = np.float32(inf)
pixx_min = np.float32(-inf)
property pixy
pixy0 = None
pixy_fit = False
pixy_max = np.float32(inf)
pixy_min = np.float32(-inf)
property proba
python_d_amp(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_mux(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_muy(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_nsig(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_offset(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_pixx(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_pixy(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_sigx(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_sigy(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_d_theta(y, /, mux, muy, sigx, sigy, amp, offset, pixx, pixy, nsig, theta)
python_function(y, /, mux=0.0, muy=0.0, sigx=0.15915494309189535, sigy=0.15915494309189535, amp=1.0, offset=0.0, pixx=-1.0, pixy=-1.0, nsig=-1.0, theta=0.0)
property sig
property sigx
static sigx0(res, *vars)
sigx_fit = True
sigx_max = np.float32(inf)
sigx_min = 0
property sigy
static sigy0(res, *vars)
sigy_fit = True
sigy_max = np.float32(inf)
sigy_min = 0
property theta
theta0 = None
theta_fit = False
theta_max = np.float32(inf)
theta_min = np.float32(-inf)
variables = ['x', 'y']
property w
property wx
property wy