>> TGS_phase_analysis('Fe_single_crystal-2019-06-29-06.40um-60degrees#3-POS-1.txt','Fe_single_crystal-2019-06-29-06.40um-60degrees#3-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.1147  (0.1135, 0.1159)
       k =   2.178e-05  (2.163e-05, 2.194e-05)
       beta =   5.341e-06  (4.907e-06, 5.774e-06)
       B =     0.01806  (0.01787, 0.01826)
       p =       2.532  (2.524, 2.54)
       t =   2.726e-08  (2.683e-08, 2.769e-08)
       D =   0.0009195  (0.0008641, 0.000975)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.1e-09
       peak_freq =     4.9e+08

ans =

   4.9000e+08