specutils icon indicating copy to clipboard operation
specutils copied to clipboard

How does Spectrum1D report rest-frame Fnu and flambda?

Open janerigby opened this issue 4 years ago • 1 comments

How does specutils.Spectrum1D() return the rest-frame fnu or flambda? While I see the redshift attribute of Spectrum1D, I can't find where the documentation explains how to apply it to the flux, to correct for (1+z) -- the effect commonly known as "bandwidth compression" for flux density (fnu). In other words, dividing by (1+z) to go from observed fnu to rest fnu, and multiplying by (1+z) to go from observed f_lambda to rest f_lambda. It's so easy to lose track of a 1+z, and it really matters. A use case would be to plot observed wave, observed fnu, and then plot rest wave, rest_fnu, where the rest_fnu should be lower by (1+z).

Here's how I do the conversions in my own code: https://github.com/janerigby/jrr/blob/master/spec.py look at convert2restframe_df()

janerigby avatar Dec 07 '20 21:12 janerigby

Today I had a real-world example, where equivalent widths in a paper we are submitting are wrong by (1+z), because my collaborator forgot to apply the (1+z) factor to the f_lambda continuum to convert to rest-frame. Bad treatment of these (1+z) factors is everywhere in the literature if you look hard enough, so I really think it would help to code this into the Spectrum1D() object.

janerigby avatar Dec 18 '20 15:12 janerigby