diff options
author | Blaise Thompson <blaise@untzag.com> | 2018-04-23 08:42:39 -0500 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2018-04-23 08:42:39 -0500 |
commit | 12224e5a937916a3c298918c76dde610c7ddd79d (patch) | |
tree | 1b7e47ef601f1b80cf3c55875674913f4bf61a00 /presentation | |
parent | 7611f3741b5d3dec996b2cc349c36787271671a7 (diff) |
2018-04-23 08:42
Diffstat (limited to 'presentation')
-rw-r--r-- | presentation/chopped.png | bin | 0 -> 168938 bytes | |||
-rw-r--r-- | presentation/chopped.py | 64 |
2 files changed, 64 insertions, 0 deletions
diff --git a/presentation/chopped.png b/presentation/chopped.png Binary files differnew file mode 100644 index 0000000..ba3dcfd --- /dev/null +++ b/presentation/chopped.png diff --git a/presentation/chopped.py b/presentation/chopped.py new file mode 100644 index 0000000..7878b99 --- /dev/null +++ b/presentation/chopped.py @@ -0,0 +1,64 @@ +"""Bandwidth comparison between Singh & Czech.""" + + +# --- import -------------------------------------------------------------------------------------- + + +import os + +import numpy as np + +import matplotlib.pyplot as plt +import matplotlib.patches as patches + +import WrightTools as wt +from WrightTools import datasets + + +# --- define -------------------------------------------------------------------------------------- + + +here = os.path.abspath(os.path.dirname(__file__)) + + +# --- workspace ----------------------------------------------------------------------------------- + + +fig, gs = wt.artists.create_figure(width='double', cols=[1, 1, 'cbar']) + +# get data +ps = datasets.COLORS.v2p1_MoS2_TrEE_movie +data = wt.data.from_COLORS(ps) +data.convert('eV', convert_variables=True) +data.ai0.signed = False +data.ai0.clip(min=0, replace='value') +data.level(0, 2, -4) +data = data.chop('w1=wm', 'w2', at={'d2': [-80, 'fs']})[0] + +# decoration +def decorate(ax): + ax.grid() + wt.artists.diagonal_line() + +# detector sees +ax = plt.subplot(gs[0, 0]) +ax.pcolor(data, channel='ai4') +ax.set_title('detected', fontsize=20) +decorate(ax) + +# chopped +ax = plt.subplot(gs[0, 1]) +ax.pcolor(data, channel='ai0') +ax.set_title('chopped', fontsize=20) +decorate(ax) + +# label +wt.artists.set_fig_labels(xlabel=data.w1__e__wm.label, ylabel=data.w2.label) + +# colorbar +cax = plt.subplot(gs[0, -1]) +wt.artists.plot_colorbar(cax=cax, label='intensity') + +# save +p = os.path.join(here, 'chopped.png') +wt.artists.savefig(p) |