specutils icon indicating copy to clipboard operation
specutils copied to clipboard

Dividing fluxes of a redshifted spectrum

Open paolofranzetti opened this issue 1 year ago • 1 comments

I load a spectrum and then I shift the spectral_axis to a given redshift value

spec = Spectrum.read('myspectrum.fits') spec.shift_spectrum_to(redshift=2.0)

then I want to divide the fluxes by a given value (i.e 1+z)

spec /= 3.0

Now the fluxes are divided by 3, but the spectral_axis is back to the rest frame values (and the redshift is back to 0.0).

Is this a bug? Or an intended behaviour?

Thank you for any advice

paolofranzetti avatar Apr 10 '24 12:04 paolofranzetti

I missed this when you first posted, sorry about that. Seems like a bug to me, I'll look into fixing it - thanks for the report!

rosteen avatar May 14 '24 15:05 rosteen