>> TGS_phase_analysis('Fe_single_crystal-2019-06-29-06.40um-50degrees#3-POS-1.txt','Fe_single_crystal-2019-06-29-06.40um-50degrees#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.106  (0.1049, 0.1071)
       k =   2.113e-05  (2.098e-05, 2.129e-05)
       beta =   3.569e-06  (3.109e-06, 4.03e-06)
       B =     0.01972  (0.01953, 0.01992)
       p =       2.491  (2.484, 2.499)
       t =   2.615e-08  (2.578e-08, 2.653e-08)
       D =    0.001624  (0.001569, 0.001679)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.1e-09
       peak_freq =   4.976e+08

ans =

   4.9755e+08