I dug up a bit and found that, the problem is because you have some empty spaces in your file that our solver does not recognize of, so that the mczfit fails. I modified your file a bit to clean up all the empty spaces and now the fitting works fine. The modified files are attached here: testgain1_modified.txt (5.6 KB), fitplotBasic_modified.lsf (862 Bytes), and the fitting result is as below:
To add on to my previous reply, the “mczfit” function won’t work on 2 gain curves (but it does work on one single gain curve fitting) because the fitting algorithm we are using has an interpolation step if the gain curves have dependence on carrier densities and it cannot perform the interpolation for just 2 gain curves. So if the gain curves do depend on carrier densities, there should be at least 3 curves to be enough for the fitting.
I will file a feature request on this to let the solver detect and remove the unnecessary special characters in the file automatically and will keep you in the loop on the progress.