Open eteq opened 4 years ago
Actually I have been looking for some software that would do exactly this. I have read Tonry & Davis (1979) and have used the good old RVSAO
package of IRAF
for their XCSAO
task for some radial velocity analysis previously. The proposed cross-correlation peak-finding features would be really good to have.
As highlighted in this notebook: https://github.com/spacetelescope/jdat_notebooks/blob/c22a9856ac5ce1af947b1f5361b7f425e86625ad/notebooks/redshift_crosscorr/redshift_with_crosscorr.ipynb the machinery added in #544 to allow cross-correlation redshift currently does not come with any way to actually get an answer for the redshift from the lag peaks. We should add a (some?) functions to
specutils.analysis
that uses standard methods used in astronomy for this form of peak-finding. The most "traditional" one I know of is the Tonroy&Davis approach, written up here: https://ui.adsabs.harvard.edu/abs/1979AJ.....84.1511T/abstract , but there are plenty of more complete approaches - a nice write-up of that is here: Statler 1995 (https://ui.adsabs.harvard.edu/abs/1995AJ....109.1371S).The Tonroy&Davis version might just be a function that does something like:
which would then set the
redshift
/radial_velocity
attributes onp_obs
with the peak location (and the uncertainty could just be an attribute added by hand likep_obs.radial_velocity.uncertainty
andp_obs.redshift.uncertainty
).Alternatively/additionally, it could be
peak_rv = correlation_peak_td(correlation.template_correlate(p_obs, p_template)
, although then we have to manage the logic for "rv or redshift?" as part of the function call, whichSpectralCoord
alread does in my first case.I'd say the best thing to do is start with tonry&davis to work out the API and add more approaches as time/interest permits.