<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Science, Data, Tools
or 'Tips and tricks for a your everyday workflow'
Matteo Guzzo
Prologue
AKA My Research
The cumulant expansion
The struggle has been too long, but we are starting to see the light...
As you might recall...
We are trying to go beyond the GW approximation
and succeed in describing satellites.
The spectral function
It looks like this
Step2:  <img src="files/graphics/xkcd1.png" width=700>
See https
Step4:  <img src="./graphics/scatter_demo.png" width=700>
http
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
with plt.xkcd():
    plt.rcParams['figure.figsize'] = (6., 4.)
    x = np.linspace(-5, 5, 50)
    gauss = np.exp(-(x**2) / 2)/np.sqrt(2 * np.pi)
    ax = plt.subplot(111)
    ax.plot(x, gauss, label="Best curve ever")
    cdf = np.array([np.trapz(gauss[:i], x[:i]) for i, _ in enumerate(gauss)])
    plt.plot(x, cdf, label="Bestest curve ever")
    plt.xlim(-3, 3)
    ax.set_xticks([])
    ax.set_yticks([])
    ax.spines['top'].set_visible(False)
    ax.spines['right'].set_visible(False)
    plt.xlabel('most exciting independent variable')
    plt.ylabel("I'm not trolling")
    plt.legend(loc='best')
    plt.annotate("I CAN ALSO\n DO MATH:\n"+
                 "      "+
                 r"$\frac{e^{-\frac{x^2}{2}}}{\sqrt{2\pi}}$", 
        xy=(0.1, 0.4), arrowprops=dict(arrowstyle='->'), xytext=(2, 0.6))
    fname = "./graphics/xkcd1.png"
    plt.savefig(fname, dpi=300)
Explanation: Science, Data, Tools
or 'Tips and tricks for a your everyday workflow'
Matteo Guzzo
Prologue
AKA My Research
The cumulant expansion
The struggle has been too long, but we are starting to see the light...
As you might recall...
We are trying to go beyond the GW approximation
and succeed in describing satellites.
The spectral function
It looks like this:
\begin{equation}
 A(\omega) = \mathrm{Im}|G(\omega)|
\end{equation}
GW vs Cumulant
Mathematically very different:
\begin{equation}
 G^{GW} (\omega) = \frac1{ \omega - \epsilon - \Sigma (\omega) } 
\end{equation}
\begin{equation}
 G^C(t_1, t_2) = G^0(t_1, t_2) e^{ i \int_{t_1}^{t_2} \int_{t'}^{t_2} dt' dt'' W (t', t'') }
\end{equation}
BUT they connect through $\mathrm{Im} W (\omega) = \frac1\pi \mathrm{Im} \Sigma ( \epsilon - \omega )$.
Guzzo et al., Phys. Rev. Lett. 107, 166401, 2011
Implementation
Using a multi-pole representation for $\Sigma^{GW}$:
\begin{equation}
 \mathrm{Im} W (\omega) = \frac1\pi \mathrm{Im} \Sigma ( \epsilon - \omega )
\end{equation}
\begin{equation}
 W (\tau) = - i \lambda \bigl[ e^{ i \omega_p \tau } \theta ( - \tau ) + e^{ - i \omega_p \tau } \theta ( \tau ) \bigr]
\end{equation}
GW vs Cumulant
GW:
\begin{equation}
 A(\omega) = \frac1\pi \frac{\mathrm{Im}\Sigma (\omega)} 
 { [ \omega - \epsilon - \mathrm{Re}\Sigma (\omega) ]^2 + 
 [ \mathrm{Im}\Sigma (\omega) ]^2}
\end{equation}
Cumulant (plasmon-pole):
\begin{equation}
 A(\omega) = \frac1\pi \sum_{n=0}^{\infty} \frac{a^n}{n!} \frac{\Gamma}{ (\omega - \epsilon + n \omega_p)^2 + \Gamma^2 }
\end{equation}
Problems
<br>
\begin{equation}
 A(\omega) = \frac1\pi \sum_{n=0}^{\infty} \frac{a^n}{n!} \frac{\Gamma}{ (\omega - \epsilon + n \omega_p)^2 + \Gamma^2 }
\end{equation}
Alternative: full numerical
With $ t = t_2 - t_1 $:
\begin{equation}
 G^C (t) = G^0(t) e^{ i \int d\omega 
 \frac{W (\omega)} {\omega^2} \left( e^{i \omega t} -i \omega t - 1 \right) }
\end{equation}
<br>
Kas et al., Phys. Rev. B 90, 085112, 2014
To be continued... --> https://github.com/teoguso/SF.git
<img src="./graphics/githubSF.png" alt="test" width=600>
Acknowledgements
<img src="graphics/sky.png" width=60>
Jiangqiang "Sky" Zhou - Ecole Polytechnique, France
<img src="graphics/gatti.png" width=60>
Matteo Gatti - Ecole Polytechnique, France
<img src="graphics/andris.png" width=60>
Andris Gulans - HU Berlin
Let's talk about tools (My actual Outline)
How do you go about your everyday work?
What do you use to:
Write and maintain code
Review and analyse data
Present data and results
My answer
Git version control system: 
https://git-scm.com/
Python + matplotlib plotting library: 
https://www.python.org/ 
http://matplotlib.org/
Jupyter notebooks: 
http://jupyter.org/
Time to take a breath
(Questions?)
Git
QUESTION: Who knows what Git is?
State of the art for distributed version control
Version control?
<img src="graphics/vc-xkcd.jpg" width=700>
Git in a nutshell
<img src=http://i.stack.imgur.com/9IW5z.png width=500>
Git in a nutshell
Very powerful (essential) for collaborative work (e.g. software, articles)
Very useful for personal work
Ok, but what should I use it for?
Source code
Scripts
Latex documents
In short:
Any text-based (ASCII) project
Fortran, Python, Latex, Bash, ...
Python + matplotlib
End of explanation
Simple demo of a scatter plot.
# import numpy as np
# import matplotlib.pyplot as plt
N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2  # 0 to 15 point radiuses
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.savefig("./graphics/scatter_demo.png", dpi=200)
Explanation: <img src="files/graphics/xkcd1.png" width=700>
See https://www.xkcd.com
End of explanation
This shows an example of the "fivethirtyeight" styling, which
tries to replicate the styles from FiveThirtyEight.com.
from matplotlib import pyplot as plt
import numpy as np
x = np.linspace(0, 10)
with plt.style.context('fivethirtyeight'):
    plt.plot(x, np.sin(x) + x + np.random.randn(50))
    plt.plot(x, np.sin(x) + 0.5 * x + np.random.randn(50))
    plt.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
    
plt.savefig("./graphics/fivethirtyeight_demo.png", dpi=200)
Explanation: <img src="./graphics/scatter_demo.png" width=700>
http://matplotlib.org/gallery.html
End of explanation
<END_TASK>