In Tonry and Davis (1979)(http://adsabs.harvard.edu/abs/1979AJ.....84.1511T), they formulated a cross-correlation method for extracting velocity redshifts. They bin the linear spectra into logarithmic wavelength scale. Similar work was done by Baldry et. al (2014) (https://arxiv.org/abs/1404.2626) and I have inserted relevant excerpt from TD79. I understand that log wavelength binning is a pre-requisite of cross-correlation procedure.

I have been trying to follow this approach and trying to rebin the linear spectra (3000 to 9000 Angstroms) in equal intervals of log wavelength. Could someone please give me a guidance about how to do this logarithmic re-binning in Python?Tonry and Davis 1979

  • 2
    $\begingroup$ I'm voting to close this question as off-topic because this belongs on StackOverflow. It's purely a Python code question $\endgroup$ – Carl Witthoft Jul 31 '19 at 15:39
  • 3
    $\begingroup$ @CarlWitthoft there is no such thing as "closing because it belongs on..." You need to demonstrate that it is off-topic here. Which it is not. This question is about the mathematics of a standard astronomical calculation, and is therefore 100% on-topic. $\endgroup$ – uhoh Jul 31 '19 at 16:42
  • 1
    $\begingroup$ I got as far as $$\frac{dS}{d\log(\lambda)} = \frac{dS}{\frac{1}{\lambda}d\lambda} = \lambda \frac{dS}{d\lambda}$$ but it's 1 AM, that may be the wrong way to go, and I've got to "close up shop" for the night. These days we may not need to re-bin the spectrum so much as we just need to adjust what's plotted. I'll look at this again tomorrow, but I have a hunch someone will be able to write an authoritative answer a lot faster than I, that is unless it gets closed and everyone has to wait for it to be reopened again. $\endgroup$ – uhoh Jul 31 '19 at 17:11
  • 1
    $\begingroup$ @uhoh please just give it a rest. The question specifically says "in Python." Linking that to Astronomy is like claiming a link between jigsaw puzzles and bicycles because there's a puzzle with a picture of a bike. $\endgroup$ – Carl Witthoft Jul 31 '19 at 18:42
  • 1
    $\begingroup$ @CarlWitthoft there are 228 posts that mention python here and 46 questions using the python tag, 16 tagged Astropy and 26 mention Skyfield and 34 mention PyEphem . The mentioning of python does not make a question off-topic. Let's leave it open and get this astronomy question answered! $\endgroup$ – uhoh Jul 31 '19 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.