>> TGS_phase_analysis('Fe_single_crystal-2019-06-29-06.40um-80degrees#2-POS-1.txt','Fe_single_crystal-2019-06-29-06.40um-80degrees#2-NEG-1.txt',6.4,1)

f2 = 

     General model:
     f2(x) = A.*(erfc(q*sqrt(k*(x+start_time)))-beta*exp(-q^2*k*(x+start_time)
                    )./sqrt((x+start_time)))+B.*sin(2*pi*(peak_freq)*(x+
                    start_time)+p)*exp(-(x+start_time)/t)+D
     Coefficients (with 95% confidence bounds):
       A =       0.106  (0.1046, 0.1074)
       k =   2.256e-05  (2.237e-05, 2.275e-05)
       beta =   3.529e-06  (2.959e-06, 4.1e-06)
       B =     0.02109  (0.02087, 0.0213)
       p =       2.361  (2.354, 2.368)
       t =   2.693e-08  (2.653e-08, 2.732e-08)
       D =  -0.0002236  (-0.0002808, -0.0001664)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.2e-09
       peak_freq =    4.58e+08

ans =

   4.5800e+08