In [10]:
from chxanalys.chx_packages import *
%matplotlib notebook
plt.rcParams.update({'figure.max_open_warning': 0})
#%reset -f #for clean up things in the memory
In [11]:
data_dir = '/XF11ID/analysis/2017_1/manisen/Results/'
In [ ]:
In [20]:
suid_dict = {'Temp=175C_c_1' :'343e85','Temp=175C_c_2' :'e3e325',
'Temp=175C_c_3' :'db5a54', 'Temp=175C_c_4' :'913ed9', 'Temp=175C_c_5' :'e7dda7',
'Temp=175C_c_6' :'f19723' }
In [21]:
uid_dict = {}
for u in list( suid_dict.keys() ):
uid_dict[u] = get_meta_data( suid_dict[u] )['uid']
print( uid_dict )
In [22]:
total_res = {}
In [23]:
for u in list( uid_dict.keys() ):
inDir = data_dir + suid_dict[u] + '/'
total_res[u] = extract_xpcs_results_from_h5( filename = 'uid=%s_Res.h5'%uid_dict[u], import_dir = inDir )
In [24]:
print( total_res[list( uid_dict.keys() )[0]].keys() )
In [ ]:
In [29]:
qth_interest = 9 #3 #the intested single qth
In [30]:
fig,ax=plt.subplots()
for u in sorted(list( uid_dict.keys() )):
print(u)
plot1D( x = total_res[u]['taus4'], y= total_res[u]['g4'][:,qth_interest],
ax=ax, legend= u, ylim=[0, 0.0001], legend_size = 8, xlabel='t (sec)', ylabel='g4',
title='four_order_time_correlation-->q=%s'%total_res[u]['qval_dict'][qth_interest][0], logx=True )
plt.savefig( data_dir +'g4_101k44pc_175_new_3.png' )
In [32]:
fig,ax=plt.subplots()
for u in sorted(list( uid_dict.keys() )):
y= total_res[u]['g2'][1:,qth_interest]
ym = (y-y.min())/(y.max()-y.min())
plot1D( x = total_res[u]['taus'][1:], y= ym,
ax=ax, legend= u, ylim=[-0.1, 1.1], legend_size = 10, xlabel='tau (sec)', ylabel='g1',
title='normalized' +'one_time_correlation-->q=%s'%total_res[u]['qval_dict'][qth_interest][0], logx=True )
plt.savefig( data_dir +'normalized'+'g__101k44pc_175_new_3.png' )
In [36]:
fig,ax=plt.subplots()
for u in sorted(list( uid_dict.keys() )):
plot1D( x = total_res[u]['taus'], y= total_res[u]['g2'][:,qth_interest],
ax=ax, legend= u, ylim=[0.99, 1.15], legend_size = 10, xlabel='tau (sec)', ylabel='g2',
title='one_time_correlation-->q=%s'%total_res[u]['qval_dict'][qth_interest][0], logx=True )
plt.savefig( data_dir +'g2_101k44pc__175_new_3.png' )
In [333]:
qs = np.array([total_res[u]['qval_dict'][i][0] for i in range( len(list(total_res[u]['qval_dict'].keys())) ) ])
In [334]:
fig,ax=plt.subplots()
for u in sorted(list( uid_dict.keys() )):
x= qs
y= 1/total_res[u]['g2_fit_paras']['relaxation_rate']
#print(y)
plot1D( x = qs, y= y, ax=ax, ylim=[0,200], legend= u, legend_size = 8, ls = '--',
xlabel='q, (A-1)', ylabel='relaxation_time, (s)',
title='q~relaxation_time', logx=True, logy=True )
plt.savefig( data_dir +'q~relaxation_time.png' )
In [ ]:
In [ ]: