I have an astrophysical non-linear curve, specifically a power spectrum. I need to fit this curve with a model and obtain the goodness-of-fit (GOF). This gives me expected and observed values. The data also have observational errors related to instrumental uncertainties. Is there any way I can integrate observational errors with a chi-square test (or any other GOF test)?
Are you using some package to fit the data or is this a school problem where you are writing a non-linear least squares code? Just about every package allows you to input the errors on the data points and it will output the errors on the fitted parameters or full covariance matrix. In fact, you should be able to input the covariance matrix of errors (if you know it) but power spectra usually have fairly diagonal covariance matrices.
The basic idea is to look at weighted least squares. You don't want to just ignore the errors when doing the fit and then use them to calculate the error. The fitter needs the errors in order to optimize the fit.
If the errors are small enough, the distribution of errors may be reasonably well described as multivariate normal. The terms in the output covariance matrix actually comes from linearizing the model around the best fit solution.
If you really want to characterize the error distribution fully, you'll have to go to something like markov chain monte carlo.