>> TGS_phase_analysis('Fe_single_crystal-2019-06-28-06.40um-50degrees#1-POS-1.txt','Fe_single_crystal-2019-06-28-06.40um-50degrees#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.1059  (0.1048, 0.107)
       k =   2.142e-05  (2.127e-05, 2.157e-05)
       beta =   2.382e-06  (1.924e-06, 2.841e-06)
       B =     0.01889  (0.01869, 0.01908)
       p =       2.534  (2.526, 2.542)
       t =   2.266e-08  (2.231e-08, 2.301e-08)
       D =  -0.0007075  (-0.0007595, -0.0006556)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.1e-09
       peak_freq =   4.954e+08

ans =

   4.9541e+08