I am working on high pressure shock experiments and am trying to figure out a the temperature of a sample under strong shocks. I have a measure value from 4 wavelengths of a pyrometer and am using a model to fit these points to a blackbody-like spectrum in order to back out a bulk true temperature, and a temperature of the hot spots/cracks that might also get viewed.
The 4 temperature data points, namely:
{{1.8*10^-6, 1266.38}, {2.3*10^-6, 1137.87}, {3.5*10^-6, 901.019}, {4.8*10^-6, 751.279}}
with the second value of each pair corresponding to a real temperature. I am fitting them using the following hot spot model:
hotspotmodel = c2/(lam Log[(1/((1 - alpha)/(Exp[c2/(lam TT)] - 1) + alpha/(Exp[c2/(lam THS)] - 1))) + 1])
I am trying to use FindFit in te following way, but cannot get an answer that makes realistic sense:
pointsfit = FindFit[points, {hotspotmodel, TT > 0}, {{alpha, 0.05}, {TT, 500}, {THS, 2000}}, lam]
""
function = Function[{lam}, Evaluate[hotspotmodel /. pointsfit]];
p1 = Plot[function[lam], {lam, 10^-7, 6 10^-6}, PlotStyle -> Thickness[.005]];
p2 = ListPlot[points2, AxesOrigin -> {0, 0}, PlotMarkers -> {Automatic, 12}];
Show[{p1, p2}, AxesOrigin -> {10^-7, 400}, PlotRange -> All, AxesLabel -> {"\[Lambda (m)", "T (K)"}]
The problem is the function is not fitting properly, or returning sensible results. If I take away the constants, it returns a negative true temperature (TT), or a negative hot spot temperature (THS) and then has issues with trying to fit complex variables. My sense of the physical system says that true values should be within ~25% of those guesses. Any idea where I am going wrong?
Thanks.