It's not easy to help without seeing the data, some of the functions (unperturbedFrequency
, etalon
, background
, and areaFunc
), and numerous constants (shift
, crossoverFrequency
, paramstobefitted
, Areaparamstobefitted
, BGparamstobefitted
, and etalonParamstobefitted
).
I understand that you need consistency among the subsets of the data but first fitting those subsets separately might help get starting values for the fitting of the complete set of data.
Also, when you do arrive at a result, you need to look at the parameter correlation matrix which you can find with myFit["CorrelationMatrix"]//MatrixForm
. With that many parameters it will not be surprising if some of the correlations are very near -1 and +1 which indicates overparameterization.