>> TGS_phase_analysis('Fe_single_crystal-2019-06-29-06.40um-30degrees#2-POS-1.txt','Fe_single_crystal-2019-06-29-06.40um-30degrees#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.1169  (0.1147, 0.1191)
       k =   2.272e-05  (2.242e-05, 2.301e-05)
       beta =   8.535e-06  (7.813e-06, 9.256e-06)
       B =    0.009769  (0.009465, 0.01007)
       p =       2.159  (2.137, 2.182)
       t =   3.582e-08  (3.42e-08, 3.745e-08)
       D =   0.0006421  (0.0005465, 0.0007376)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.1e-09
       peak_freq =   4.886e+08

ans =

   4.8860e+08