>> TGS_phase_analysis('Fe_single_crystal-2019-06-28-06.40um-70degrees#1-POS-1.txt','Fe_single_crystal-2019-06-28-06.40um-70degrees#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.1376  (0.1347, 0.1405)
       k =   2.335e-05  (2.302e-05, 2.368e-05)
       beta =   7.875e-06  (7.074e-06, 8.676e-06)
       B =     0.01166  (0.0113, 0.01202)
       p =       2.375  (2.353, 2.397)
       t =   4.085e-08  (3.901e-08, 4.268e-08)
       D =   -0.001194  (-0.001312, -0.001076)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.1e-09
       peak_freq =   4.633e+08

ans =

   4.6327e+08