funclp.Airy2D module
- class funclp.Airy2D(**kwargs)[source]
Bases:
Function- property Abbe
- property Abbe_z
- property FWHM
- property NA
- NA0 = None
- NA_fit = False
- NA_max = np.float32(inf)
- NA_min = np.float32(-inf)
- property Rayleigh
- property Sparrow
- property amp
- static amp0(res, *args)
- amp_fit = True
- amp_max = np.float32(inf)
- amp_min = np.float32(-inf)
- property attribute
- property constants
- property cpu_d_NA
- property cpu_d_amp
- property cpu_d_mux
- property cpu_d_muy
- property cpu_d_offset
- property cpu_d_tol
- property cpu_d_wl
- property cpu_function
- property cpukernel_d_NA
- property cpukernel_d_amp
- property cpukernel_d_mux
- property cpukernel_d_muy
- property cpukernel_d_offset
- property cpukernel_d_tol
- property cpukernel_d_wl
- property cpukernel_function
- d_NA
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_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_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_tol
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_wl
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 diameter
- 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_NA
- property gpu_d_amp
- property gpu_d_mux
- property gpu_d_muy
- property gpu_d_offset
- property gpu_d_tol
- property gpu_d_wl
- property gpu_function
- property gpukernel_d_NA
- property gpukernel_d_amp
- property gpukernel_d_mux
- property gpukernel_d_muy
- property gpukernel_d_offset
- property gpukernel_d_tol
- property gpukernel_d_wl
- property gpukernel_function
- property mux
- static mux0(res, *args)
- mux_fit = True
- mux_max = np.float32(inf)
- mux_min = np.float32(-inf)
- property muy
- static muy0(res, *args)
- muy_fit = True
- muy_max = np.float32(inf)
- muy_min = np.float32(-inf)
- n = 1.33
- property offset
- static offset0(res, *args)
- offset_fit = True
- offset_max = np.float32(inf)
- offset_min = np.float32(-inf)
- property parameters
- python_d_NA(y, /, mux, muy, amp, offset, wl, NA, tol)
- python_d_amp(y, /, mux, muy, amp, offset, wl, NA, tol)
- python_d_mux(y, /, mux, muy, amp, offset, wl, NA, tol)
- python_d_muy(y, /, mux, muy, amp, offset, wl, NA, tol)
- python_d_offset(y, /, mux, muy, amp, offset, wl, NA, tol)
- python_d_tol(y, /, mux, muy, amp, offset, wl, NA, tol)
- python_d_wl(y, /, mux, muy, amp, offset, wl, NA, tol)
- python_function(y, /, mux=0.0, muy=0.0, amp=1.0, offset=0.0, wl=550.0, NA=1.5, tol=1.0)
- property radius
- property sigma
- property tol
- tol0 = None
- tol_fit = False
- tol_max = np.float32(inf)
- tol_min = np.float32(-inf)
- variables = ['x', 'y']
- property wl
- wl0 = None
- wl_fit = False
- wl_max = np.float32(inf)
- wl_min = np.float32(-inf)