GradientΒΆ

Demonstration of the gradient method.

  • ../_images/sphx_glr_gradient_001.png
  • ../_images/sphx_glr_gradient_002.png
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.161 seconds)

Generated by Sphinx-Gallery