<reponame>hmvege/GluonicLQCD
import matplotlib.pyplot as plt, numpy as np

plaq_morningstar_ubuntu = np.array("""
0    0.61401745  
1    0.62927918  
2    0.64409064  
3    0.65844519  
4    0.67233862  
5    0.68576903  
6    0.69873661  
7    0.71124351  
8    0.72329362  
9    0.73489239  
10   0.74604666  
11   0.75676448  
12   0.76705495  
13   0.77692801  
14   0.78639435  
15   0.79546523  
16   0.80415238  
17   0.81246785  
18   0.82042391  
19   0.82803298  
20   0.83530752  
21   0.84225997  
22   0.84890267  
23   0.85524782  
24   0.86130743  
25   0.86709327  
26   0.87261685  
27   0.87788938  
28   0.88292176  
29   0.88772457  
30   0.89230805  
31   0.89668206  
32   0.90085616  
33   0.90483950  
34   0.90864091  
35   0.91226887  
36   0.91573149  
37   0.91903657  
38   0.92219154  
39   0.92520354  
40   0.92807937  
41   0.93082553  
42   0.93344823  
43   0.93595338  
44   0.93834663  
45   0.94063334  
46   0.94281864  
47   0.94490740  
48   0.94690426  
49   0.94881362  
50   0.95063970  
51   0.95238648  
52   0.95405775  
53   0.95565713  
54   0.95718804  
55   0.95865374  
56   0.96005734  
57   0.96140177  
58   0.96268983  
59   0.96392419  
60   0.96510736  
61   0.96624174  
62   0.96732962  
63   0.96837315  
64   0.96937441  
65   0.97033534  
66   0.97125780  
67   0.97214355  
68   0.97299429  
69   0.97381159  
70   0.97459698  
71   0.97535190  
72   0.97607772  
73   0.97677575  
74   0.97744721  
75   0.97809330  
76   0.97871513  
77   0.97931378  
78   0.97989024  
79   0.98044550  
80   0.98098048  
81   0.98149603  
82   0.98199301  
83   0.98247220  
84   0.98293437  
85   0.98338022  
86   0.98381045  
87   0.98422571  
88   0.98462662  
89   0.98501378  
90   0.98538776  
91   0.98574909  
92   0.98609828  
93   0.98643585  
94   0.98676224  
95   0.98707791  
96   0.98738328  
97   0.98767877  
98   0.98796476  
99   0.98824163""".split(),dtype=float)

plaq_morningstar_mac = np.array("""
0    0.61049840  
1    0.62569628  
2    0.64044857  
3    0.65474864  
4    0.66859227  
5    0.68197751  
6    0.69490449  
7    0.70737526  
8    0.71939361  
9    0.73096487  
10   0.74209574  
11   0.75279414  
12   0.76306898  
13   0.77293008  
14   0.78238795  
15   0.79145369  
16   0.80013886  
17   0.80845533  
18   0.81641522  
19   0.82403079  
20   0.83131432  
21   0.83827811  
22   0.84493434  
23   0.85129505  
24   0.85737212  
25   0.86317717  
26   0.86872158  
27   0.87401642  
28   0.87907249  
29   0.88390022  
30   0.88850975  
31   0.89291083  
32   0.89711292  
33   0.90112507  
34   0.90495602  
35   0.90861415  
36   0.91210751  
37   0.91544379  
38   0.91863039  
39   0.92167434  
40   0.92458240  
41   0.92736100  
42   0.93001630  
43   0.93255417  
44   0.93498018  
45   0.93729968  
46   0.93951774  
47   0.94163920  
48   0.94366865  
49   0.94561049  
50   0.94746888  
51   0.94924778  
52   0.95095098  
53   0.95258204  
54   0.95414440  
55   0.95564128  
56   0.95707577  
57   0.95845080  
58   0.95976915  
59   0.96103347  
60   0.96224629  
61   0.96340998  
62   0.96452682  
63   0.96559897  
64   0.96662848  
65   0.96761731  
66   0.96856731  
67   0.96948024  
68   0.97035779  
69   0.97120154  
70   0.97201301  
71   0.97279364  
72   0.97354481  
73   0.97426782  
74   0.97496390  
75   0.97563425  
76   0.97627999  
77   0.97690217  
78   0.97750183  
79   0.97807993  
80   0.97863740  
81   0.97917510  
82   0.97969389  
83   0.98019456  
84   0.98067786  
85   0.98114453  
86   0.98159524  
87   0.98203067  
88   0.98245144  
89   0.98285814  
90   0.98325135  
91   0.98363161  
92   0.98399945  
93   0.98435535  
94   0.98469980  
95   0.98503324  
96   0.98535610  
97   0.98566881  
98   0.98597174  
99   0.98626529""".split(),dtype=float)

plaq_luscher_mac = np.array("""
0    0.61049839  
1    0.62569626  
2    0.64044854  
3    0.65474860  
4    0.66859222  
5    0.68197746  
6    0.69490443  
7    0.70737520  
8    0.71939354  
9    0.73096480  
10   0.74209567  
11   0.75279406  
12   0.76306891  
13   0.77293000  
14   0.78238787  
15   0.79145362  
16   0.80013878  
17   0.80845525  
18   0.81641514  
19   0.82403071  
20   0.83131425  
21   0.83827803  
22   0.84493426  
23   0.85129498  
24   0.85737205  
25   0.86317710  
26   0.86872151  
27   0.87401636  
28   0.87907242  
29   0.88390016  
30   0.88850969  
31   0.89291078  
32   0.89711286  
33   0.90112501  
34   0.90495597  
35   0.90861410  
36   0.91210746  
37   0.91544375  
38   0.91863034  
39   0.92167429  
40   0.92458235  
41   0.92736096  
42   0.93001626  
43   0.93255413  
44   0.93498014  
45   0.93729964  
46   0.93951770  
47   0.94163916  
48   0.94366862  
49   0.94561046  
50   0.94746885  
51   0.94924775  
52   0.95095095  
53   0.95258202  
54   0.95414437  
55   0.95564125  
56   0.95707574  
57   0.95845077  
58   0.95976913  
59   0.96103345  
60   0.96224627  
61   0.96340996  
62   0.96452680  
63   0.96559895  
64   0.96662846  
65   0.96761729  
66   0.96856729  
67   0.96948023  
68   0.97035777  
69   0.97120152  
70   0.97201299  
71   0.97279363  
72   0.97354480  
73   0.97426780  
74   0.97496389  
75   0.97563424  
76   0.97627997  
77   0.97690216  
78   0.97750182  
79   0.97807992  
80   0.97863739  
81   0.97917509  
82   0.97969388  
83   0.98019455  
84   0.98067785  
85   0.98114452  
86   0.98159524  
87   0.98203066  
88   0.98245143  
89   0.98285813  
90   0.98325134  
91   0.98363161  
92   0.98399944  
93   0.98435535  
94   0.98469979  
95   0.98503323  
96   0.98535610  
97   0.98566880  
98   0.98597174  
99   0.98626529""".split(),dtype=float)


plaq_taylor_mac = np.array("""
0    0.61049847  
1    0.62569641  
2    0.64044875  
3    0.65474887  
4    0.66859255  
5    0.68197783  
6    0.69490485  
7    0.70737565  
8    0.71939403  
9    0.73096531  
10   0.74209620  
11   0.75279461  
12   0.76306947  
13   0.77293058  
14   0.78238846  
15   0.79145420  
16   0.80013937  
17   0.80845584  
18   0.81641573  
19   0.82403129  
20   0.83131482  
21   0.83827860  
22   0.84493482  
23   0.85129553  
24   0.85737258  
25   0.86317762  
26   0.86872202  
27   0.87401685  
28   0.87907291  
29   0.88390063  
30   0.88851014  
31   0.89291122  
32   0.89711329  
33   0.90112543  
34   0.90495637  
35   0.90861449  
36   0.91210784  
37   0.91544411  
38   0.91863069  
39   0.92167464  
40   0.92458268  
41   0.92736128  
42   0.93001657  
43   0.93255442  
44   0.93498043  
45   0.93729992  
46   0.93951797  
47   0.94163942  
48   0.94366887  
49   0.94561070  
50   0.94746908  
51   0.94924798  
52   0.95095116  
53   0.95258222  
54   0.95414457  
55   0.95564144  
56   0.95707593  
57   0.95845095  
58   0.95976930  
59   0.96103362  
60   0.96224643  
61   0.96341011  
62   0.96452695  
63   0.96559909  
64   0.96662860  
65   0.96761743  
66   0.96856742  
67   0.96948035  
68   0.97035789  
69   0.97120164  
70   0.97201311  
71   0.97279374  
72   0.97354490  
73   0.97426791  
74   0.97496399  
75   0.97563434  
76   0.97628007  
77   0.97690225  
78   0.97750191  
79   0.97808000  
80   0.97863747  
81   0.97917517  
82   0.97969396  
83   0.98019462  
84   0.98067792  
85   0.98114459  
86   0.98159530  
87   0.98203073  
88   0.98245149  
89   0.98285820  
90   0.98325140  
91   0.98363167  
92   0.98399950  
93   0.98435540  
94   0.98469984  
95   0.98503328  
96   0.98535615  
97   0.98566885  
98   0.98597179  
99   0.98626533""".split(),dtype=float)

plaq_taylor4_mac = np.array("""
0    0.61049840  
1    0.62569628  
2    0.64044857  
3    0.65474864  
4    0.66859227  
5    0.68197751  
6    0.69490449  
7    0.70737526  
8    0.71939361  
9    0.73096487  
10   0.74209574  
11   0.75279414  
12   0.76306898  
13   0.77293008  
14   0.78238795  
15   0.79145369  
16   0.80013886  
17   0.80845533  
18   0.81641522  
19   0.82403079  
20   0.83131432  
21   0.83827811  
22   0.84493434  
23   0.85129505  
24   0.85737212  
25   0.86317717  
26   0.86872158  
27   0.87401642  
28   0.87907249  
29   0.88390022  
30   0.88850975  
31   0.89291083  
32   0.89711292  
33   0.90112507  
34   0.90495602  
35   0.90861415  
36   0.91210751  
37   0.91544379  
38   0.91863039  
39   0.92167434  
40   0.92458240  
41   0.92736100  
42   0.93001630  
43   0.93255417  
44   0.93498018  
45   0.93729968  
46   0.93951774  
47   0.94163920  
48   0.94366865  
49   0.94561049  
50   0.94746888  
51   0.94924778  
52   0.95095098  
53   0.95258204  
54   0.95414440  
55   0.95564128  
56   0.95707577  
57   0.95845080  
58   0.95976915  
59   0.96103347  
60   0.96224629  
61   0.96340998  
62   0.96452682  
63   0.96559897  
64   0.96662848  
65   0.96761731  
66   0.96856731  
67   0.96948024  
68   0.97035779  
69   0.97120154  
70   0.97201301  
71   0.97279364  
72   0.97354481  
73   0.97426782  
74   0.97496390  
75   0.97563425  
76   0.97627999  
77   0.97690217  
78   0.97750183  
79   0.97807993  
80   0.97863740  
81   0.97917510  
82   0.97969389  
83   0.98019456  
84   0.98067786  
85   0.98114453  
86   0.98159524  
87   0.98203067  
88   0.98245144  
89   0.98285814  
90   0.98325135  
91   0.98363161  
92   0.98399945  
93   0.98435535  
94   0.98469980  
95   0.98503324  
96   0.98535610  
97   0.98566881  
98   0.98597174  
99   0.98626529""".split(),dtype=float)


def getFlowPlaq(arr):
	tflow = arr[0::2] * 0.01
	plaq_flow = arr[1::2]
	return  tflow, plaq_flow

fig1 = plt.figure(dpi=300)

# Morningstar plot
ax1 = fig1.add_subplot(311)
t_morningstar, pf_morningstar = getFlowPlaq(plaq_morningstar_mac)
ax1.plot(t_morningstar, pf_morningstar,"-", label="Flowed Plaquette")
ax1.grid(True)
# ax.set_xlabel(r"Flow time $\tau$")
ax1.set_ylabel(r"$P_{Morningstar}$")
ax1.set_title("Flowed plaquette value with different SU3 exponentiating methods")
ax1.tick_params(axis='x',which='major',labelsize=8)

# Luscher plot
ax2 = fig1.add_subplot(312)
t_luscher, pf_luscher = getFlowPlaq(plaq_luscher_mac)
ax2.plot(t_luscher, pf_luscher,"-", label="Flowed Plaquette")
ax2.grid(True)
ax2.set_ylabel(r"$P_{Lushcer}$")
ax2.tick_params(axis='x',which='major',labelsize=8)

# Taylor plot
ax3 = fig1.add_subplot(313)
t_taylor, pf_taylor = getFlowPlaq(plaq_taylor4_mac)
ax3.plot(t_taylor, pf_luscher,"-", label="Flowed Plaquette")
ax3.grid(True)
ax3.set_ylabel(r"$P_{Taylor}$")
ax3.tick_params(axis='x',which='major',labelsize=8)
fig1.savefig("../figures/plaquette_flow.png")

#### Differences ####
fig2 = plt.figure(dpi=300)
ax4 = fig2.add_subplot(111)
pf_diff1 = np.absolute(pf_morningstar - pf_luscher)
pf_diff2 = np.absolute(pf_morningstar - pf_taylor)
pf_diff3 = np.absolute(pf_luscher - pf_taylor)

# ax4.plot(t_luscher,pf_diff1,label=r"$|P_{Morningstar} - P_{Luscher}|$")
ax4.plot(t_luscher,pf_diff2,label=r"$|P_{Morningstar} - P_{Taylor}|$")
ax4.plot(t_luscher,pf_diff3,'--',label=r"$|P_{Luscher} - P_{Taylor}|$")
ax4.set_title(r"Differences in $SU(3)$ exponentiation methods")
ax4.set_yscale("log",nonposy='clip')
ax4.set_ylabel(r"$\Delta P$")
ax4.tick_params(axis='y',which='minor',labelsize=8)
ax4.tick_params(axis='y',which='major',labelsize=8)
ax4.set_xlabel(r"Flow time $\tau$")
ax4.legend()
fig2.savefig("../figures/exponentiation_differences.png")

# ax5 = fig2.add_subplot(312)
# ax5.set_yscale("log",nonposy='clip')
# ax5.set_ylabel(r"$\Delta P$")
# ax5.tick_params(axis='y',which='minor',labelsize=8)
# ax5.tick_params(axis='y',which='major',labelsize=8)
# ax5.legend()


# ax5 = fig2.add_subplot(312)
# ax5.set_yscale("log",nonposy='clip')
# ax5.tick_params(axis='y',which='minor',labelsize=8)
# ax5.tick_params(axis='y',which='major',labelsize=8)
# ax5.legend()

import matplotlib.pyplot as plt, numpy as np

plaq_morningstar_ubuntu = np.array("""
0    0.61401745  
1    0.62927918  
2    0.64409064  
3    0.65844519  
4    0.67233862  
5    0.68576903  
6    0.69873661  
7    0.71124351  
8    0.72329362  
9    0.73489239  
10   0.74604666  
11   0.75676448  
12   0.76705495  
13   0.77692801  
14   0.78639435  
15   0.79546523  
16   0.80415238  
17   0.81246785  
18   0.82042391  
19   0.82803298  
20   0.83530752  
21   0.84225997  
22   0.84890267  
23   0.85524782  
24   0.86130743  
25   0.86709327  
26   0.87261685  
27   0.87788938  
28   0.88292176  
29   0.88772457  
30   0.89230805  
31   0.89668206  
32   0.90085616  
33   0.90483950  
34   0.90864091  
35   0.91226887  
36   0.91573149  
37   0.91903657  
38   0.92219154  
39   0.92520354  
40   0.92807937  
41   0.93082553  
42   0.93344823  
43   0.93595338  
44   0.93834663  
45   0.94063334  
46   0.94281864  
47   0.94490740  
48   0.94690426  
49   0.94881362  
50   0.95063970  
51   0.95238648  
52   0.95405775  
53   0.95565713  
54   0.95718804  
55   0.95865374  
56   0.96005734  
57   0.96140177  
58   0.96268983  
59   0.96392419  
60   0.96510736  
61   0.96624174  
62   0.96732962  
63   0.96837315  
64   0.96937441  
65   0.97033534  
66   0.97125780  
67   0.97214355  
68   0.97299429  
69   0.97381159  
70   0.97459698  
71   0.97535190  
72   0.97607772  
73   0.97677575  
74   0.97744721  
75   0.97809330  
76   0.97871513  
77   0.97931378  
78   0.97989024  
79   0.98044550  
80   0.98098048  
81   0.98149603  
82   0.98199301  
83   0.98247220  
84   0.98293437  
85   0.98338022  
86   0.98381045  
87   0.98422571  
88   0.98462662  
89   0.98501378  
90   0.98538776  
91   0.98574909  
92   0.98609828  
93   0.98643585  
94   0.98676224  
95   0.98707791  
96   0.98738328  
97   0.98767877  
98   0.98796476  
99   0.98824163""".split(),dtype=float)

plaq_morningstar_mac = np.array("""
0    0.61049840  
1    0.62569628  
2    0.64044857  
3    0.65474864  
4    0.66859227  
5    0.68197751  
6    0.69490449  
7    0.70737526  
8    0.71939361  
9    0.73096487  
10   0.74209574  
11   0.75279414  
12   0.76306898  
13   0.77293008  
14   0.78238795  
15   0.79145369  
16   0.80013886  
17   0.80845533  
18   0.81641522  
19   0.82403079  
20   0.83131432  
21   0.83827811  
22   0.84493434  
23   0.85129505  
24   0.85737212  
25   0.86317717  
26   0.86872158  
27   0.87401642  
28   0.87907249  
29   0.88390022  
30   0.88850975  
31   0.89291083  
32   0.89711292  
33   0.90112507  
34   0.90495602  
35   0.90861415  
36   0.91210751  
37   0.91544379  
38   0.91863039  
39   0.92167434  
40   0.92458240  
41   0.92736100  
42   0.93001630  
43   0.93255417  
44   0.93498018  
45   0.93729968  
46   0.93951774  
47   0.94163920  
48   0.94366865  
49   0.94561049  
50   0.94746888  
51   0.94924778  
52   0.95095098  
53   0.95258204  
54   0.95414440  
55   0.95564128  
56   0.95707577  
57   0.95845080  
58   0.95976915  
59   0.96103347  
60   0.96224629  
61   0.96340998  
62   0.96452682  
63   0.96559897  
64   0.96662848  
65   0.96761731  
66   0.96856731  
67   0.96948024  
68   0.97035779  
69   0.97120154  
70   0.97201301  
71   0.97279364  
72   0.97354481  
73   0.97426782  
74   0.97496390  
75   0.97563425  
76   0.97627999  
77   0.97690217  
78   0.97750183  
79   0.97807993  
80   0.97863740  
81   0.97917510  
82   0.97969389  
83   0.98019456  
84   0.98067786  
85   0.98114453  
86   0.98159524  
87   0.98203067  
88   0.98245144  
89   0.98285814  
90   0.98325135  
91   0.98363161  
92   0.98399945  
93   0.98435535  
94   0.98469980  
95   0.98503324  
96   0.98535610  
97   0.98566881  
98   0.98597174  
99   0.98626529""".split(),dtype=float)

plaq_luscher_mac = np.array("""
0    0.61049839  
1    0.62569626  
2    0.64044854  
3    0.65474860  
4    0.66859222  
5    0.68197746  
6    0.69490443  
7    0.70737520  
8    0.71939354  
9    0.73096480  
10   0.74209567  
11   0.75279406  
12   0.76306891  
13   0.77293000  
14   0.78238787  
15   0.79145362  
16   0.80013878  
17   0.80845525  
18   0.81641514  
19   0.82403071  
20   0.83131425  
21   0.83827803  
22   0.84493426  
23   0.85129498  
24   0.85737205  
25   0.86317710  
26   0.86872151  
27   0.87401636  
28   0.87907242  
29   0.88390016  
30   0.88850969  
31   0.89291078  
32   0.89711286  
33   0.90112501  
34   0.90495597  
35   0.90861410  
36   0.91210746  
37   0.91544375  
38   0.91863034  
39   0.92167429  
40   0.92458235  
41   0.92736096  
42   0.93001626  
43   0.93255413  
44   0.93498014  
45   0.93729964  
46   0.93951770  
47   0.94163916  
48   0.94366862  
49   0.94561046  
50   0.94746885  
51   0.94924775  
52   0.95095095  
53   0.95258202  
54   0.95414437  
55   0.95564125  
56   0.95707574  
57   0.95845077  
58   0.95976913  
59   0.96103345  
60   0.96224627  
61   0.96340996  
62   0.96452680  
63   0.96559895  
64   0.96662846  
65   0.96761729  
66   0.96856729  
67   0.96948023  
68   0.97035777  
69   0.97120152  
70   0.97201299  
71   0.97279363  
72   0.97354480  
73   0.97426780  
74   0.97496389  
75   0.97563424  
76   0.97627997  
77   0.97690216  
78   0.97750182  
79   0.97807992  
80   0.97863739  
81   0.97917509  
82   0.97969388  
83   0.98019455  
84   0.98067785  
85   0.98114452  
86   0.98159524  
87   0.98203066  
88   0.98245143  
89   0.98285813  
90   0.98325134  
91   0.98363161  
92   0.98399944  
93   0.98435535  
94   0.98469979  
95   0.98503323  
96   0.98535610  
97   0.98566880  
98   0.98597174  
99   0.98626529""".split(),dtype=float)


plaq_taylor_mac = np.array("""
0    0.61049847  
1    0.62569641  
2    0.64044875  
3    0.65474887  
4    0.66859255  
5    0.68197783  
6    0.69490485  
7    0.70737565  
8    0.71939403  
9    0.73096531  
10   0.74209620  
11   0.75279461  
12   0.76306947  
13   0.77293058  
14   0.78238846  
15   0.79145420  
16   0.80013937  
17   0.80845584  
18   0.81641573  
19   0.82403129  
20   0.83131482  
21   0.83827860  
22   0.84493482  
23   0.85129553  
24   0.85737258  
25   0.86317762  
26   0.86872202  
27   0.87401685  
28   0.87907291  
29   0.88390063  
30   0.88851014  
31   0.89291122  
32   0.89711329  
33   0.90112543  
34   0.90495637  
35   0.90861449  
36   0.91210784  
37   0.91544411  
38   0.91863069  
39   0.92167464  
40   0.92458268  
41   0.92736128  
42   0.93001657  
43   0.93255442  
44   0.93498043  
45   0.93729992  
46   0.93951797  
47   0.94163942  
48   0.94366887  
49   0.94561070  
50   0.94746908  
51   0.94924798  
52   0.95095116  
53   0.95258222  
54   0.95414457  
55   0.95564144  
56   0.95707593  
57   0.95845095  
58   0.95976930  
59   0.96103362  
60   0.96224643  
61   0.96341011  
62   0.96452695  
63   0.96559909  
64   0.96662860  
65   0.96761743  
66   0.96856742  
67   0.96948035  
68   0.97035789  
69   0.97120164  
70   0.97201311  
71   0.97279374  
72   0.97354490  
73   0.97426791  
74   0.97496399  
75   0.97563434  
76   0.97628007  
77   0.97690225  
78   0.97750191  
79   0.97808000  
80   0.97863747  
81   0.97917517  
82   0.97969396  
83   0.98019462  
84   0.98067792  
85   0.98114459  
86   0.98159530  
87   0.98203073  
88   0.98245149  
89   0.98285820  
90   0.98325140  
91   0.98363167  
92   0.98399950  
93   0.98435540  
94   0.98469984  
95   0.98503328  
96   0.98535615  
97   0.98566885  
98   0.98597179  
99   0.98626533""".split(),dtype=float)

plaq_taylor4_mac = np.array("""
0    0.61049840  
1    0.62569628  
2    0.64044857  
3    0.65474864  
4    0.66859227  
5    0.68197751  
6    0.69490449  
7    0.70737526  
8    0.71939361  
9    0.73096487  
10   0.74209574  
11   0.75279414  
12   0.76306898  
13   0.77293008  
14   0.78238795  
15   0.79145369  
16   0.80013886  
17   0.80845533  
18   0.81641522  
19   0.82403079  
20   0.83131432  
21   0.83827811  
22   0.84493434  
23   0.85129505  
24   0.85737212  
25   0.86317717  
26   0.86872158  
27   0.87401642  
28   0.87907249  
29   0.88390022  
30   0.88850975  
31   0.89291083  
32   0.89711292  
33   0.90112507  
34   0.90495602  
35   0.90861415  
36   0.91210751  
37   0.91544379  
38   0.91863039  
39   0.92167434  
40   0.92458240  
41   0.92736100  
42   0.93001630  
43   0.93255417  
44   0.93498018  
45   0.93729968  
46   0.93951774  
47   0.94163920  
48   0.94366865  
49   0.94561049  
50   0.94746888  
51   0.94924778  
52   0.95095098  
53   0.95258204  
54   0.95414440  
55   0.95564128  
56   0.95707577  
57   0.95845080  
58   0.95976915  
59   0.96103347  
60   0.96224629  
61   0.96340998  
62   0.96452682  
63   0.96559897  
64   0.96662848  
65   0.96761731  
66   0.96856731  
67   0.96948024  
68   0.97035779  
69   0.97120154  
70   0.97201301  
71   0.97279364  
72   0.97354481  
73   0.97426782  
74   0.97496390  
75   0.97563425  
76   0.97627999  
77   0.97690217  
78   0.97750183  
79   0.97807993  
80   0.97863740  
81   0.97917510  
82   0.97969389  
83   0.98019456  
84   0.98067786  
85   0.98114453  
86   0.98159524  
87   0.98203067  
88   0.98245144  
89   0.98285814  
90   0.98325135  
91   0.98363161  
92   0.98399945  
93   0.98435535  
94   0.98469980  
95   0.98503324  
96   0.98535610  
97   0.98566881  
98   0.98597174  
99   0.98626529""".split(),dtype=float)


def getFlowPlaq(arr):
	tflow = arr[0::2] * 0.01
	plaq_flow = arr[1::2]
	return  tflow, plaq_flow

fig1 = plt.figure(dpi=300)

# Morningstar plot
ax1 = fig1.add_subplot(311)
t_morningstar, pf_morningstar = getFlowPlaq(plaq_morningstar_mac)
ax1.plot(t_morningstar, pf_morningstar,"-", label="Flowed Plaquette")
ax1.grid(True)
# ax.set_xlabel(r"Flow time $\tau$")
ax1.set_ylabel(r"$P_{Morningstar}$")
ax1.set_title("Flowed plaquette value with different SU3 exponentiating methods")
ax1.tick_params(axis='x',which='major',labelsize=8)

# Luscher plot
ax2 = fig1.add_subplot(312)
t_luscher, pf_luscher = getFlowPlaq(plaq_luscher_mac)
ax2.plot(t_luscher, pf_luscher,"-", label="Flowed Plaquette")
ax2.grid(True)
ax2.set_ylabel(r"$P_{Lushcer}$")
ax2.tick_params(axis='x',which='major',labelsize=8)

# Taylor plot
ax3 = fig1.add_subplot(313)
t_taylor, pf_taylor = getFlowPlaq(plaq_taylor4_mac)
ax3.plot(t_taylor, pf_luscher,"-", label="Flowed Plaquette")
ax3.grid(True)
ax3.set_ylabel(r"$P_{Taylor}$")
ax3.tick_params(axis='x',which='major',labelsize=8)
fig1.savefig("../figures/plaquette_flow.png")

#### Differences ####
fig2 = plt.figure(dpi=300)
ax4 = fig2.add_subplot(111)
pf_diff1 = np.absolute(pf_morningstar - pf_luscher)
pf_diff2 = np.absolute(pf_morningstar - pf_taylor)
pf_diff3 = np.absolute(pf_luscher - pf_taylor)

# ax4.plot(t_luscher,pf_diff1,label=r"$|P_{Morningstar} - P_{Luscher}|$")
ax4.plot(t_luscher,pf_diff2,label=r"$|P_{Morningstar} - P_{Taylor}|$")
ax4.plot(t_luscher,pf_diff3,'--',label=r"$|P_{Luscher} - P_{Taylor}|$")
ax4.set_title(r"Differences in $SU(3)$ exponentiation methods")
ax4.set_yscale("log",nonposy='clip')
ax4.set_ylabel(r"$\Delta P$")
ax4.tick_params(axis='y',which='minor',labelsize=8)
ax4.tick_params(axis='y',which='major',labelsize=8)
ax4.set_xlabel(r"Flow time $\tau$")
ax4.legend()
fig2.savefig("../figures/exponentiation_differences.png")

# ax5 = fig2.add_subplot(312)
# ax5.set_yscale("log",nonposy='clip')
# ax5.set_ylabel(r"$\Delta P$")
# ax5.tick_params(axis='y',which='minor',labelsize=8)
# ax5.tick_params(axis='y',which='major',labelsize=8)
# ax5.legend()


# ax5 = fig2.add_subplot(312)
# ax5.set_yscale("log",nonposy='clip')
# ax5.tick_params(axis='y',which='minor',labelsize=8)
# ax5.tick_params(axis='y',which='major',labelsize=8)
# ax5.legend()
0    0.61401745   1    0.62927918   2    0.64409064   3    0.65844519   4    0.67233862   5    0.68576903   6    0.69873661   7    0.71124351   8    0.72329362   9    0.73489239   10   0.74604666   11   0.75676448   12   0.76705495   13   0.77692801   14   0.78639435   15   0.79546523   16   0.80415238   17   0.81246785   18   0.82042391   19   0.82803298   20   0.83530752   21   0.84225997   22   0.84890267   23   0.85524782   24   0.86130743   25   0.86709327   26   0.87261685   27   0.87788938   28   0.88292176   29   0.88772457   30   0.89230805   31   0.89668206   32   0.90085616   33   0.90483950   34   0.90864091   35   0.91226887   36   0.91573149   37   0.91903657   38   0.92219154   39   0.92520354   40   0.92807937   41   0.93082553   42   0.93344823   43   0.93595338   44   0.93834663   45   0.94063334   46   0.94281864   47   0.94490740   48   0.94690426   49   0.94881362   50   0.95063970   51   0.95238648   52   0.95405775   53   0.95565713   54   0.95718804   55   0.95865374   56   0.96005734   57   0.96140177   58   0.96268983   59   0.96392419   60   0.96510736   61   0.96624174   62   0.96732962   63   0.96837315   64   0.96937441   65   0.97033534   66   0.97125780   67   0.97214355   68   0.97299429   69   0.97381159   70   0.97459698   71   0.97535190   72   0.97607772   73   0.97677575   74   0.97744721   75   0.97809330   76   0.97871513   77   0.97931378   78   0.97989024   79   0.98044550   80   0.98098048   81   0.98149603   82   0.98199301   83   0.98247220   84   0.98293437   85   0.98338022   86   0.98381045   87   0.98422571   88   0.98462662   89   0.98501378   90   0.98538776   91   0.98574909   92   0.98609828   93   0.98643585   94   0.98676224   95   0.98707791   96   0.98738328   97   0.98767877   98   0.98796476   99   0.98824163 0    0.61049840   1    0.62569628   2    0.64044857   3    0.65474864   4    0.66859227   5    0.68197751   6    0.69490449   7    0.70737526   8    0.71939361   9    0.73096487   10   0.74209574   11   0.75279414   12   0.76306898   13   0.77293008   14   0.78238795   15   0.79145369   16   0.80013886   17   0.80845533   18   0.81641522   19   0.82403079   20   0.83131432   21   0.83827811   22   0.84493434   23   0.85129505   24   0.85737212   25   0.86317717   26   0.86872158   27   0.87401642   28   0.87907249   29   0.88390022   30   0.88850975   31   0.89291083   32   0.89711292   33   0.90112507   34   0.90495602   35   0.90861415   36   0.91210751   37   0.91544379   38   0.91863039   39   0.92167434   40   0.92458240   41   0.92736100   42   0.93001630   43   0.93255417   44   0.93498018   45   0.93729968   46   0.93951774   47   0.94163920   48   0.94366865   49   0.94561049   50   0.94746888   51   0.94924778   52   0.95095098   53   0.95258204   54   0.95414440   55   0.95564128   56   0.95707577   57   0.95845080   58   0.95976915   59   0.96103347   60   0.96224629   61   0.96340998   62   0.96452682   63   0.96559897   64   0.96662848   65   0.96761731   66   0.96856731   67   0.96948024   68   0.97035779   69   0.97120154   70   0.97201301   71   0.97279364   72   0.97354481   73   0.97426782   74   0.97496390   75   0.97563425   76   0.97627999   77   0.97690217   78   0.97750183   79   0.97807993   80   0.97863740   81   0.97917510   82   0.97969389   83   0.98019456   84   0.98067786   85   0.98114453   86   0.98159524   87   0.98203067   88   0.98245144   89   0.98285814   90   0.98325135   91   0.98363161   92   0.98399945   93   0.98435535   94   0.98469980   95   0.98503324   96   0.98535610   97   0.98566881   98   0.98597174   99   0.98626529 0    0.61049839   1    0.62569626   2    0.64044854   3    0.65474860   4    0.66859222   5    0.68197746   6    0.69490443   7    0.70737520   8    0.71939354   9    0.73096480   10   0.74209567   11   0.75279406   12   0.76306891   13   0.77293000   14   0.78238787   15   0.79145362   16   0.80013878   17   0.80845525   18   0.81641514   19   0.82403071   20   0.83131425   21   0.83827803   22   0.84493426   23   0.85129498   24   0.85737205   25   0.86317710   26   0.86872151   27   0.87401636   28   0.87907242   29   0.88390016   30   0.88850969   31   0.89291078   32   0.89711286   33   0.90112501   34   0.90495597   35   0.90861410   36   0.91210746   37   0.91544375   38   0.91863034   39   0.92167429   40   0.92458235   41   0.92736096   42   0.93001626   43   0.93255413   44   0.93498014   45   0.93729964   46   0.93951770   47   0.94163916   48   0.94366862   49   0.94561046   50   0.94746885   51   0.94924775   52   0.95095095   53   0.95258202   54   0.95414437   55   0.95564125   56   0.95707574   57   0.95845077   58   0.95976913   59   0.96103345   60   0.96224627   61   0.96340996   62   0.96452680   63   0.96559895   64   0.96662846   65   0.96761729   66   0.96856729   67   0.96948023   68   0.97035777   69   0.97120152   70   0.97201299   71   0.97279363   72   0.97354480   73   0.97426780   74   0.97496389   75   0.97563424   76   0.97627997   77   0.97690216   78   0.97750182   79   0.97807992   80   0.97863739   81   0.97917509   82   0.97969388   83   0.98019455   84   0.98067785   85   0.98114452   86   0.98159524   87   0.98203066   88   0.98245143   89   0.98285813   90   0.98325134   91   0.98363161   92   0.98399944   93   0.98435535   94   0.98469979   95   0.98503323   96   0.98535610   97   0.98566880   98   0.98597174   99   0.98626529 0    0.61049847   1    0.62569641   2    0.64044875   3    0.65474887   4    0.66859255   5    0.68197783   6    0.69490485   7    0.70737565   8    0.71939403   9    0.73096531   10   0.74209620   11   0.75279461   12   0.76306947   13   0.77293058   14   0.78238846   15   0.79145420   16   0.80013937   17   0.80845584   18   0.81641573   19   0.82403129   20   0.83131482   21   0.83827860   22   0.84493482   23   0.85129553   24   0.85737258   25   0.86317762   26   0.86872202   27   0.87401685   28   0.87907291   29   0.88390063   30   0.88851014   31   0.89291122   32   0.89711329   33   0.90112543   34   0.90495637   35   0.90861449   36   0.91210784   37   0.91544411   38   0.91863069   39   0.92167464   40   0.92458268   41   0.92736128   42   0.93001657   43   0.93255442   44   0.93498043   45   0.93729992   46   0.93951797   47   0.94163942   48   0.94366887   49   0.94561070   50   0.94746908   51   0.94924798   52   0.95095116   53   0.95258222   54   0.95414457   55   0.95564144   56   0.95707593   57   0.95845095   58   0.95976930   59   0.96103362   60   0.96224643   61   0.96341011   62   0.96452695   63   0.96559909   64   0.96662860   65   0.96761743   66   0.96856742   67   0.96948035   68   0.97035789   69   0.97120164   70   0.97201311   71   0.97279374   72   0.97354490   73   0.97426791   74   0.97496399   75   0.97563434   76   0.97628007   77   0.97690225   78   0.97750191   79   0.97808000   80   0.97863747   81   0.97917517   82   0.97969396   83   0.98019462   84   0.98067792   85   0.98114459   86   0.98159530   87   0.98203073   88   0.98245149   89   0.98285820   90   0.98325140   91   0.98363167   92   0.98399950   93   0.98435540   94   0.98469984   95   0.98503328   96   0.98535615   97   0.98566885   98   0.98597179   99   0.98626533 0    0.61049840   1    0.62569628   2    0.64044857   3    0.65474864   4    0.66859227   5    0.68197751   6    0.69490449   7    0.70737526   8    0.71939361   9    0.73096487   10   0.74209574   11   0.75279414   12   0.76306898   13   0.77293008   14   0.78238795   15   0.79145369   16   0.80013886   17   0.80845533   18   0.81641522   19   0.82403079   20   0.83131432   21   0.83827811   22   0.84493434   23   0.85129505   24   0.85737212   25   0.86317717   26   0.86872158   27   0.87401642   28   0.87907249   29   0.88390022   30   0.88850975   31   0.89291083   32   0.89711292   33   0.90112507   34   0.90495602   35   0.90861415   36   0.91210751   37   0.91544379   38   0.91863039   39   0.92167434   40   0.92458240   41   0.92736100   42   0.93001630   43   0.93255417   44   0.93498018   45   0.93729968   46   0.93951774   47   0.94163920   48   0.94366865   49   0.94561049   50   0.94746888   51   0.94924778   52   0.95095098   53   0.95258204   54   0.95414440   55   0.95564128   56   0.95707577   57   0.95845080   58   0.95976915   59   0.96103347   60   0.96224629   61   0.96340998   62   0.96452682   63   0.96559897   64   0.96662848   65   0.96761731   66   0.96856731   67   0.96948024   68   0.97035779   69   0.97120154   70   0.97201301   71   0.97279364   72   0.97354481   73   0.97426782   74   0.97496390   75   0.97563425   76   0.97627999   77   0.97690217   78   0.97750183   79   0.97807993   80   0.97863740   81   0.97917510   82   0.97969389   83   0.98019456   84   0.98067786   85   0.98114453   86   0.98159524   87   0.98203067   88   0.98245144   89   0.98285814   90   0.98325135   91   0.98363161   92   0.98399945   93   0.98435535   94   0.98469980   95   0.98503324   96   0.98535610   97   0.98566881   98   0.98597174   99   0.98626529 # Morningstar plot # ax.set_xlabel(r"Flow time $\tau$") # Luscher plot # Taylor plot #### Differences #### # ax4.plot(t_luscher,pf_diff1,label=r"$|P_{Morningstar} - P_{Luscher}|$") # ax5 = fig2.add_subplot(312) # ax5.set_yscale("log",nonposy='clip') # ax5.set_ylabel(r"$\Delta P$") # ax5.tick_params(axis='y',which='minor',labelsize=8) # ax5.tick_params(axis='y',which='major',labelsize=8) # ax5.legend() # ax5 = fig2.add_subplot(312) # ax5.set_yscale("log",nonposy='clip') # ax5.tick_params(axis='y',which='minor',labelsize=8) # ax5.tick_params(axis='y',which='major',labelsize=8) # ax5.legend()