View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

redshift with fxcor

Tino wrote on Feb 09, 2008

Hi,
I'm trying to use fxcor to get redshifts. I tried a very simple test at the beginning: took my template , redshifted it by 0.9 (using dopcor) and then ran fxcor of this redshifted object against the template. The answer should be a clear peak at 0.9 but instead I get a very clear peak at z=-0.45 or so. Moreover, the xcorrelation function looks like if it was cut at some value of the shift and then the rest copied at the beginning of the plotting window. Somebody told me it looked like when doing old programming and there were buffer size problems and the extremes of the functions were replicated. When I try the same test with z=0.7 it works just fine.
I hope I explained my self and that somebody can help me,
Thanks!

Mike Fitzpatrick wrote on Feb 09, 2008

What value did you give DOPCOR to do the shift? If it was 0.9 then see the help page about how to compute the correct value using 1./(1+z) - 1
For a redshift of 0.9 you want to add to the spectrum, this is then


ecl> = 1. / (1. + 0.9) - 1
-0.47368421052632


The apparent "wrapping" of the CCF is what I'd expect for large shifts. The ARTDATA package can be used to create spectra with a specific shift if you're looking to check the velocities.

-Mike

Tino wrote on Feb 09, 2008

I didn't use redshift input in DOPCOR, I gave it the relativistic velocity that corresponds to a redshift of 0.9. When I look at the shifted spectrum with splot it looks fine (z=0.9 makes sense).
"The apparent "wrapping" of the CCF is what I'd expect for large shifts"
Why does that happen and is there any way to fix that? I will be using fxcor with shifts of about z=2-3 and I need to figure out what the correct shift is, I can't do that in the wrapped CCF.
Thanks again.

Mike Fitzpatrick wrote on Feb 09, 2008

Maybe we're talking about two different things, could you post a plot or screenshot so I can see what you mean? The correlation is done by putting each spectrum in an array large enough to cover the wavelength range of *both* spectra (actually, the 2^N larger than that). So for very large shifts, what gets correlated is an array with a spectrum on the left and lots of padding, with an array with lots of padding and the spectrum on the right. The result is that for shifts where the spectra overlap you should see some power in the CCF and a lot of 'blank' space, but it's possible in some cases that CCF will appear to wrap. Resampling the spectra to a different dispersion so that you're using e.g. twice the number of points in the correlation will mean the CCF is wider and will put off the wrapping effect to higher shifts.

-Mike

Tino wrote on Feb 09, 2008

Thank you very much, resampling solved the problem

Last post on Feb 09, 2008