Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Aug 19, 2024
1 parent b7f4b4f commit 56ed577
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,8 +1271,9 @@ def merge_func(spectral_region): # noop

def _get_display_unit(self, axis):
if self._jdaviz_helper is None:
# cannot access either the plugin or the spectrum viewer. Plugins that access the unit at this point
# will need to detect that they are set to unitless and attempt again later.
# cannot access either the plugin or the spectrum viewer.
# Plugins that access the unit at this point will need to
# detect that they are set to unitless and attempt again later.
return ''
elif self._jdaviz_helper.plugins.get('Unit Conversion') is None: # noqa
# fallback on native units (unit conversion is not enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,8 @@ def _preview_x_from_extracted(self, extracted):

def _preview_y_from_extracted(self, extracted):
# TODO: use extracted's PIXAR_SR instead (but for some reason isn't populated here...)
#print(f"*** _preview_y_from_extracted {extracted.flux.unit} > {self.spectrum_y_units}")
return extracted.flux.to_value(self.spectrum_y_units,
equivalencies=_eqv_pixar_sr(self.dataset.selected_obj.meta.get('PIXAR_SR', 1.0)))
equivalencies=_eqv_pixar_sr(self.dataset.selected_obj.meta.get('PIXAR_SR', 1.0))) # noqa:

@with_spinner()
def extract(self, return_bg=False, add_data=True, **kwargs):
Expand Down Expand Up @@ -736,7 +735,9 @@ def _clear_marks(self):
'previews_temp_disabled')
def _live_update_marks(self, event={}):
if self.spectrum_y_units == '':
# ensure that units are populated (which in turn will make a call back here from the observe on spectrum_y_units)
# ensure that units are populated
# which in turn will make a call back here
# from the observe on spectrum_y_units
self._on_global_display_unit_changed(None)
return
self._update_marks(event)
Expand Down

0 comments on commit 56ed577

Please sign in to comment.