In [1]:
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
In [2]:
def exp_XRD(filename):
df = pd.read_csv(filename,index_col=0,usecols=[0,1])
#print(df)
l_ang = np.array(df.index)
l_int = np.array(df.iloc[:,0])
l_int = np.array([float(d) for d in l_int])
#print(l_int)
#print(min(l_int))
l_int = l_int - min(l_int)
#print(l_int)
k = max(l_int)
l_int = l_int/k
return df, l_ang, l_int
In [3]:
def exp_XRD_back(f1,f2): # f1: measured sample f2: holder
df1 = pd.read_csv(f1,index_col=0,usecols=[0,1])
df2 = pd.read_csv(f2,index_col=0,usecols=[0,1])
#print(df)
l_ang = np.array(df1.index)
l_int1 = np.array(df1.iloc[:,0])
l_int1 = np.array([float(d) for d in l_int1])
l_int2 = np.array(df2.iloc[:,0])
l_int2 = np.array([float(d) for d in l_int2])
#print(l_int)
#print(min(l_int))
l_int = l_int1 - l_int2
l_int = l_int - min(l_int)
#print(l_int)
k = max(l_int)
l_int = l_int/k
return df1, l_ang, l_int
In [4]:
df_2pow_1, l_ang_2pow_1, l_int_2pow_1 = exp_XRD("20210913_Ag2-xCuxS0.7Te0.3_No.2_3days.txt")
In [5]:
df_2pow_2, l_ang_2pow_2, l_int_2pow_2 = exp_XRD("20220704_Ag2S0.7Te0.3_No.2_20-60_powder_2nd.txt")
In [6]:
df_3pow_1, l_ang_3pow_1, l_int_3pow_1 = exp_XRD("20230117_Ag2S0.7Te0.3_No.3_powder_after_anneal.txt")
In [7]:
df_3pel_1, l_ang_3pel_1, l_int_3pel_1 = exp_XRD("20230125_Ag2S0.7Te0.3_No.3_pellet_before_anneal_2.txt")
In [8]:
df_11pow, l_ang_11pow, l_int_11pow = exp_XRD("20211027_Ag2S0.5Te0.5_No.11_1day.txt")
In [9]:
df_11pow_2, l_ang_11pow_2, l_int_11pow_2 = exp_XRD("20220721_Ag2S0.5Te0.5_No.11_20-60_powder_2nd.txt")
In [10]:
df_17, l_ang_17pow, l_int_17pow = exp_XRD("20211118_Ag2S0.8Te0.2_No.17.txt")
In [11]:
df_17pel_1, l_ang_17pel_1, l_int_17pel_1 = exp_XRD("20230321_#17_Ag2S0.8Te0.2_annealed_180degC.txt")
In [12]:
df_20, l_ang_20pow_1, l_int_20pow_1 = exp_XRD("20220208_Ag2S0.2Te0.8_No.20_10-90.txt")
In [13]:
df_20, l_ang_20pow_2, l_int_20pow_2 = exp_XRD("20230207_#20_Ag2S0.2Te0.8_after_1_year.txt")
In [14]:
df_20, l_ang_20pow_3, l_int_20pow_3 = exp_XRD("20230217_#20_Ag2S0.2Te0.8_after_1day_annealing_57degC.txt")
In [15]:
df_21, l_ang_21pow_1, l_int_21pow_1 = exp_XRD("20220201_Ag2S0.3Te0.7_No.21.txt")
In [16]:
df_21_2, l_ang_21pow_2, l_int_21pow_2 = exp_XRD("20230117_#21_Ag2S0.3Te0.7_after_1_year.txt")
In [17]:
df_21_3, l_ang_21pow_3, l_int_21pow_3 = exp_XRD("20230217_#21_Ag2S0.3Te0.7_after_annealing_1day_87degC.txt")
In [18]:
df_21_4, l_ang_21pow_4, l_int_21pow_4 = exp_XRD("20230217_#21_Ag2S0.3Te0.7_after_annealing_1day_87degC_2.txt")
In [19]:
df_21_1, l_ang_21pel_1, l_int_21pel_1 = exp_XRD("20230321_#21_Ag2S0.3Te0.7_150degC.txt")
In [20]:
df_22, l_ang_22pel_1, l_int_22pel_1 = exp_XRD("20230112_Ag2S0.4Te0.6_No.22_20-60_pellet_before_anneal_230degC.txt")
In [21]:
df_23, l_ang_23pel_1, l_int_23pel_1 = exp_XRD("20230112_Ag2S0.5Te0.5_No.23_20-60_pellet_before_anneal.txt")
In [22]:
df_26, l_ang_26pow_1, l_int_26pow_1 = exp_XRD("20230206_Ag2S0.55Te0.45_No.26_20-60_powder_10months_later.txt")
In [23]:
df_27, l_ang_27pow_1, l_int_27pow_1 = exp_XRD("20230206_Ag2S0.65Te0.35_No.27_20-60_powder_10months_later.txt")
In [24]:
df_29, l_ang_29pow_1, l_int_29pow_1 = exp_XRD("20230207_Ag2S0.4Te0.6_No.29_20-60_powder_after_anneal_180degC.txt")
In [25]:
df_29, l_ang_29pow_2, l_int_29pow_2 = exp_XRD("20230213_Ag2S0.4Te0.6_No.29_20-60_powder_after_anneal_180degC_4days.txt")
In [26]:
df_29, l_ang_29pel_1, l_int_29pel_1 = exp_XRD("20230120_Ag2S0.4Te0.6_No.29_20-60_pellet_after_anneal_230degC.txt")
In [27]:
df_29, l_ang_29pel_2, l_int_29pel_2 = exp_XRD("20230126_Ag2S0.4Te0.6_No.29_20-60_pellet_after_anneal_170degC.txt")
In [28]:
df_42pow_1, l_ang_42pow_1, l_int_42pow_1 = exp_XRD("20220729_Ag2S0.6Te0.4_No.42_20-60_powder_1st.txt")
In [29]:
df_42pow_2, l_ang_42pow_2, l_int_42pow_2 = exp_XRD("20220826_Ag2S0.6Te0.4_No.42_20-60_powder_2nd_after_1_month.txt")
In [30]:
df_42pow_3, l_ang_42pow_3, l_int_42pow_3 = exp_XRD("20220921_Ag2S0.6Te0.4_No.42_20-60_powder_3rd_50days.txt")
In [31]:
df_43pow_1, l_ang_43pow_1, l_int_43pow_1 = exp_XRD("20220729_Ag2S0.5Te0.5_No.43_20-60_powder_1st.txt")
In [32]:
df_43pow_2, l_ang_43pow_2, l_int_43pow_2 = exp_XRD("20220826_Ag2S0.5Te0.5_No.43_20-60_powder_3rd_after_1_month.txt")
In [33]:
df_43pow_3, l_ang_43pow_3, l_int_43pow_3 = exp_XRD("20220921_Ag2S0.5Te0.5_No.43_20-60_powder_4th_after_50days.txt")
In [34]:
df_43pow_4, l_ang_43pow_4, l_int_43pow_4 = exp_XRD("20221201_Ag2S0.5Te0.5_No.43_20-60_powder_5th_after_4months.txt")
In [35]:
df_43pow_5, l_ang_43pow_5, l_int_43pow_5 = exp_XRD("20230207_Ag2S0.5Te0.5_No.43_20-60_powder_after_annealing_180degC.txt")
In [36]:
df_43pow_6, l_ang_43pow_6, l_int_43pow_6 = exp_XRD("20230213_Ag2S0.5Te0.5_No.43_20-60_powder_after_annealing_180degC_4days.txt")
In [37]:
df_43pel_1, l_ang_43pel_1, l_int_43pel_1 = exp_XRD("20220929_Ag2S0.5Te0.5_No.43_20-60_pellet_1st.txt")
In [38]:
df_43pel_2, l_ang_43pel_2, l_int_43pel_2 = exp_XRD("20221003_Ag2S0.5Te0.5_No.43_20-60_pellet_2nd_after_LFA.txt")
In [39]:
df_43pel_3, l_ang_43pel_3, l_int_43pel_3 = exp_XRD("20230126_Ag2S0.5Te0.5_No.43_20-60_pellet_3rd_after_annealing_200degC.txt")
In [40]:
df_49pow_1, l_ang_49pow_1, l_int_49pow_1 = exp_XRD("20221004_Ag2S0.7Te0.3_No.49_powder_1st.txt")
In [41]:
df_49pow_2, l_ang_49pow_2, l_int_49pow_2 = exp_XRD("20230109_Ag2S0.7Te0.3_No.49_powder_3rd_400degC.txt")
In [42]:
df_49pow_3, l_ang_49pow_3, l_int_49pow_3 = exp_XRD("20230110_Ag2S0.7Te0.3_No.49_powder_400degC_2.txt")
In [43]:
df_49pow_4, l_ang_49pow_4, l_int_49pow_4 = exp_XRD("20221201_Ag2S0.7Te0.3_No.49_powder_3rd_2months_later.txt")
In [44]:
df_49pel_1, l_ang_49pel_1, l_int_49pel_1 = exp_XRD("20221005_Ag2S0.7Te0.3_No.49_pellet_1st.txt")
In [45]:
df_49pel_2, l_ang_49pel_2, l_int_49pel_2 = exp_XRD("20230125_Ag2S0.7Te0.3_No.49_pellet_2nd.txt")
In [46]:
df_49pel_3, l_ang_49pel_3, l_int_49pel_3 = exp_XRD("20230321_Ag2S0.7Te0.3_No.49_pellet_after_135degC.txt")
In [47]:
df_49pel_4, l_ang_49pel_4, l_int_49pel_4 = exp_XRD("20230324_Ag2S0.7Te0.3_No.49_pellet_after_100degC_20-60deg.txt")
In [48]:
df_50pow_1, l_ang_50pow_1, l_int_50pow_1 = exp_XRD("20221004_Ag2S0.5Te0.5_No.50_20-60_powder_1st.txt")
In [49]:
df_50pow_2, l_ang_50pow_2, l_int_50pow_2 = exp_XRD("20221201_Ag2S0.5Te0.5_No.50_20-60_powder_2nd.txt")
In [50]:
df_50pow_3, l_ang_50pow_3, l_int_50pow_3 = exp_XRD("20221216_Ag2S0.5Te0.5_No.50_20-60_powder_4th_after_annealing_230degC_1day.txt")
In [51]:
df_50pow_4, l_ang_50pow_4, l_int_50pow_4 = exp_XRD("20230105_Ag2S0.5Te0.5_No.50_20-60_powder_4th.txt")
In [52]:
df_50pow_5, l_ang_50pow_5, l_int_50pow_5 = exp_XRD("20230109_Ag2S0.5Te0.5_No.50_20-60_powder_5th_after400degC.txt")
In [53]:
df_50pow_6, l_ang_50pow_6, l_int_50pow_6 = exp_XRD("20230110_Ag2S0.5Te0.5_No.50_20-60_powder_after400degC_2.txt")
In [54]:
df_50pel_1, l_ang_50pel_1, l_int_50pel_1 = exp_XRD("20221006_Ag2S0.5Te0.5_No.50_20-60_pellet_1st.txt")
In [55]:
df_50pel_2, l_ang_50pel_2, l_int_50pel_2 = exp_XRD("20230130_Ag2S0.5Te0.5_No.50_20-60_resistivity_400degC.txt")
In [56]:
df_50pel_3, l_ang_50pel_3, l_int_50pel_3 = exp_XRD("20230130_Ag2S0.5Te0.5_No.50_20-60_pellet_after_LFA_3months.txt")
In [57]:
df_51pow_1, l_ang_51pow_1, l_int_51pow_1 = exp_XRD("20221013_Ag2S0.7Te0.3_No.51_powder_1st.txt")
In [58]:
df_51pel_1, l_ang_51pel_1, l_int_51pel_1 = exp_XRD("20230213_Ag2S0.7Te0.3_No.51_pellet_before_LFA.txt")
In [59]:
df_51pel_2, l_ang_51pel_2, l_int_51pel_2 = exp_XRD("20230324_Ag2S0.7Te0.3_No.51_pellet_before_annealing.txt")
In [60]:
df_51pel_3, l_ang_51pel_3, l_int_51pel_3 = exp_XRD("20230328_Ag2S0.7Te0.3_No.51_pellet_after_annealing_100degC_84h.txt")
In [61]:
df_51pel_4, l_ang_51pel_4, l_int_51pel_4 = exp_XRD("20230407_Ag2S0.7Te0.3_No.51-1_pellet_100degC_1week.txt")
In [62]:
df_51pel_5, l_ang_51pel_5, l_int_51pel_5 = exp_XRD("20230414_Ag2S0.7Te0.3_No.51_pellet_100degC_2weeks.txt")
In [63]:
df_51_2pel_1, l_ang_51_2pel_1, l_int_51_2pel_1 = exp_XRD("20230329_Ag2S0.7Te0.3_No.51-2_pellet_after_SPS_100degC_15min_100MPa.txt")
In [64]:
df_53pow_1, l_ang_53pow_1, l_int_53pow_1 = exp_XRD("20221013_Ag2S0.4Te0.6_No.53_20-60_powder_1st.txt")
In [65]:
df_53pow_2, l_ang_53pow_2, l_int_53pow_2 = exp_XRD("20221017_Ag2S0.4Te0.6_No.53_20-60_powder_2nd.txt")
In [66]:
df_53pow_3, l_ang_53pow_3, l_int_53pow_3 = exp_XRD("20221201_Ag2S0.4Te0.6_No.53_20-60_powder_3rd.txt")
In [67]:
df_53pow_4, l_ang_53pow_4, l_int_53pow_4 = exp_XRD("20221216_Ag2S0.4Te0.6_No.53_20-60_powder_5th_after_annealing_230degC_1day.txt")
In [68]:
df_53pow_5, l_ang_53pow_5, l_int_53pow_5 = exp_XRD("20230105_Ag2S0.4Te0.6_No.53_20-60_powder_5th.txt")
In [69]:
df_53pow_6, l_ang_53pow_6, l_int_53pow_6 = exp_XRD("20230109_Ag2S0.4Te0.6_No.53_20-60_powder_6th_400degC.txt")
In [70]:
df_53pow_7, l_ang_53pow_7, l_int_53pow_7 = exp_XRD("20230110_Ag2S0.4Te0.6_No.53_20-60_powder_400degC_2.txt")
In [71]:
df_53pel_1, l_ang_53pel_1, l_int_53pel_1 = exp_XRD("20221130_Ag2S0.4Te0.6_No.53_20-60_pellet_1st.txt")
In [72]:
df_53pel_2, l_ang_53pel_2, l_int_53pel_2 = exp_XRD("20230124_Ag2S0.4Te0.6_No.53_20-60_pellet_2nd_2months.txt")
In [73]:
df_53pel_3, l_ang_53pel_3, l_int_53pel_3 = exp_XRD("20230127_Ag2S0.4Te0.6_No.53_20-60_pellet_after_resistivity_400degC.txt")
In [74]:
df_54pow_1, l_ang_54pow_1, l_int_54pow_1 = exp_XRD("20221017_Ag2S0.6Te0.4_No.54_20-60_powder_2nd.txt")
In [75]:
df_54pel_1, l_ang_54pel_1, l_int_54pel_1 = exp_XRD("20221021_Ag2S0.6Te0.4_No.54_20-60_pellet_1st.txt")
In [76]:
df_57_1pow_0, l_ang_57_1pow_0, l_int_57_1pow_0 = exp_XRD("20221117_Ag2S0.6Te0.4_No.57-1_20-60_powder_1st.txt")
In [77]:
df_57_1pow_1, l_ang_57_1pow_1, l_int_57_1pow_1 = exp_XRD("20221216_Ag2S0.6Te0.4_No.57-1_20-60_powder_3rd_after_200_degC_anneal_1day.txt")
In [78]:
df_57_1pow_2, l_ang_57_1pow_2, l_int_57_1pow_2 = exp_XRD("20230109_Ag2S0.6Te0.4_No.57-1_20-60_powder_4th_after_400degC.txt")
In [79]:
df_57_1pow_3, l_ang_57_1pow_3, l_int_57_1pow_3 = exp_XRD("20230110_Ag2S0.6Te0.4_No.57-1_20-60_powder_after_400degC_2.txt")
In [80]:
df_57_1pow_4, l_ang_57_1pow_4, l_int_57_1pow_4 = exp_XRD("20230206_Ag2S0.6Te0.4_No.57-1_20-60_powder_after_anneal_170degC_1week.txt")
In [81]:
df_57_1pow_5, l_ang_57_1pow_5, l_int_57_1pow_5 = exp_XRD("20230207_Ag2S0.6Te0.4_No.57-1_20-60_powder_after_anneal_170degC_1week_2nd.txt")
In [82]:
df_57_1pel_1, l_ang_57_1pel_1, l_int_57_1pel_1 = exp_XRD("20230112_Ag2S0.6Te0.4_No.57-1_20-60_pellet_before_anneal_200degC.txt")
In [83]:
df_57_1pel_2, l_ang_57_1pel_2, l_int_57_1pel_2 = exp_XRD("20230117_Ag2S0.6Te0.4_No.57-1_20-60_pellet_after_anneal_200degC.txt")
In [84]:
df_57_1pel_3, l_ang_57_1pel_3, l_int_57_1pel_3 = exp_XRD("20230126_Ag2S0.6Te0.4_No.57-1_20-60_pellet_after_anneal_170degC.txt")
In [85]:
df_57_1pel_4, l_ang_57_1pel_4, l_int_57_1pel_4 = exp_XRD("20230206_Ag2S0.6Te0.4_No.57-1_20-60_pellet_after_anneal_170degC_1week.txt")
In [86]:
df_57_2pel_1, l_ang_57_2pel_1, l_int_57_2pel_1 = exp_XRD("20230126_Ag2S0.6Te0.4_No.57-2_20-60_pellet_2nd.txt")
In [87]:
df_57_2pel_2, l_ang_57_2pel_2, l_int_57_2pel_2 = exp_XRD("20230421_Ag2S0.6Te0.4_No.57-2_20-60_pellet_after_anneal_140degC.txt")
In [88]:
df_58_2pel_1, l_ang_58_2pel_1, l_int_58_2pel_1 = exp_XRD("20221123_Ag2S0.6Te0.4_No.58-2_20-60_pellet_2nd_after_LFA.txt")
In [89]:
df_60_pow_1, l_ang_60_pow_1, l_int_60_pow_1 = exp_XRD("20230221_Ag2S0.5Te0.5_No.60_20-60_powder_1st.txt")
In [90]:
df_60_1pel_1, l_ang_60_1pel_1, l_int_60_1pel_1 = exp_XRD("20230221_Ag2S0.5Te0.5_No.60_20-60_pellet.txt")
In [91]:
df_60_2pel_1, l_ang_60_2pel_1, l_int_60_2pel_1 = exp_XRD("20230222_Ag2S0.5Te0.5_No.60-2_20-60_pellet_before_350degC.txt")
In [92]:
df_60_2pel_2, l_ang_60_2pel_2, l_int_60_2pel_2 = exp_XRD("20230224_Ag2S0.5Te0.5_No.60-2_20-60_pellet_after_350degC.txt")
In [93]:
df_60_2pel_3, l_ang_60_2pel_3, l_int_60_2pel_3 = exp_XRD("20230329_Ag2S0.5Te0.5_No.60-2_20-60_pellet_after_350degC_12h.txt")
In [94]:
df_60_2pel_4, l_ang_60_2pel_4, l_int_60_2pel_4 = exp_XRD("20230329_Ag2S0.5Te0.5_No.60-2_20-60_pellet_after_350degC_12h_2nd.txt")
In [95]:
df_60_3pel_1, l_ang_60_3pel_1, l_int_60_3pel_1 = exp_XRD("20230223_Ag2S0.5Te0.5_No.60-3_20-60_pellet_before_180degC.txt")
In [96]:
df_60_3pel_2, l_ang_60_3pel_2, l_int_60_3pel_2 = exp_XRD("20230227_Ag2S0.5Te0.5_No.60-3_20-60_pellet_after_180degC.txt")
In [97]:
df_60_4pel_1, l_ang_60_4pel_1, l_int_60_4pel_1 = exp_XRD("20230302_Ag2S0.5Te0.5_No.60-4_20-60_pellet_before_350degC.txt")
In [98]:
df_60_4pel_2, l_ang_60_4pel_2, l_int_60_4pel_2 = exp_XRD("20230302_Ag2S0.5Te0.5_No.60-4_20-60_pellet_after_350degC.txt")
In [99]:
df_62_2pel_1, l_ang_62_2pel_1, l_int_62_2pel_1 = exp_XRD("20230321_Ag2S0.5Te0.5_No.62-2_20-60_pellet_after_compression.txt")
In [100]:
df_62_2pel_2, l_ang_62_2pel_2, l_int_62_2pel_2 = exp_XRD("20230328_Ag2S0.5Te0.5_No.62-2_20-60_pellet_after_annealed_350degC_72h_2.txt")
In [101]:
df_62_5pel_1, l_ang_62_5pel_1, l_int_62_5pel_1 = exp_XRD("20230310_Ag2S0.5Te0.5_No.62-5_20-60_pellet_before_230degC.txt")
In [102]:
df_62_5pel_2, l_ang_62_5pel_2, l_int_62_5pel_2 = exp_XRD("20230317_Ag2S0.5Te0.5_No.62-5_20-60_pellet_after_230degC.txt")
In [103]:
df_63_2pel_1, l_ang_63_2pel_1, l_int_63_2pel_1 = exp_XRD("20230331_Ag2S0.7Te0.3_No.63-2_pellet_after_annealing_503K_12h.txt")
In [104]:
df_hol, l_ang_hol, l_int_hol = exp_XRD("20220316_sample_holder_expensive_0.25_million_yen.txt")
In [105]:
df_hol_p, l_ang_hol_p, l_int_hol_p = exp_XRD("20220317_sample_holder_for_pellets.txt")
In [106]:
df_te, l_ang_te, l_int_te = exp_XRD("Tellurium__R070376-1__Powder__Xray_Data_XY_Processed__8407.txt")
In [107]:
df_ag2s_anoop9, l_ang_ag2s_anoop9, l_int_ag2s_anoop9 = exp_XRD("20230126_Anoop_Lot9-Ag2S.txt")
In [108]:
df_ag2s_anoop10, l_ang_ag2s_anoop10, l_int_ag2s_anoop10 = exp_XRD("20230131_Anoop_Ag2S_Lot10.txt")
In [109]:
df_ag5te3, l_ang_ag5te3, l_int_ag5te3 = exp_XRD("210320_Ag5Te3#1_SHS-powder_from_hirata.txt")
In [110]:
df_ag489te3, l_ang_ag489te3, l_int_ag489te3 = exp_XRD("muto_ag4.89te3.txt")
In [111]:
df_agte_m, l_ang_agte_m, l_int_agte_m = exp_XRD("muto_agte.txt")
In [112]:
df_ag7te4, l_ang_ag7te4, l_int_ag7te4 = exp_XRD("muto_ag7te4.txt")
In [113]:
df_te08, l_ang_te08, l_int_te08 = exp_XRD("180822_Ag2S0.2Te0.8#1_HP_bulk.txt")
In [114]:
df_te085, l_ang_te085, l_int_te085 = exp_XRD("190614_Ag2S0.15Te0.85#3_MM_powder.txt")
In [115]:
df_te09, l_ang_te09, l_int_te09 = exp_XRD("191105_Ag2S0.1Te0.9#4_MM_powder.txt")
In [116]:
df_te1, l_ang_te1, l_int_te1 = exp_XRD("201005_Ag2Te#27_MM_powder.txt")
Experimental XRD from structure of ICSD.¶
In [117]:
def xrd_spectra(l_ang,l_int,theta_min,theta_max,dtheta,width):
theta_range = theta_max - theta_min
N = int(theta_range/dtheta)
l_int_sme, l_ang_sme = [], []
for i in range(N):
theta = theta_min + i*dtheta
I_theta = 0.0
for j, intensity in enumerate(l_int):
fact = ((theta-l_ang[j])/width)**2
I_theta += intensity*np.exp(-fact)
l_ang_sme.append(theta)
l_int_sme.append(I_theta)
l_int_sme = l_int_sme/max(l_int_sme)
return l_ang_sme,l_int_sme
In [118]:
def xrd_to_lists(filename):
f = open(filename,"r")
l_ = f.readlines()
f.close()
l_ang, l_int = [], []
for i in range(2,len(l_)):
sp = l_[i].split()
l_ang.append(float(sp[0]))
l_int.append(float(sp[1]))
l_int1 = np.array(l_int)
l_int2 = l_int1/max(l_int1)
l_ang2 = np.array(l_ang)
return l_ang2, l_int2
In [119]:
l_ang_ag, l_int_ag = xrd_to_lists("Ag_crystal.gpd")
In [120]:
l_ang_ag2s_l, l_int_ag2s_l = xrd_to_lists("ag2s_low_sada.gpd")
In [121]:
l_ang_ag2s_l_g, l_int_ag2s_l_g = xrd_to_lists("Ag2S_Gareoung.gpd")
In [122]:
l_ang_ag2s_l_g_x099, l_int_ag2s_l_g_x099 = xrd_to_lists("Ag2S_Gareoung_x099.gpd")
In [123]:
l_ang_ag2s_l_g_x102, l_int_ag2s_l_g_x102 = xrd_to_lists("Ag2S_Gareoung_x102.gpd")
In [124]:
l_ang_ag2s_l_g_x104, l_int_ag2s_l_g_x104 = xrd_to_lists("Ag2S_Gareoung_x104.gpd")
In [125]:
l_ang_ag2s_l_g_x106, l_int_ag2s_l_g_x106 = xrd_to_lists("Ag2S_Gareoung_x106.gpd")
In [126]:
l_ang_ag2s_h, l_int_ag2s_h = xrd_to_lists("ag2s_high_temp_match.gpd")
In [127]:
l_ang_ag2te_l, l_int_ag2te_l = xrd_to_lists("ag2te_low_van_der_lee_1993.gpd")
In [128]:
l_ang_ag2te_l_x095, l_int_ag2te_l_x095 = xrd_to_lists("ag2te_low_van_der_lee_1993_times_0_95.gpd")
In [129]:
l_ang_ag2te_l_x096, l_int_ag2te_l_x096 = xrd_to_lists("ag2te_low_van_der_lee_1993_times_0_96.gpd")
In [130]:
l_ang_ag2te_h, l_int_ag2te_h = xrd_to_lists("ag2te_high_temp.int")
In [131]:
l_ang_agte, l_int_agte = xrd_to_lists("agte.gpd")
In [132]:
l_ang_agte3, l_int_agte3 = xrd_to_lists("agte3.gpd")
In [133]:
l_ang_ag453te3_x096, l_int_ag453te3_x096 = xrd_to_lists("Ag4_53Te3_x096.gpd")
In [134]:
l_ang_ag453te3_x098, l_int_ag453te3_x098 = xrd_to_lists("Ag4_53Te3_x098.gpd")
In [135]:
l_ang_ag453te3_x099, l_int_ag453te3_x099 = xrd_to_lists("Ag4_53Te3_x099.gpd")
In [136]:
l_ang_ag453te3, l_int_ag453te3 = xrd_to_lists("Ag4_53Te3.gpd")
In [137]:
l_ang_ag453te3_x101, l_int_ag453te3_x101 = xrd_to_lists("Ag4_53Te3_x101.gpd")
In [138]:
l_ang_ag453te3_x102, l_int_ag453te3_x102 = xrd_to_lists("Ag4_53Te3_x102.gpd")
In [139]:
def XRD_picture(l_ang,l_int,l_lab,l_colors,l_mrks,filename):
plt.clf() # initialization
plt.figure(figsize=(10, 6))
plt.axis([20,60,0,max(l_int[0])])
plt.tick_params(direction="in")
plt.rcParams["font.family"] = "serif"
plt.rcParams["axes.linewidth"] = 1.5
plt.tick_params(direction="in")
plt.rcParams["xtick.major.size"] = 10
plt.rcParams["xtick.major.width"] = 1.5
plt.rcParams["ytick.major.size"] = 10
plt.rcParams["ytick.major.width"] = 1.5
plt.rcParams["font.size"] = 20
plt.ylabel("Intensity (arb. units)")
plt.xlabel(r"2$\theta$ (degrees)")
l_line = ["-",":","-"]
for i in range(len(l_ang)):
#plt.scatter(l_ang[i], l_int[i],color=l_color[i],marker=l_mrks[i],label=l_lab[i])
plt.plot(l_ang[i], l_int[i],color=l_color[i],marker="None",label=l_lab[i],linestyle=l_line[i])
#plt.legend(loc='upper right')
plt.savefig(filename,bbox_inches="tight")
plt.show()
In [140]:
def XRD_picture_shifted(l_ang,l_int,l_colors,l_mrks,xfig,yfig,xmin,xmax,filename):
Nang = len(l_ang)
plt.clf() # initialization
plt.figure(figsize=(xfig, yfig))
plt.axis([xmin,xmax,-Nang+1,max(l_int[0])])
plt.tick_params(direction="in")
plt.rcParams["font.family"] = "times new roman"
plt.rcParams['mathtext.fontset'] = 'cm'
plt.rcParams["axes.linewidth"] = 1.5
plt.tick_params(direction="in")
plt.rcParams["xtick.major.size"] = 10
plt.rcParams["xtick.major.width"] = 1.5
plt.rcParams["ytick.major.size"] = 10
plt.rcParams["ytick.major.width"] = 1.5
plt.rcParams["font.size"] = 30
plt.ylabel("Intensity (arb. units)")
plt.xlabel(r"2$\theta$ (degrees)")
plt.tick_params(labelleft=False)
l_line = ["-","-","-","-","-","-"]
for i in range(len(l_ang)):
#plt.scatter(l_ang[i], l_int[i],color=l_color[i],marker=l_mrks[i],label=l_lab[i])
plt.hlines([-i],0,100,linestyle="--")
plt.plot(l_ang[i], l_int[i]-i,color=l_color[i],marker="None",linestyle="-")
#plt.legend(loc='upper right')
plt.savefig(filename,bbox_inches="tight")
plt.show()
In [141]:
l_color = ["black","red", "blue","green","cyan","purple","orange","brown","gray","pink"]
l_mrks = ["o","^", "*","d",">","<","o"]
exp XRD comparison¶
In [142]:
l_ang = [l_ang_17pow,l_ang_2pow_2,l_ang_57_1pow_5,l_ang_43pow_6,l_ang_29pow_2,l_ang_21pow_1]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_17pow,l_int_2pow_2,l_int_57_1pow_5,l_int_43pow_6,l_int_29pow_2,l_int_21pow_1]#,l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
l_color = ["black","black","black","black","black","black","black"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,6,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [143]:
l_ang = [l_ang_17pow,l_ang_2pow_1,l_ang_54pow_1,l_ang_50pow_1,l_ang_53pow_1,l_ang_21pow_1]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_17pow,l_int_2pow_1,l_int_54pow_1,l_int_50pow_1,l_int_53pow_1,l_int_21pow_1]#l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
l_color = ["black","black","black","black","black","black"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,6,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [149]:
l_ang = [l_ang_2pow_2,l_ang_29pow_2,l_ang_49pel_3, ]#,l_ang_ag2te_h]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_2pow_2,l_int_29pow_2,l_int_49pel_3,]#,l_int_ag2te_h]#l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
#l_color = ["green","green","purple"]
l_color = ["black"]*3# + ["red"]*4+ ["black"]*1
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,12,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [150]:
l_ang = [l_ang_53pow_1,l_ang_54pow_1,l_ang_60_4pel_2]#,l_ang_ag2te_h]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_53pow_1,l_int_54pow_1,l_int_60_4pel_2]#,l_int_ag2te_h]#l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
l_color = ["black"]*len(l_ang)
l_color = ["black"]*3 + ["red"]*4+ ["black"]*1
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,12,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [148]:
l_ang = [l_ang_53pow_1,l_ang_54pow_1,l_ang_2pow_2]#,l_ang_ag2te_h]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_53pow_1,l_int_54pow_1,l_int_2pow_2]#,l_int_ag2te_h]#l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
l_color = ["black"]*len(l_ang)
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,12,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [147]:
l_ang = [l_ang_2pow_2]
l_int = [l_int_2pow_2]
l_color = ["black","black","black","black","black","red","red"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,6,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [148]:
l_ang = [l_ang_57_1pow_5,l_ang_43pow_6,l_ang_29pow_2]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_57_1pow_5,l_int_43pow_6,l_int_29pow_2]#,l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
l_color = ["black","black","black","black","red","red"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,6,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [149]:
l_ang = [l_ang_29pow_2]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_29pow_2]#,l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
l_color = ["black","black","black","black","red","red"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,8,6,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
<Figure size 432x288 with 0 Axes>
In [150]:
l_ang = [l_ang_2pow_1,l_ang_53pow_1,l_ang_29pow_2]#,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_2pow_1,l_int_53pow_1,l_int_29pow_2]#,l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
l_color = ["black","black","black","black","red","red"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-150-b9b3f9674ef6> in <module> 2 l_int = [l_int_2pow_1,l_int_53pow_1,l_int_29pow_2]#,l_int_ag2s_l_g_x099,l_int_ag453te3_x101] 3 l_color = ["black","black","black","black","red","red"] ----> 4 XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg") TypeError: XRD_picture_shifted() missing 2 required positional arguments: 'xmax' and 'filename'
In [ ]:
l_ang = [l_ang_43pow_6,l_ang_29pow_2,l_ang_ag2s_l_g_x099,l_ang_ag453te3_x101]
l_int = [l_int_43pow_6,l_int_29pow_2,l_int_ag2s_l_g_x099,l_int_ag453te3_x101]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
In [ ]:
l_ang = [,l_ang_ag2s_l,l_ang_ag453te3_x102]
l_int = [,l_int_ag2s_l,l_int_ag453te3_x102]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
In [ ]:
l_ang = [l_ang_51pel_5,l_ang_57_2pel_2,l_ang_62_5pel_2,l_ang_29pel_2] #l_ang_43pel_3
l_int = [l_int_51pel_5,l_int_57_2pel_2,l_int_62_5pel_2,l_int_29pel_2] # l_int_43pel_3,
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"test.jpg")
In [ ]:
l_ang = [l_ang_2pow_2,l_ang_57_1pow_5,l_ang_ag2s_l]
l_int = [l_int_2pow_2,l_int_57_1pow_5,l_int_ag2s_l]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230323_Ag2S1-xTex_x=0.3-0.6_No.3_57-1_43_29.jpg")
In [143]:
l_ang = [l_ang_ag2s_h,l_ang_ag2s_l,l_ang_17pow,l_ang_2pow_1,l_ang_54pow_1,l_ang_50pow_1,l_ang_53pow_1,l_ang_te1]
l_int = [l_int_ag2s_h,l_int_ag2s_l,l_int_17pow,l_int_2pow_1,l_int_54pow_1,l_int_50pow_1,l_int_53pow_1,l_int_te1]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230307_Ag2S1-xTex_x=0.2-0.8_No.17_49_54_50_53_21_1st.jpg")
<Figure size 432x288 with 0 Axes>
In [145]:
l_ang = [l_ang_17pow,l_ang_2pow_1,l_ang_54pow_1,l_ang_50pow_1,l_ang_53pow_1,l_ang_ag2s_l,l_ang_ag2s_h,l_ang_ag2te_l]#,l_ang_ag2te_h]
l_int = [l_int_17pow,l_int_2pow_1,l_int_54pow_1,l_int_50pow_1,l_int_53pow_1,l_int_ag2s_l,l_int_ag2s_h,l_int_ag2te_l]#,l_int_ag2te_h]
l_color = ["black","black","black","black","black","red","red","red"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230324_Ag2S1-xTex_x=0.2-0.7_No.49_54_50_53_1st.jpg")
<Figure size 432x288 with 0 Axes>
In [158]:
l_ang = [l_ang_2pow_1,l_ang_54pow_1,l_ang_50pow_1,l_ang_53pow_1,l_ang_ag2s_l,l_ang_ag2s_h,l_ang_ag2te_l]
l_int = [l_int_2pow_1,l_int_54pow_1,l_int_50pow_1,l_int_53pow_1,l_int_ag2s_l,l_int_ag2s_h,l_int_ag2te_l]
l_color = ["black","black","black","black","red","red","red"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230221_Ag2S1-xTex_x=0.3-0.6_No.49_54_50_53_1st.jpg")
<Figure size 432x288 with 0 Axes>
In [174]:
l_ang = [l_ang_2pow_1,l_ang_54pow_1,l_ang_50pow_1,l_ang_53pow_1]#,l_ang_ag2s_l,l_ang_ag2s_h,l_ang_ag2te_l]
l_int = [l_int_2pow_1,l_int_54pow_1,l_int_50pow_1,l_int_53pow_1]#,l_int_ag2s_l,l_int_ag2s_h,l_int_ag2te_l]
l_color = ["black","black","black","black","red","red","red"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230221_Ag2S1-xTex_x=0.3-0.6_No.49_54_50_53_1st.jpg")
<Figure size 432x288 with 0 Axes>
In [188]:
l_ang = [l_ang_ag2s_anoop9,l_ang_51pel_1,l_ang_50pel_1]
l_int = [l_int_ag2s_anoop9,l_int_51pel_1,l_int_50pel_1]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"test.jpg")
<Figure size 432x288 with 0 Axes>
In [189]:
l_ang = [l_ang_ag2s_anoop10,l_ang_ag2s_l]
l_int = [l_int_ag2s_anoop10,l_int_ag2s_l]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,80,"test.jpg")
<Figure size 432x288 with 0 Axes>
In [190]:
l_ang = [l_ang_62_2pel_1,l_ang_62_2pel_2]
l_int = [l_int_62_2pel_1,l_int_62_2pel_2,l_int_50pel_1]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"test.jpg")
<Figure size 432x288 with 0 Axes>
In [191]:
l_ang = [l_ang_51pel_3,l_ang_51pel_4,l_ang_51pel_5,l_ang_ag2s_l]
l_int = [l_int_51pel_3,l_int_51pel_4,l_int_51pel_5,l_int_ag2s_l]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230221_Ag2S1-xTex_x=0.3_No.49_51.jpg")
<Figure size 432x288 with 0 Axes>
In [192]:
l_ang = [l_ang_49pel_1,l_ang_49pel_3,l_ang_51pel_5]
l_int = [l_int_49pel_1,l_int_49pel_3,l_int_51pel_5]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230414_Ag2S1-xTex_x=0.3.jpg")
<Figure size 432x288 with 0 Axes>
In [153]:
l_ang = [l_ang_17pel_1,l_ang_ag2s_l,l_ang_ag2s_h,l_ang_ag2te_l,l_ang_ag5te3]
l_int = [l_int_17pel_1,l_int_ag2s_l,l_int_ag2s_h,l_int_ag2te_l,l_int_ag5te3]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230322_Ag2S1-xTex_x=0.2_No.17.jpg")
<Figure size 432x288 with 0 Axes>
In [154]:
l_ang = [l_ang_21pow_1,l_ang_21pel_1,l_ang_ag2s_l,l_ang_ag2s_h,l_ang_ag2te_l,l_ang_ag5te3]
l_int = [l_int_21pow_1,l_int_21pel_1,l_int_ag2s_l,l_int_ag2s_h,l_int_ag2te_l,l_int_ag5te3]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230322_Ag2S1-xTex_x=0.7_No.21.jpg")
<Figure size 432x288 with 0 Axes>
In [143]:
l_ang = [l_ang_57_1pel_1,l_ang_57_1pel_4]
l_int = [l_int_57_1pel_1,l_int_57_1pel_4]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"test.jpg")
<Figure size 432x288 with 0 Axes>
In [120]:
l_ang = [l_ang_ag5te3,l_ang_ag489te3,l_ang_ag453te3]
l_int = [l_int_ag5te3,l_int_ag489te3,l_int_ag453te3]
l_color = ["black"]*3
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230314_Ag5-dTe3.jpg")
<Figure size 432x288 with 0 Axes>
In [111]:
l_ang = [l_ang_ag2s_l,l_ang_2pow_2,l_ang_57_1pow_5,l_ang_43pow_6,l_ang_29pow_2,l_ang_21pow_2,l_ang_20pow_1,l_ang_te09,l_ang_te1,l_ang_ag489te3]
l_int = [l_int_ag2s_l,l_int_2pow_2,l_int_57_1pow_5,l_int_43pow_6,l_int_29pow_2,l_int_21pow_2,l_int_20pow_1,l_int_te09,l_int_te1,l_int_ag489te3]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230315_Ag2S1-xTex_x=0.3-1.jpg")
<Figure size 432x288 with 0 Axes>
In [114]:
l_ang = [l_ang_ag2s_l_g,l_ang_57_1pow_5,l_ang_43pow_6,l_ang_29pow_2,l_ang_te1,l_ang_ag489te3]
l_int = [l_int_ag2s_l_g,l_int_57_1pow_5,l_int_43pow_6,l_int_29pow_2,l_int_te1,l_int_ag489te3]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230320_Ag2S1-xTex_x=0.4-0.6.jpg")
<Figure size 432x288 with 0 Axes>
In [151]:
#l_ang = [l_ang_60_2pel_1,l_ang_60_4pel_2,l_ang_60_3pel_2]
#l_int = [l_int_60_2pel_1,l_int_60_4pel_2,l_int_60_3pel_2]
l_ang = [l_ang_60_2pel_1,l_ang_60_2pel_4,l_ang_62_5pel_2]
l_int = [l_int_60_2pel_1,l_int_60_2pel_4,l_int_62_5pel_2]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230227_Ag2S1-xTex_x=0.5_powder_before_after_350degC_180degC.jpg")
<Figure size 432x288 with 0 Axes>
In [118]:
l_ang = [l_ang_51pel_1,l_ang_60_3pel_2]
l_int = [l_int_51pel_1,l_int_60_3pel_2]
l_color = ["black","blue"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230227_Ag2S1-xTex_x=0.5_powder_before_after_350degC_180degC.jpg")
<Figure size 432x288 with 0 Axes>
In [117]:
l_ang = [l_ang_60_4pel_1,l_ang_60_4pel_2,l_ang_ag2s_h]
l_int = [l_int_60_4pel_1,l_int_60_4pel_2,l_int_ag2s_h]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230303_Ag2S1-xTex_x=0.5_pellet_#60-4.jpg")
<Figure size 432x288 with 0 Axes>
In [130]:
l_ang = [l_ang_21pow_2,l_ang_21pow_3,l_ang_20pow_2,l_ang_20pow_3,l_ang_te1,l_ang_ag2te_h,l_ang_ag453te3]
l_int = [l_int_21pow_2,l_int_21pow_3,l_int_20pow_2,l_int_20pow_3,l_int_te1,l_int_ag2te_h,l_int_ag453te3]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230217_Ag2S1-xTex_x=0.3_0.2.jpg")
<Figure size 432x288 with 0 Axes>
In [133]:
l_ang = [l_ang_57_2pel_2,l_ang_57_1pel_4,l_ang_ag2s_l,l_ang_ag2s_h,l_ang_ag2te_l]
l_int = [l_int_57_2pel_2,l_int_57_1pel_4,l_int_ag2s_l,l_int_ag2s_h,l_int_ag2te_l]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230206_Ag2S1-xTex_x=0.4_No.57-1_annealed_140_degC.jpg")
<Figure size 432x288 with 0 Axes>
In [143]:
l_ang = [l_ang_49pel_2,l_ang_58_2pel_1,l_ang_50pel_3,l_ang_53pel_1]#l_ang_53pel_2]
l_int = [l_int_49pel_2,l_int_58_2pel_1,l_int_50pel_3,l_int_53pel_1]#l_int_53pel_2]
l_color = ["black","black","black","black"]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230221_Ag2S1-xTex_x=0.2-0.6_No.49_54_50_53_pellet.jpg")
<Figure size 432x288 with 0 Axes>
In [123]:
l_ang = [l_ang_17pow,l_ang_49pow_1,l_ang_54pow_1,l_ang_50pow_1,l_ang_53pow_1,l_ang_21pow]
l_int = [l_int_17pow,l_int_49pow_1,l_int_54pow_1,l_int_50pow_1,l_int_53pow_1,l_int_21pow]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20221018_Ag2S1-xTex_x=0.2-0.7_No.17_49_54_50_53_21_1st.jpg")
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-123-6eabb8f59992> in <module> ----> 1 l_ang = [l_ang_17pow,l_ang_49pow_1,l_ang_54pow_1,l_ang_50pow_1,l_ang_53pow_1,l_ang_21pow] 2 l_int = [l_int_17pow,l_int_49pow_1,l_int_54pow_1,l_int_50pow_1,l_int_53pow_1,l_int_21pow] 3 XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20221018_Ag2S1-xTex_x=0.2-0.7_No.17_49_54_50_53_21_1st.jpg") NameError: name 'l_ang_21pow' is not defined
In [152]:
l_ang = [l_ang_43pow_1,l_ang_43pow_2,l_ang_43pow_3]
l_int = [l_int_43pow_1,l_int_43pow_2,l_int_43pow_3]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20221201_Ag2S0.5Te0.5_No.43_1st_2nd_3rd.jpg")
<Figure size 432x288 with 0 Axes>
In [153]:
l_ang = [l_ang_50pow_1,l_ang_50pow_2,l_ang_50pow_4]
l_int = [l_int_50pow_1,l_int_50pow_2,l_int_50pow_4]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230105_Ag2S0.5Te0.5_No.50_1st_2nd_3rd.jpg")
<Figure size 432x288 with 0 Axes>
In [154]:
l_ang = [l_ang_53pow_1,l_ang_53pow_3,l_ang_53pow_5]
l_int = [l_int_53pow_1,l_int_53pow_3,l_int_53pow_5]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230105_Ag2S0.5Te0.5_No.53_1st_3rd_4th.jpg")
<Figure size 432x288 with 0 Axes>
In [90]:
l_ang = [l_ang_49pel_2,l_ang_ag2s_h]
l_int = [l_int_49pel_2,l_int_ag2s_h]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230125_#49_Ag2S1-xTex_x=0.3_after_LFA_3months.jpg")
<Figure size 432x288 with 0 Axes>
In [92]:
l_ang = [l_ang_54pow_1,l_ang_57_1pow_2,l_ang_57_1pow_3]
l_int = [l_int_54pow_1,l_int_57_1pow_2,l_int_57_1pow_3]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230110_#57-1_Ag2S0.6Te0.4_after_annealing_400degC.jpg")
<Figure size 432x288 with 0 Axes>
In [93]:
l_ang = [l_ang_50pow_4,l_ang_50pow_5,l_ang_50pow_6]
l_int = [l_int_50pow_4,l_int_50pow_5,l_int_50pow_6]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230110_#50_Ag2S0.5Te0.5_powder_after_400degC.jpg")
<Figure size 432x288 with 0 Axes>
In [94]:
l_ang = [l_ang_53pow_3,l_ang_53pow_6,l_ang_53pow_7]
l_int = [l_int_53pow_3,l_int_53pow_6,l_int_53pow_7]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230110_#53_Ag2S0.4Te0.6_powder_after_400degC.jpg")
<Figure size 432x288 with 0 Axes>
In [95]:
l_ang = [l_ang_49pow_2,l_ang_57_1pow_2,l_ang_50pow_5,l_ang_53pow_6]
l_int = [l_int_49pow_2,l_int_57_1pow_2,l_int_50pow_5,l_int_53pow_6]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,20,60,"XRD_analysis_picture_20230109_Ag2S1-xTex_powder_after_400degC.jpg")
<Figure size 432x288 with 0 Axes>
In [96]:
l_ang = [l_ang_57_1pel_2,l_ang_23pel_1,l_ang_22pel_1,l_ang_ag]
l_int = [l_int_57_1pel_2,l_int_23pel_1,l_int_22pel_1,l_int_ag]
XRD_picture_shifted(l_ang,l_int,l_color,l_mrks,30,50,"XRD_analysis_picture_20230117_Ag2S1-xTex_powder_after_annealing.jpg")
<Figure size 432x288 with 0 Axes>
lattice constant evaluation¶
In [103]:
def compute_lattice_constant(ltheta,lint,n1,n2):
lam = 1.54
i1 = np.argmax(lint); print(i1)
theta_d1 = ltheta[i1]; print(theta_d1,"deg.")
i2 = np.argmax(lint[n1:n2]); print(i2)
theta_d2 = ltheta[i2+n1]; print(theta_d2,"deg.")
i3 = np.argmax(lint[n2:]); print(i3)
theta_d3 = ltheta[i3+n2]; print(theta_d3,"deg.")
#theta_r = np.radians(theta_d); print(theta_r,"rad.")
#d = 0.5*lam/np.sin(theta_r); print(d,"$\AA$ plane distance")
#a = d * np.sqrt(h*h+k*k+l*l); print(a,"$\AA$ lattice constant")
return theta_d1,theta_d2,theta_d3
In [104]:
# l_ang_57_1pow_1 l_ang_50pow_3 l_ang_53pow_4
In [105]:
aTe04 = compute_lattice_constant(l_ang_57_1pow_1,l_int_57_1pow_1,1044,1112)
1023 40.9433 deg. 29 41.9669 deg. 23 43.2362 deg.
In [106]:
aTe05 = compute_lattice_constant(l_ang_50pow_3,l_int_50pow_3,1041,1102)
1020 40.8819 deg. 37 42.0693 deg. 29 43.1543 deg.
In [107]:
aTe06 = compute_lattice_constant(l_ang_53pow_4,l_int_53pow_4,)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-107-cd2cae90c4aa> in <module> ----> 1 aTe06 = compute_lattice_constant(l_ang_53pow_4,l_int_53pow_4,) TypeError: compute_lattice_constant() missing 2 required positional arguments: 'n1' and 'n2'
In [108]:
aref = compute_lattice_constant(l_ang_ag2te_l[3400:],l_int_ag2te_l[3400:],3,1,-2)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-108-f7ceca9d4f80> in <module> ----> 1 aref = compute_lattice_constant(l_ang_ag2te_l[3400:],l_int_ag2te_l[3400:],3,1,-2) TypeError: compute_lattice_constant() takes 4 positional arguments but 5 were given
In [103]:
def Lattice_constant(l_x,l_lat,latref,l_xx,l_yy,xmin,xmax,ymin,ymax,filename):
l_color = ["black","red", "blue","green","cyan","purple","orange","brown","gray","pink"]
l_mrks = ["o","^", "*","d",">","<","o"]
plt.clf() # initialization
plt.figure(figsize=(8, 6))
plt.axis([xmin,xmax,ymin,ymax])
plt.tick_params(direction="in")
plt.rcParams["font.family"] = "serif"
plt.rcParams["axes.linewidth"] = 1.5
plt.tick_params(direction="in")
plt.rcParams["xtick.major.size"] = 10
plt.rcParams["xtick.major.width"] = 1.5
plt.rcParams["ytick.major.size"] = 10
plt.rcParams["ytick.major.width"] = 1.5
plt.rcParams["font.size"] = 20
plt.ylabel(r"2$\theta$, deg.")
plt.xlabel(r"$x$ in Ag$_2$S$_{1-x}$Te$_{x}$")
l_line = ["-",":","-"]
plt.scatter(l_x, l_lat,color=l_color[0],marker=l_mrks[0])
plt.scatter(1.0, latref,color=l_color[1],marker=l_mrks[1])
plt.plot(l_xx, l_yy,color=l_color[0],marker="None",linestyle=l_line[1])
#plt.legend(loc='upper right')
plt.savefig(filename,bbox_inches="tight")
plt.show()
In [104]:
l_x = [0.4,0.5,0.6]
l_lat = [aTe04,aTe05,aTe06]
xmin,xmax = 0.3,1.1
l_xx = np.arange(xmin,xmax,0.01)
#print(l_xx-0.5)
l_yy = 10*(aTe06-aTe05)*(l_xx-0.5)+aTe05
ymin, ymax = 38, 41
Lattice_constant(l_x,l_lat,aref,l_xx,l_yy,xmin,xmax,ymin,ymax,"20230130_Ag2S1-xTex_lattice_constant.jpg")
<Figure size 432x288 with 0 Axes>