I am trying to fit a dataset in which I want my fitting model to account for two different intervals of my data (i.e.: I want to fit two different regions of my dataset, let's the first 10 elements of a list and the 30 last ones).
To fit a specific interval within a list,I usually write the following:
p2, cov2 = scipy.optimize.curve_fit(scatter2,wv[0:121],ab[0:121],p0=p_guess2, absolute_sigma=True, maxfev=90000, method='lm')
a2, b2=p2
However, since I am looking to fit an extra region of data, I wanted to write in a pythonic way something of the following:
wv[0:121]+[461:481] #(I know this is not written properly)
What is then the proper way to call two different regions of a list?
Thank you in advance for all the help!
I have tried to google, but I am probably not googling the write terms to find the answer. I have also just tried to do the fitting by calling my list as
wv[0:121][461:481]
, but this did not work either.