>> TGS_phase_analysis('Fe_single_crystal-2019-06-29-06.40um-45degrees#2-POS-1.txt','Fe_single_crystal-2019-06-29-06.40um-45degrees#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.1186  (0.1174, 0.1198)
       k =   2.153e-05  (2.137e-05, 2.168e-05)
       beta =   3.948e-06  (3.503e-06, 4.392e-06)
       B =     0.02089  (0.02067, 0.02111)
       p =       2.441  (2.433, 2.448)
       t =   2.412e-08  (2.376e-08, 2.449e-08)
       D =  -0.0001313  (-0.0001893, -7.328e-05)
     Problem parameters:
       q =   9.817e+05
       start_time =     1.1e-09
       peak_freq =   4.981e+08

ans =

   4.9814e+08