aboutsummaryrefslogtreecommitdiff
path: root/processing/join.py
blob: f3a4203ab0dda3366a198bbdce77cf7de12ca309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""Join figure."""


# --- import --------------------------------------------------------------------------------------


import os

import matplotlib.pyplot as plt

import WrightTools as wt


# --- define --------------------------------------------------------------------------------------


here = os.path.abspath(os.path.dirname(__file__))


# --- workspace -----------------------------------------------------------------------------------


wt.artists.apply_rcparams('publication')

fig, gs = wt.artists.create_figure(width='double', cols=[1, 0, 1, 1, 1, 'cbar'], nrows=4)

root = wt.open(os.path.join(here, 'MX2_TSF.wt5'))

def plot(ax, d):
    d.transform('w1', 'w2')
    d.sig.clip(0, 4)
    ax.pcolor(d)

# II
ax = plt.subplot(gs[0, 0])
plot(ax, root.processed_tsf.divided_tsf.II)

# IS
ax = plt.subplot(gs[1, 0])
plot(ax, root.processed_tsf.divided_tsf.IS)

# SS
ax = plt.subplot(gs[2, 0])
plot(ax, root.processed_tsf.divided_tsf.SS)


# savefig
p = os.path.join(here, 'join.png')
plt.show()