-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redshift correction to velocity conversions. #491
Conversation
Leaving a quick follow-up: as discussed in #455 this (along with a few others) triggered a discussion of where One way that's specifically relevant to this PR is that we won't have |
More concretely: I think the main change required to this PR is to implement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, although I think we may wish to add a test where the Spectrum1D
is initialized with the spectral_axis
as a velocity to test the behavior when it's not converting.
(like template fitting) that set this attribute when they are run on | ||
a spectrum. | ||
""" | ||
return self._radial_velocity/cnst.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return self._radial_velocity/cnst.c | |
return self._radial_velocity/cnst.c | |
if val is None: | ||
self._radial_velocity = None | ||
else: | ||
self.radial_velocity = val * cnst.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumption is really only true for small redshifts. Should we use the stricter definition?
(like template fitting) that set this attribute when they are run on | ||
a spectrum. | ||
""" | ||
return self._radial_velocity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return self._radial_velocity | |
return self._radial_velocity | |
This PR addresses in part issue #258. It might, or might not be the correct interpretation of what this issue was intended to address in the first place. I understood the goal is to apply a known redshift correction to the
velocity
attribute ofSpectrum1D
instances.The implementation uses the simple low-z approximate definition of redshift. It remains to be seen if this is what is actually intended. And, if not, we need more specific requirements on how to interpret redshift values, and what to do with them.