Whenever I read any Astro papers in http://arxiv.org/ they usually talk about Data fitting or modelling or sentences like 'we fitted the spectral region by analytic functions i.e. by multi-component Gaussian model plus continuum'.

Is there any websites, online books or maybe YouTube videos which teaches these techniques in detail?

Any info will be much appreciated!

  • $\begingroup$ The link itself is dead and gone (well, it leads somewhere); anyone interested may want this one. $\endgroup$
    – HDE 226868
    Nov 28, 2014 at 23:10
  • $\begingroup$ oops sorry. posted it blindly. will edit now. $\endgroup$ Nov 29, 2014 at 1:07
  • 1
    $\begingroup$ You might also look at stats.stackexchange.com Fitting data to curves is a large field in and unto itself. $\endgroup$
    – user21
    Dec 1, 2014 at 15:31

1 Answer 1


If you are going to do data analysis, you need to understand how the fitting procedure works. This means a lot of statistics, and new terminology and so on, which is hard and takes much time.

If you want to start to fit, e.g., a spectrum, you should definitely read the XSPEC guide. You can find a pdf online as well.

In short, fitting is to take a model and measure how well this model fits to your data. To quantify this "how well", usually the chi-squared distribution is considered:

$\chi^2 = \sum\limits_{i=1}^n(\frac{X_i - \mu_i}{\sigma_i})^2$

where $X$ is your data (observed value), $\mu$ is your expected value (which, in this case, corresponds with the prediction of the model), and $\sigma$ is the variance on your data point (the error).

This is the most general information that you need. You can read more here, and especially on the Numerical Recipes (don't be scared by the huge format of the last document, the pages you need are only few around Chapter 15).

For fun, you can just try to play with XSPEC, to take confidence, and see at least how things change when you change your model or your data (especially if you know which model is the best-fit for your data). To understand everything will take years, but if you never start, you'll never arrive ;)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .