>> TGS_phase_analysis('Fe_single_crystal-2019-06-28-06.40um-45degrees#1-POS-1.txt','Fe_single_crystal-2019-06-28-06.40um-45degrees#1-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.1245  (0.1213, 0.1278)
       k =   2.229e-05  (2.189e-05, 2.268e-05)
       beta =   6.925e-06  (5.892e-06, 7.958e-06)
       B =     0.01045  (0.00999, 0.01092)
       p =       1.946  (1.913, 1.978)
       t =   3.357e-08  (3.139e-08, 3.574e-08)
       D =  -0.0007521  (-0.0008962, -0.0006079)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.1e-09
       peak_freq =   4.976e+08

ans =

   4.9763e+08