funclp.Exponential3 module
- class funclp.Exponential3(**kwargs)[source]
Bases:
Function- property amp1
- static amp10(res, *args)
- amp1_fit = True
- amp1_max = np.float32(inf)
- amp1_min = np.float32(-inf)
- property amp2
- static amp20(res, *args)
- amp2_fit = True
- amp2_max = np.float32(inf)
- amp2_min = np.float32(-inf)
- property amp3
- static amp30(res, *args)
- amp3_fit = True
- amp3_max = np.float32(inf)
- amp3_min = np.float32(-inf)
- property constants
- property cpu_d_amp1
- property cpu_d_amp2
- property cpu_d_amp3
- property cpu_d_offset
- property cpu_d_tau1
- property cpu_d_tau2
- property cpu_d_tau3
- property cpu_function
- property cpukernel_d_amp1
- property cpukernel_d_amp2
- property cpukernel_d_amp3
- property cpukernel_d_offset
- property cpukernel_d_tau1
- property cpukernel_d_tau2
- property cpukernel_d_tau3
- property cpukernel_function
- d_amp1
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_amp2
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_amp3
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_tau1
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_tau2
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_tau3
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 = []
- 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_amp1
- property gpu_d_amp2
- property gpu_d_amp3
- property gpu_d_offset
- property gpu_d_tau1
- property gpu_d_tau2
- property gpu_d_tau3
- property gpu_function
- property gpukernel_d_amp1
- property gpukernel_d_amp2
- property gpukernel_d_amp3
- property gpukernel_d_offset
- property gpukernel_d_tau1
- property gpukernel_d_tau2
- property gpukernel_d_tau3
- property gpukernel_function
- property k1
- property k2
- property k3
- property offset
- static offset0(res, *args)
- offset_fit = True
- offset_max = np.float32(inf)
- offset_min = np.float32(-inf)
- property parameters
- python_d_amp1(tau1, tau2, tau3, amp1, amp2, amp3, offset)
- python_d_amp2(tau1, tau2, tau3, amp1, amp2, amp3, offset)
- python_d_amp3(tau1, tau2, tau3, amp1, amp2, amp3, offset)
- python_d_offset(tau1, tau2, tau3, amp1, amp2, amp3, offset)
- python_d_tau1(tau1, tau2, tau3, amp1, amp2, amp3, offset)
- python_d_tau2(tau1, tau2, tau3, amp1, amp2, amp3, offset)
- python_d_tau3(tau1, tau2, tau3, amp1, amp2, amp3, offset)
- python_function(tau1=1.0, tau2=0.6666666666666666, tau3=0.3333333333333333, amp1=0.3333333333333333, amp2=0.3333333333333333, amp3=0.3333333333333333, offset=0.0)
- property tau1
- static tau10(res, *args)
- tau1_fit = True
- tau1_max = np.float32(inf)
- tau1_min = np.float32(-inf)
- property tau2
- static tau20(res, *args)
- tau2_fit = True
- tau2_max = np.float32(inf)
- tau2_min = np.float32(-inf)
- property tau3
- static tau30(res, *args)
- tau3_fit = True
- tau3_max = np.float32(inf)
- tau3_min = np.float32(-inf)
- property tau_half1
- property tau_half2
- property tau_half3
- variables = ['t']