# Computing radial-velocities from Cross Correlation data

How can I better fit a Gaussian curve to a CCF so that I get the most precise RV value? The image below shows the fitting where I compared the fitting by weighting by the uncertainties and not. There is not a big difference between them because the errors are nearly the same for all data points. The RV is the $$\mu$$ and the uncertainty was gotten from the covariance matrix first time in the diagonal. Performing a similar procedure but for summing several orders (such as fig. below) gives me the RV time-series which has too much spread. I need to find a way to reduce the noise as much as possible. I am not showing the errors in RV time-series because I thought it to be coming from the covariance matrix but it looks unrealistic (too big).  • I modified the question and added a few CCFs, hope it is clearer. X-axis has arbitrary units in RVs. Jun 16, 2020 at 13:33

Why not fit the orders you are interested in separately and then use the standard error of the mean (possibly weighted by the signal-to-noise in each CCF) as the precision in the final, averaged RV.

In terms of what to fit, I don't see why a Gaussian is so bad? You probably need to limit the fit to the inner $$\sim \pm 1 \sigma$$ to avoid noise outside the peak pulling the fit one way or another. Other options are to just use the numerical centroid (but this may be affected by asymmetry) or you could use a sinc function to the central region (sometimes a better model of the peak of a CCF).

Edit: You haven't followed my advice, which was to limit the Gaussian fit to $$\pm 1$$ sigma from the peak (do it iteratively). At the moment, the "wings" of the Gaussian are just adding noise.

As a rule of thumb though, you are not going to do much better than $$2.2\sigma$$ divided by the signal-to-noise ratio. It looks like your $$\sigma \sim 2$$ km/s and your signal-to-noise ratio is about 30, so I don't see how you can have gotten a scatter as small as you have from data like this? And the graph below contains no points with the value $$-10.76$$. There is still something missing from your question.

• Fitting each order is worse because the CCFs by order at least in orders where SNR is low it does not look like a gaussian at all. The Gaussian curve is fine, I meant that the time-series RVs are quite poor. I do not see the trend I should see which is the Rossiter effect. Btw, I am gonna try it now these advice. Thanks a lot @Jeffries! Jun 18, 2020 at 20:53
• @DouglasRodriguesAlves perhaps you should show what you are dealing with then, rather than examples that look perfectly fittable by regular functions. Your RVs can be bad for all sorts of reasons, not just whether you can fit the CCFs. Jun 18, 2020 at 20:57
• The time-series is coming from the sum of several orders. The CCF is a single order fitting. For constraining the center in the 1-$\sigma$ range should I define a center and put bounds where 68% of the data falls within it, then I fit a Gaussian to it? About the error bars, I was told that this data is photon noise limited hence I must get the error bars from a derived formula proportional to flux, wavelength and resolution power. But I am not certain. Jun 26, 2020 at 21:27
• How did you find a SNR ~ 30 ? I estimated to be SNR ~ (2300 - 600) / 200 where 2300 is more or less where I set the zero level, minimum is at approx 600 and 200 is the half width from 2300 to 2500 roughly where the noise is. Then SNR ~ 8.5 not 30. Jun 26, 2020 at 21:54
• @DouglasRodriguesAlves ok, your estimate is better. So you expect an even bigger error on the RV. I was estimating an error from your error bars, which is what matters. Do the fitting in two stages. Use the fit you show to estimate the mean and std Dev, then redo the fit to the range mean +/- std dev. If the SNR is about 10 per order and you have 20 orders, that's a combined SNR of only about 45. Jun 27, 2020 at 0:05