I fit a polynomial to my data, as shown in the figure: 
Using the script:
from scipy.optimize import curve_fit
import scipy.stats
from scipy import asarray as ar,exp
xdata = xvalues
ydata = yvalues
fittedParameters = numpy.polyfit(xdata, ydata + .00001005 , 3)
modelPredictions = numpy.polyval(fittedParameters, xdata)
axes.plot(xdata, ydata, '-')
xModel = numpy.linspace(min(xdata), max(xdata))
yModel = numpy.polyval(fittedParameters, xModel)
axes.plot(xModel, yModel)
I want to exclude the region from 3.4 to 3.55 um. How can I do that in my script? Also I have NaNs that I am trying to get rid of in the original .fits file. Help would be valued.
