I'm trying to computationally find the refractive indices (real and imaginary) for a thin slab suspended in air (so the only indices to deal with are air and my material's). I've experimentally taken transmission and reflection measurements of intensity in a certain wavelength range.
From a textbook chapter I read,
$$r_{ij}[n_i, n_j]= (n_i - n_j)/(n_i + n_j)$$ $$t_{ij}[n_i, n_j]= (2 n_i)/(n_i + n_j)$$ $$r = (r_{ij}[n_1, n_2] + r_{ij}[n_2, n_3] e^{2i \pi n_2 d/\lambda})/(1 + r_{ij}[n_1, n_2] r_{ij}[n_2, n_3] e^{2i \pi n_2 d/\lambda})$$ $$t = \sqrt{n3/n1} (t_{ij}[n_1, n_2] t_{ij}[n2, n3] e^{ 2i \pi n_2 d/\lambda})/(1 + r_{ij}[n_1, n_2] r_{ij}[n_2, n_3] e^{2i \pi n_2 d/\lambda})$$ and $$T = |t|^2$$, $$R=|r|^2$$
for transmission and reflection of a plane wave through a 'slab' (though I may be missing a factor of 2 in a couple places. I've used Mathematica style brackets for the functions).
From here, $T$ and $R$ are both functions of $n_1$ (the air, ~1) and $n_2$ my material ($n_3$ is air again, here). So mathematically I should be able to figure out $n_2$ for each $T$ and $R$ pair, at each wavelength.
So I've done this. I have Mathematica (MM) find the $n_2$ that minimizes $$\sqrt{(T-T_{exp})^2+(R-R_{exp})^2}$$ at each wavelength. Then, to see how close it is, I plug $n_2$ back into the original equation and plot it against my experimental results to see how close they match up.
The problem is, they're matching up incredibly well -- but the results I'm getting for $n_2$ aren't realistic (more specifically, the real part of $n_2$ is negative, and this is not a negative refractive index material...). Here is a graphical example of what I mean (the horizontal axis is wavelength, in units of microns. The vertical axis is unitless for all):
And here I've plotted the values of $T$ and $R$ from my computed $n_2$'s (green and black) over the first graph. As you can see, they're so similar you can't tell, except at the leftmost tails.

What could be going on? One possibility is that though my solution for $n_2$ gives very close values for $T$ and $R$, there are very different values of $n_2$ that give even closer values.
Someone I talked to told me that the plane wave model doesn't always apply at some scales -- which blew my mind because I have always seen it used. He said it was the far field solution to dipole radiation but that it might not apply at my length scale. Could anyone verify or refute this?