redshift/doppler_shift conserving the total flux
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Read the implementations of redshift and doppler_shift to see how they currently transform the spectral axis. Then decide whether flux conservation belongs in those functions or in a separate cosmological observing API, and what options that API needs. Done means agreeing on the intended behavior and API, including how flux scaling relates to luminosity distance.
Written by the indexing model from the issue text.
Description
I noticed that the redshift and doppler_shift functions only shift the spectral_axis according to the redshift or velocity. However, observed cosmologically redshifted or Doppler shifted spectra should also have their flux axis scaled (conserving the flux, or for a full treatment of cosmological redshift and the observed flux density, this would also depend on luminosity distance).
I think this functionality would be good to have in this package, which is the behavior I will be needing. However, I know there are other use cases where the flux scaling is not wanted (template matching comes to mind here). One option could be to add keyword arguments for conserving the total flux, something like:
redshift(spec, z; conserve_flux=false)
doppler_shift(spec, v; relativistic=false, conserve_flux=false)
For the cosmological treatment of observing a redshifted spectrum, perhaps a new function would be more appropriate? For example named observe, observe_redshift, or cosmological_redshift:
observe_redshift(luminosity_spectrum, z; luminosity_distance)
observe_redshift(luminosity_spectrum, z; c::Cosmology) # this could go in a SpectrumBaseCosmologyExt extension
I thought I would first put out these ideas before implementing something concrete. Any thoughts on the general idea or the possible API?
- Dominant language
- Julia
- Stars
- 5
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaAstro/SpectrumBase.jl
-
Spectra algebraOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
JuliaAstro/SpectrumBase.jl#43 · 1 comment ·
-
Trim dead codeOpenplanning
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Towards `SpectrumBase.jl`May be free again @KushalTrivedi19032005 claimed this 280 days ago, and no pull request is open. Openplanning
Difficulty 5/5 Over a week Newbie friendliness 35/100
JuliaAstro/SpectrumBase.jl#41 · 4 comments ·
-
Explore moving out units and/or plottingMay be free again @icweaver claimed this 394 days ago, and no pull request is open. Open
JuliaAstro/SpectrumBase.jl#31 · 2 comments · 1 assignee ·
-
RoadmapOpenplanning
Difficulty 5/5 Over a week Newbie friendliness 20/100
JuliaAstro/SpectrumBase.jl#3 · 4 comments ·
All issues in JuliaAstro/SpectrumBase.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
brown-ccv/Chamber.jl#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAstro/SolarPosition.jl#143 ·
-
distributions
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaBayes/Wren.jl#404 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAI/MLJTransforms.jl#113 ·
Maintainers usually reply within 1 day