Note
Click here to download the full example code
Gradient
Demonstration of the gradient method.
Out:
[<Figure size 650x425 with 1 Axes>]
import numpy as np
import WrightTools as wt
data = wt.data.Data()
data.create_variable("w1", np.linspace(-10, 10, 100))
data.create_channel("sig", 1 / (np.pi * (1 + (data.w1[:] - 1) ** 2)))
data.transform("w1")
data.gradient("w1")
wt.artists.quick1D(data)
wt.artists.quick1D(data, channel="sig_w1_gradient")
Total running time of the script: ( 0 minutes 0.196 seconds)