>> TGS_phase_analysis('Fe_single_crystal-2019-06-29-06.40um-60degrees#2-POS-1.txt','Fe_single_crystal-2019-06-29-06.40um-60degrees#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.1056  (0.1045, 0.1066)
       k =   2.181e-05  (2.166e-05, 2.195e-05)
       beta =    3.85e-06  (3.412e-06, 4.287e-06)
       B =     0.01566  (0.01548, 0.01584)
       p =       2.337  (2.329, 2.346)
       t =   2.431e-08  (2.39e-08, 2.473e-08)
       D =   4.203e-06  (-4.38e-05, 5.221e-05)
     Problem parameters:
       q =   9.817e+05
       start_time =    1.15e-09
       peak_freq =   4.878e+08

ans =

   4.8784e+08