In [1]:
import quantumpropagator as qp
import matplotlib.pyplot as plt
from matplotlib import cm
import matplotlib
from ipywidgets import interact,fixed #, interactive, fixed, interact_manual
import ipywidgets as widgets
import os
import glob
import pandas as pd
%matplotlib notebook
#%matplotlib ipympl

plt.rcParams.update({'font.size': 10})

New analysis for final with core separation and everything


In [2]:
#%matplotlib ipympl

import glob
runs = ['UVx','UVz']

for run in runs:
    folder = '/home/alessio/w-August-Run/OUTPUTS/newbonds/{}'.format(run)
    files_ob = sorted(glob.glob('{}/*1.csv'.format(folder)))
    files_nb = sorted(glob.glob('{}/*2.csv'.format(folder)))
    list_dfs_old = []
    list_dfs_new = []
    for i in range(len(files_ob)): # all wavefunctions
        name_old = files_ob[i]
        name_new = files_nb[i]
        data_old = pd.read_csv(name_old, names=['fs','old_bond_popu','old_bond_cohe','old_bond_core_popu','old_bond_core_cohe','old_bond_inactive_popu','old_bond_inactive_cohe','old_bond_active_popu','old_bond_active_cohe'])
        data_new = pd.read_csv(name_new, names=['fs','new_bond_popu','new_bond_cohe','new_bond_core_popu','new_bond_core_cohe','new_bond_inactive_popu','new_bond_inactive_cohe','new_bond_active_popu','new_bond_active_cohe'])
        list_dfs_old.append(data_old)
        list_dfs_new.append(data_new)

    frame_old = pd.concat(list_dfs_old, axis=0, ignore_index=True)    
    frame_new = pd.concat(list_dfs_new, axis=0, ignore_index=True)    

    frame_new.drop('fs', axis=1, inplace=True)

    all_final = pd.concat([frame_old,frame_new],axis=1)
    all_final.to_csv('/home/alessio/w-August-Run/OUTPUTS/newbonds/{}_inbetweenbonds_new_way_2020.txt'.format(run))
#files_ob,files_nb

In [3]:
for run in runs:
    file = '/home/alessio/w-August-Run/OUTPUTS/newbonds/{}_inbetweenbonds_new_way_2020.txt'.format(run)
    
    fig, [[ax0,ax1],[ax2,ax3],[ax4,ax5],[ax6,ax7]] = plt.subplots(4,2,figsize=(10,10))
    all_final = pd.read_csv(file)
    ax0.plot(all_final['fs'],all_final['old_bond_popu'])
    ax0.plot(all_final['fs'],all_final['new_bond_popu'])
    ax0.set_title('Population term total')

    ax1.plot(all_final['fs'],all_final['old_bond_cohe'])
    ax1.plot(all_final['fs'],all_final['new_bond_cohe'])
    ax1.set_title('Coherence term total')

    ax2.plot(all_final['fs'],all_final['old_bond_core_popu'])
    ax2.plot(all_final['fs'],all_final['new_bond_core_popu'])
    ax2.set_title('Population term - core')

    ax3.plot(all_final['fs'],all_final['old_bond_core_cohe'])
    ax3.plot(all_final['fs'],all_final['new_bond_core_cohe'])
    ax3.set_title('Coherence term - core')

    ax4.plot(all_final['fs'],all_final['old_bond_inactive_popu'])
    ax4.plot(all_final['fs'],all_final['new_bond_inactive_popu'])
    ax4.set_title('Population term - inactive')

    ax5.plot(all_final['fs'],all_final['old_bond_inactive_cohe'])
    ax5.plot(all_final['fs'],all_final['new_bond_inactive_cohe'])
    ax5.set_title('Coherence term - inactive')

    ax6.plot(all_final['fs'],all_final['old_bond_active_popu'])
    ax6.plot(all_final['fs'],all_final['new_bond_active_popu'])
    ax6.set_title('Population term - active')
    ax6.set_xlabel('fs')

    ax7.plot(all_final['fs'],all_final['old_bond_active_cohe'])
    ax7.plot(all_final['fs'],all_final['new_bond_active_cohe'])
    ax7.set_title('Coherence term - active')
    ax7.set_xlabel('fs')


    #fig.canvas.layout.height = '1200px'
    fig.tight_layout()



In [62]:
labelz = ['UV(x)','UV(z)']

plt.rcParams.update({'font.size': 22})
for i, run in enumerate(runs):
    file = '/home/alessio/w-August-Run/OUTPUTS/newbonds/{}_inbetweenbonds_new_way_2020.txt'.format(run)
    lwt = 3
    all_final = pd.read_csv(file)
    fig, axes = plt.subplots(3,3,figsize=(10,10))

    plt.subplots_adjust(hspace=0)
    ax0 = plt.subplot2grid((3, 3), (0, 0), colspan = 3, rowspan=1)
    ax0.set_xticks([])
    ax1 = plt.subplot2grid((3, 3), (1, 0), colspan = 3, rowspan=2)


    normalization = all_final['old_bond_popu'] + all_final['new_bond_popu']
    y1=all_final['old_bond_popu']/normalization
    y2=all_final['new_bond_popu']/normalization
    ax1.plot(all_final['fs'],y1,color='r', lw=lwt)
    ax1.plot(all_final['fs'],y2,color='b', lw=lwt)
#     ax1.annotate(labelz[i],(175,0.538))
#     ax1.annotate('Old\nbond', (25,0.53), color='r')
#     ax1.annotate('New\nbond', (25,0.47), color='b')
    
    yy1=all_final['old_bond_cohe']
    yy2=all_final['new_bond_cohe'] 
    
    ax0.plot(all_final['fs'],yy1,color='r', lw=lwt, ls = ':')
    ax0.plot(all_final['fs'],yy2,color='b', lw=lwt, ls = ':')
    
#     ax1.set_xlabel('Time (fs)')
#     ax1.set_ylabel('Normalized electronic density')
#     #fig.canvas.layout.height = '1200px'
    fig.tight_layout()
    output = '/STORE/alessio/things/OneDrive/Liege/u-3dPropagation_manuscript/Report/images/FIGURE4/inbetw_{}.png'.format(i)
    fig.savefig(output)



In [26]:
# FT of the in_between_bonds curve.
from scipy import signal
def pythonfft(signal_time,signal,pad_length):
    '''
    fast fourier transform
    signal_time :: np.array(double) <- the time array in femtoseconds
    signal :: np.array(double) <- the signal in hartree 
    pad_length :: the length of the padding to increase resolution
    returns :: frequencies in eV and the positive side of the signal fft
    '''
    signal_fft = np.fft.fft(np.pad(signal,(0,pad_length)))
    time_au = qp.fromFsToAu(signal_time)
    dt = time_au[1]- time_au[0]
    frequancies_from_routine = np.fft.fftfreq(time_au.size + pad_length)

    time_au_max = np.amax(time_au)
    frequencies = qp.fromHartoEv(frequancies_from_routine*2*np.pi/dt)
    indexes = np.where(frequancies_from_routine>=0)
    return(frequencies[indexes],signal_fft[indexes])

dt = all_final['fs'][1]-all_final['fs'][0]
pad_l = 100
timefs = np.linspace(0,200,401 + pad_l + pad_l)
new = all_final['old_bond_cohe']
#new = all_final['new_bond_popu']

at_zero = new - new[0] + 0.3
at_zero_padded = np.pad(at_zero,pad_l)

window = signal.gaussian(timefs.shape[0], std=90)
tot_signal_windowed =  at_zero_padded * window

ft, ft_eV = pythonfft(timefs,at_zero_padded,10000)

fig, [ax0,ax1] = plt.subplots(2,1,figsize=(10,10))

print(timefs.shape, at_zero_padded.shape)
ax0.plot(timefs, tot_signal_windowed)
ax0.plot(timefs, window)

ax1.plot(ft,np.abs(ft_eV))
#ax1.set_xlim(0,1)

fig.canvas.layout.height = '900px'
fig.tight_layout()


/home/alessio/config/quantumpropagator/lib/python3.6/site-packages/ipykernel_launcher.py:35: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
(601,) (601,)

old part (not so old)


In [2]:
fol = '/home/alessio/Desktop/Dropbox/USA/bet/'
subfolders = sorted([dir for dir in os.listdir(fol) if os.path.isdir(os.path.join(fol,dir)) and dir != os.path.join(fol,'.ipynb_checkpoints')])
print(''.join(['{} -> {}\n'.format(a,b) for a,b in enumerate(subfolders)]))


0 -> b-pulseAlongX_0.22_goodG_0000
1 -> b-pulseAlongX_0.22_short_0_goodG_0000
2 -> b-pulseAlongX_0.22_short_pi_goodG_0000
3 -> c-Experiments_on_Nac_0000
4 -> d-experiments_smooth01_0000
5 -> d-experiments_smooth10_0000
6 -> d-experiments_smooth50_0000
7 -> h-IR-X_80_0000
8 -> i-IR-Z_80_0000
9 -> k-IR-Y_80_0000
10 -> l-IR-XZ-50_0000
11 -> l-IR-XZ-70_0000
12 -> l-IR-XZ-90_0000
13 -> m-only_IR_longer_with_nac_2_1_0000
14 -> m-only_IR_longer_with_nac_2_1_counterClock_0000
15 -> m-only_IR_longer_with_nac_2_1_inverted_phase_0000
16 -> m-only_IR_longer_with_nac_2_1_phase_pi_0000
17 -> m-only_IR_middle100_0000
18 -> m-only_IR_middle140_0000
19 -> m-only_IR_middle50_0000
20 -> m-only_IR_middle80_0000
21 -> m-only_IR_middle90_0000
22 -> m-only_IR_retarded75_0000
23 -> m-only_IR_retarded80_0000
24 -> m-only_IR_retarded85_0000
25 -> m-only_IR_retarded90_0000
26 -> m-only_IR_short_with_nac_2_1_0000
27 -> m-only_IR_short_with_nac_2_1_inverted_phase_0000
28 -> m-only_IR_short_with_nac_2_1_phase_pi_0000
29 -> m-only_IR_xy_Longer_0000
30 -> n-IR-YZ-50_0000
31 -> n-IR-YZ-70_0000
32 -> n-IR-YZ-90_0000
33 -> x-FC-6-NAC100_0000
34 -> y-IR_140_nac0_0000
35 -> y-IR_140_nac10_0000
36 -> z-from_S1_without_pulse_0000
37 -> z-from_S2_without_pulse_0000


In [3]:
i_want = [0]
selected = [ subfolders[i] for i in i_want ]

In [4]:
viridis = cm.get_cmap('hsv',12)
colors = viridis(np.linspace(0,1, len(i_want)+1))

def graph_between_bonds(folder_list):
    fig, [ax0,ax1] = plt.subplots(2,1,figsize=(10,10))
    
    
    for i, this_folder in enumerate(folder_list):
        abs_path = os.path.join(fol,this_folder)
        fir_file = os.path.join(abs_path, 'list_first.dat')
        sec_file = os.path.join(abs_path, 'list_second.dat')
        population_file = os.path.join(abs_path, 'outputPopul')
        dataP = pd.read_csv(population_file, delim_whitespace=True, header=None)
        fir = np.loadtxt(fir_file)
        sec = np.loadtxt(sec_file)
        norm = 0.317460*0.317460*0.317460
        ax0.plot(fir[:,0],fir[:,1]*norm, color=colors[i], ls='-', label='{} single bond'.format(this_folder))
        ax0.plot(sec[:,0],sec[:,1]*norm, color=colors[i], ls='--', label='{} double bond'.format(this_folder))
        ax1.plot(dataP[0],dataP[2], color=colors[i], ls='-', label=r'{} $S_1$'.format(this_folder))
    
    ax1.set_ylim([0,1.01])
    ax0.legend()
    ax1.legend()
    ax0.set_title(this_folder)
    ax0.set_xlabel('fs')
    ax0.set_ylabel('Fraction of 50 electrons')
    
    fig.tight_layout()
        
graph_between_bonds(selected)


Blender visualizer


In [2]:
file_geom = '/home/alessio/densities/prova_bonds_cylinder/geoms.p'

geoms = qp.pickleLoad(file_geom)

Prima prova


In [11]:
%%bash

/home/alessio/prova_bonds_cylinder/graphs/sync.sh


bash: line 2: /home/alessio/prova_bonds_cylinder/graphs/sync.sh: No such file or directory

In [12]:
folddat = '/home/alessio/prova_bonds_cylinder/graphs'

files_dat = glob.glob(folddat + '/old/*.dat')
files_dat = glob.glob(folddat + '/0.6/*.dat')
#files_dat = glob.glob(folddat + '/new_withr_c-0.6-r_s-0.6-cs-0.0/*.dat')

matplotlib.rcParams.update({'font.size': 12})

data = [ np.loadtxt(i) for i in files_dat ]

fig, ax0 = plt.subplots(1,1,figsize = (10,8))

colors = ['b','r','g','c']
labels = ['single','double','C9 sphere','C8 sphere']

for i, this_data in enumerate(data):
    ax0.plot(this_data[:,0],this_data[:,1], label='UV {}'.format(labels[i]), color=colors[i])


ax0.set_xlabel("fs")
ax0.set_ylabel('Fraction of 50 electrons')
ax0.legend()
fig.tight_layout()


from pickle to vmd


In [21]:
filename = '/home/alessio/prova_bonds_cylinder/second_first.p'
#filename = '/home/alessio/prova_bonds_cylinder/CANCELLAMI/r-0.6-cyc-0.6/r-0.6-cyc-0.6-lists.p'
diction = qp.pickleLoad(filename)

selection = diction['list_1']

new_index = 32590

geom = flat_geoms[new_index]
new_first = selection[new_index]
selected_grids = list_of_points_in_3d[new_first]

qp.saveTraj(np.array([geom]),['C','C','C','H','H','H','H','C','C','C','C','H','H','H','H'],'/home/alessio/prova_bonds_cylinder/new_norb', True)
n_gridpoints, _ = selected_grids.shape
atomT = ['H']*n_gridpoints
qp.saveTraj(np.array([selected_grids]), atomT, '/home/alessio/prova_bonds_cylinder/new_first',True)


---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-21-c96410928592> in <module>()
      1 filename = '/home/alessio/prova_bonds_cylinder/second_first.p'
      2 #filename = '/home/alessio/prova_bonds_cylinder/CANCELLAMI/r-0.6-cyc-0.6/r-0.6-cyc-0.6-lists.p'
----> 3 diction = qp.pickleLoad(filename)
      4 
      5 selection = diction['list_1']

~/Desktop/git/GridQuantumPropagator/Scripts/quantumpropagator/GeneralFunctions.py in pickleLoad(fn)
     32     fn :: FilePath
     33     '''
---> 34     return pickle.load(open(fn,'rb'))
     35 
     36 def pickleSave(fn,thing):

FileNotFoundError: [Errno 2] No such file or directory: '/home/alessio/prova_bonds_cylinder/second_first.p'

On the new ones


In [2]:
%%bash
/home/alessio/densities/From_pinot/sync.sh


bash: line 1: /home/alessio/densities/From_pinot/sync.sh: No such file or directory
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
<ipython-input-2-eb6d6122ac6c> in <module>
----> 1 get_ipython().run_cell_magic('bash', '', '/home/alessio/densities/From_pinot/sync.sh\n')

~/config/quantumpropagator/lib/python3.6/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
   2357             with self.builtin_trap:
   2358                 args = (magic_arg_s, cell)
-> 2359                 result = fn(*args, **kwargs)
   2360             return result
   2361 

~/config/quantumpropagator/lib/python3.6/site-packages/IPython/core/magics/script.py in named_script_magic(line, cell)
    140             else:
    141                 line = script
--> 142             return self.shebang(line, cell)
    143 
    144         # write a basic docstring:

</home/alessio/config/quantumpropagator/lib/python3.6/site-packages/decorator.py:decorator-gen-110> in shebang(self, line, cell)

~/config/quantumpropagator/lib/python3.6/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
    185     # but it's overkill for just that one bit of state.
    186     def magic_deco(arg):
--> 187         call = lambda f, *a, **k: f(*a, **k)
    188 
    189         if callable(arg):

~/config/quantumpropagator/lib/python3.6/site-packages/IPython/core/magics/script.py in shebang(self, line, cell)
    243             sys.stderr.flush()
    244         if args.raise_error and p.returncode!=0:
--> 245             raise CalledProcessError(p.returncode, cell, output=out, stderr=err)
    246 
    247     def _run_script(self, p, cell, to_close):

CalledProcessError: Command 'b'/home/alessio/densities/From_pinot/sync.sh\n'' returned non-zero exit status 127.

In [3]:
#folddat = '/home/alessio/densities/From_pinot/calculationZ/r_c-1.6-non-overlapping/ALL'
folddat = '/home/alessio/densities/From_pinot/calculationZ/r_c_1.4-non-overlapping/ALL'
# folddat = '/home/alessio/densities/From_pinot/calculationZ/r_c-1.2-non-overlapping/ALL'
# folddat = '/home/alessio/densities/From_pinot/calculationZ/r_c-1.0-non-overlapping/ALL'

subfolders = sorted([dir for dir in os.listdir(folddat) if os.path.isdir(os.path.join(folddat,dir))])
print(''.join(['{} -> {}\n'.format(a,b) for a,b in enumerate(subfolders)]))


0 -> no_s0
1 -> with_s0


In [17]:
select_these = [0]

lts = ['-',':','--']
fol_lab = ['UV', 'IR INV','IR LONG', 'IR NOR', 'P1', 'P2', 'P3', 'P4', 'P5', 'FC-excite', 'To excite', 'shit', 'UV-excite', 'FC']
#fol_lab = ['UV','IR LONG', 'IR INV']


fig, ax0 = plt.subplots(1,1,figsize = (18,8))


for ii,i in enumerate(select_these):
    subdir = os.path.join(folddat,subfolders[i])
    files_dat = sorted([ os.path.join(subdir,x) for x in os.listdir(subdir) if x[-4:] == '.dat' and x[0] == 'l'])
    #print(files_dat)
    data = [ np.loadtxt(i) for i in files_dat ]

    
    colors = ['r','b']
    labels = ['red','blue']

    for j, this_data in enumerate(data):
        ax0.plot(this_data[:,0],this_data[:,1], label='{} {}'.format(fol_lab[i], labels[j]), color=colors[j],linestyle=lts[ii])


#ax0.set_xlim([0,40])
ax0.set_xlabel("fs")
ax0.set_ylabel('Fraction of 4 electrons')
ax0.legend()
fig.tight_layout()

In [5]:
select_these = [0,3,13]

lts = ['-',':','--']
fol_lab = ['UV', 'IR INV','IR LONG', 'IR NOR', 'P1', 'P2', 'P3', 'P4', 'P5', 'FC-excite', 'To excite', 'shit', 'UV-excite', 'FC']


fig, ax0 = plt.subplots(1,1,figsize = (15,8))


for ii,i in enumerate(select_these):
    subdir = os.path.join(folddat,subfolders[i])
    files_dat = [ os.path.join(subdir,x) for x in os.listdir(subdir) if x[-4:] == '.dat']

    data = [ np.loadtxt(i) for i in files_dat ]

    
    colors = ['b','r','k','dimgray']
    labels = ['Blue','red','C9 sphere','C8 sphere']

    for j, this_data in enumerate(data):
        ax0.plot(this_data[:,0],this_data[:,1], label='{} {}'.format(fol_lab[i], labels[j]), color=colors[j],linestyle=lts[ii])

#ax0.set_xlim([0,60])
ax0.set_xlabel("fs")
ax0.set_ylabel('Fraction of 4 electrons')
ax0.legend()
fig.tight_layout()



In [18]:


In [44]:
typez = 'ALL'
folddats = ['/home/alessio/densities/From_pinot/calculationZ/r_c-1.6-non-overlapping/{}/b-UV-0.22_0000'.format(typez),
            '/home/alessio/densities/From_pinot/calculationZ/r_c_1.4-non-overlapping/{}/b-UV-0.22_0000'.format(typez),
            '/home/alessio/densities/From_pinot/calculationZ/r_c-1.2-non-overlapping/{}/b-UV-0.22_0000'.format(typez),
            '/home/alessio/densities/From_pinot/calculationZ/r_c-1.0-non-overlapping/{}/b-UV-0.22_0000'.format(typez)]

lts = ['-',':','--','-.']
fol_lab = ['1.6','1.4','1.2','1.0']
fig, ax0 = plt.subplots(1,1,figsize = (15,8))

for ii,i in enumerate(folddats):
    files_dat = [ os.path.join(i,x) for x in os.listdir(i) if x[-4:] == '.dat']
    data = [ np.loadtxt(i) for i in files_dat ]
    
    colors = ['b','r']
    labels = ['Blue','red']

    for j, this_data in enumerate(data):
        ax0.plot(this_data[:,0],this_data[:,1], label='{} {}'.format(fol_lab[ii], labels[j]), color=colors[j],linestyle=lts[ii])

    ax0.set_xlabel("fs")
    ax0.set_ylabel('Fraction of 50 electrons')
    ax0.legend()
    fig.tight_layout()



In [45]:
typez = 'ACTIVE'
folddats = ['/home/alessio/densities/From_pinot/calculationZ/r_c-1.6-non-overlapping/{}/b-UV-0.22_0000'.format(typez),
            '/home/alessio/densities/From_pinot/calculationZ/r_c_1.4-non-overlapping/{}/b-UV-0.22_0000'.format(typez),
            '/home/alessio/densities/From_pinot/calculationZ/r_c-1.2-non-overlapping/{}/b-UV-0.22_0000'.format(typez),
            '/home/alessio/densities/From_pinot/calculationZ/r_c-1.0-non-overlapping/{}/b-UV-0.22_0000'.format(typez)]

lts = ['-',':','--','-.']
fol_lab = ['1.6','1.4','1.2','1.0']
fig, ax0 = plt.subplots(1,1,figsize = (15,8))

for ii,i in enumerate(folddats):
    files_dat = [ os.path.join(i,x) for x in os.listdir(i) if x[-4:] == '.dat']
    data = [ np.loadtxt(i) for i in files_dat ]
    
    colors = ['b','r']
    labels = ['Blue','red']

    for j, this_data in enumerate(data):
        ax0.plot(this_data[:,0],this_data[:,1], label='{} {}'.format(fol_lab[ii], labels[j]), color=colors[j],linestyle=lts[ii])

    ax0.set_xlabel("fs")
    ax0.set_ylabel('Fraction of 50 electrons')
    ax0.legend()
    fig.tight_layout()


Mark high resolutions


In [5]:
files = glob.glob('/home/alessio/dox/Alessio-Francoise/Results_MD_October2019/UV/*overl*')
files


Out[5]:
['/home/alessio/dox/Alessio-Francoise/Results_MD_October2019/UV/UV_BONDS_r_c_1.4-non-overlapping_ACTIVE.txt',
 '/home/alessio/dox/Alessio-Francoise/Results_MD_October2019/UV/UV_BONDS_r_c_1.4-non-overlapping_ALL.txt']

In [12]:
files_uv = '/home/alessio/dox/Alessio-Francoise/Results_MD_October2019/UV/UV.txt'
bbb = pd.read_csv(files_uv, index_col=0)
list(bbb.columns)


Out[12]:
['steps',
 'fs',
 'Norm deviation',
 'Kinetic',
 'Potential',
 'Total',
 'Total Deviation',
 'Xpulse',
 'Ypulse',
 'Zpulse',
 'S0',
 'S1',
 'S2',
 'S3',
 'S4',
 'S5',
 'S6',
 'S7',
 'Time AU',
 'Non-decided',
 'Reactants',
 'Products',
 'P(t) Tot',
 'P(t) S0',
 'P(t) S1',
 'P(t) S2',
 'P(t) S3',
 'P(t) S4',
 'P(t) S5',
 'P(t) S6',
 'P(t) S7']

In [6]:
dfs = [ pd.read_csv(x, index_col=0) for x in files]

In [22]:
fig, ax0 = plt.subplots(1,1,figsize = (10,6))

ind = 1

x = dfs[ind]['Time']

norm = dfs[ind]['Old bond'] + dfs[ind]['New Bond']
norm = 1
for y_label in ['Old bond', 'New Bond']:
    y = dfs[ind][y_label]
    ax0.plot(x,y/norm, label=y_label)

ax1 = ax0.twinx()
ax1.set_ylim(0.41,0.46)
ax1.plot(bbb['fs'], bbb['S0'])
ax0.set_xlabel('fs')
ax0.legend()
fig.tight_layout()



In [ ]: