Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix error trace introduced to Specviz model fitting #970

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions jdaviz/configs/default/plugins/model_fitting/model_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,12 @@ def _on_subset_selected(self, event):
else:
spec_sub = self._spectral_subsets[self.selected_subset]
unit = u.Unit(self.spectral_unit)
spreg = SpectralRegion.from_center(spec_sub.center.x * unit,
spec_sub.width * unit)
self._window = (spreg.lower, spreg.upper)
self.spectral_min = spreg.lower.value
self.spectral_max = spreg.upper.value
if hasattr(spec_sub, "center"):
spreg = SpectralRegion.from_center(spec_sub.center.x * unit,
spec_sub.width * unit)
self._window = (spreg.lower, spreg.upper)
self.spectral_min = spreg.lower.value
self.spectral_max = spreg.upper.value

def vue_model_selected(self, event):
# Add the model selected to the list of models
Expand Down