Skip to content

Commit

Permalink
update _global_redshift
Browse files Browse the repository at this point in the history
* needed for new lines to immediately adopt the current redshift
* redundancy between self.rs_redshift and _global_redshift seems to exist for future flexibility of allowing multiple redshifts - but if that is ever abandoned, we should merge and replace all instance of _global_redshift with rs_redshift
  • Loading branch information
kecnry committed Jan 10, 2022
1 parent 76c513e commit 11b9194
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jdaviz/configs/default/plugins/line_lists/line_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ def _on_rs_redshift_updated(self, event):
# so we'll just leave empty
return
value = float(event['new'])
# update _global_redshift so new lines, etc, will adopt this latest value
self._global_redshift = value
self._rs_disable_observe = True
self.rs_rv = self._redshift_to_velocity(value)
self._rs_disable_observe = False
Expand Down

0 comments on commit 11b9194

Please # to comment.