Tune testΒΆ

An example of transform on a tune test.

../_images/sphx_glr_tune_test_001.png

Out:

Correction factor applied to d1
Correction factor applied to d2
data created at /tmp/jlu_qiym.wt5::/
  axes: ('w1__e__wm', 'wa')
  shape: (25, 256)
/home/docs/checkouts/readthedocs.org/user_builds/wrighttools/envs/latest/lib/python3.6/site-packages/WrightTools/artists/_helpers.py:687: MatplotlibDeprecationWarning:
The set_clim function was deprecated in Matplotlib 3.1 and will be removed in 3.3. Use ScalarMappable.set_clim instead.
  cbar.set_clim(clim[0], clim[1])

import matplotlib.pyplot as plt

import WrightTools as wt
from WrightTools import datasets

p = datasets.PyCMDS.w1_wa_000
data = wt.data.from_PyCMDS(p)

fig, gs = wt.artists.create_figure(width="double", cols=[1, 0.25, 1, "cbar"])

# as taken
ax = plt.subplot(gs[0, 0])
ax.pcolor(data)
wt.artists.set_ax_labels(xlabel=data.w1__e__wm.label, ylabel=data.wa.label)
ax.grid()
ax.set_title("as taken", fontsize=20)

# transformed
ax = plt.subplot(gs[0, 2])
data.transform("w1", "wa-w1")
ax.pcolor(data)
wt.artists.set_ax_labels(xlabel=data.w1.label, ylabel=data.wa__m__w1.label)
ax.grid()
ax.set_title("transformed", fontsize=20)

# colorbar
cax = plt.subplot(gs[0, -1])
wt.artists.plot_colorbar(cax, label="intensity")

Total running time of the script: ( 0 minutes 1.431 seconds)

Gallery generated by Sphinx-Gallery